ViveSoftware / ViveMediaDecoder

A high performance video decoding Unity plugin for Windows.
http://u3d.as/usf
Other
133 stars 36 forks source link

Is there anyway to preload the video? #30

Open Fire1nWork opened 5 years ago

Fire1nWork commented 5 years ago

Hi, We are using the this package in Unity to play some big videos for a university experiment. The issue we have is that, since the videos are really big(8k, uncompressed), there usually are several seconds for blackscreen before the video actually plays. We are trying to find a way, in Unity, to "pre-load" the video, but can't find any. We also tried to add a "Loading..." text to the camera (so that the text always follows the head movement), but it seems to be covered by the 360 video. Can anyone help us on the "pre-load" issue? Or is there a way to bring the "Loading..." text to foreground? We are quiet new to Unity and VR, so I'm very sorry if these questions sounds stupid....

kyo8568131 commented 5 years ago

Hi Fire1nWork, I am not sure how you display 360 video, but there is a simple method: use the UVSphere.cs to generate a large inward sphere and display the video on it. So you could make sure the video is behind all the things in front of you. For video part, 8K uncompressed video is quite large. If you would like to increase performance, I think you could profile first to find out the performance bottleneck. It could be decode, memory copy or Unity life cycle. If decode and memory copy take too much time, you could try to modify native decoder to use GPU decode. Thanks.

Fire1nWork commented 5 years ago

Hi, Yes, we are currently using a UVSphere.cs to display the video. However, unlike what you said, the text we created cannot be seen until we manually disable the gameobject UVSphere is on... Any idea why?

-------- 原始信息 -------- 发件人: kyo8568131 notifications@github.com 日期: 2019/5/30 11:02 (GMT+08:00) 收件人: ViveSoftware/ViveMediaDecoder ViveMediaDecoder@noreply.github.com 抄送: Junxiao Gao gjx8020@hotmail.com, Author author@noreply.github.com 主题: Re: [ViveSoftware/ViveMediaDecoder] Is there anyway to preload the video? (#30)

Hi Fire1nWork, I am not sure how you display 360 video, but there is a simple method: use the UVSphere.cs to generate a large inward sphere and display the video on it. So you could make sure the video is behind all the things in front of you. For video part, 8K uncompressed video is quite large. If you would like to increase performance, I think you could profile first to find out the performance bottleneck. It could be decode, memory copy or Unity life cycle. If decode and memory copy take too much time, you could try to modify native decoder to use GPU decode. Thanks.

― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ViveSoftware/ViveMediaDecoder/issues/30?email_source=notifications&email_token=AE5DJWVWAFXL757W3IEOAADPX47WBA5CNFSM4HQOLOK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWRG3VY#issuecomment-497184215, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AE5DJWW5XF55H35TDLHIW4DPX47WBANCNFSM4HQOLOKQ.

kyo8568131 commented 5 years ago

If your text is on a mesh, like quad, cube or something, it should not be blocked by the sphere(unless the sphere is too small). Or do you render text on a layer which would be blocked? Or do you use multiple cameras with incorrect order? Please check the text using. Thanks.

chandanadittyo commented 3 years ago

@Fire1nWork Have you solved the problem? I am working on the same issue but failed to solve the problem

lockbox23 commented 3 years ago

I'm using the official VLC for Unity plug-in to play local and streaming video in the Vive Pro.

chandanadittyo commented 3 years ago

@lockbox23 are you using this for 360 videos?? and does it take time to load the video from URL??