ViveSoftware / ViveMediaDecoder

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

Playback is broken when building with 2017.2 #10

Closed OlivierNemoz closed 6 years ago

OlivierNemoz commented 6 years ago

Playback stutters when running the built version.

To reproduce the problem, load the example from the asset store in 2017.2.0f3. Launch in the editor, notice that the playback is working. Build & run the same project, and notice that the playback stalls almost to a halt.

The problem is not reproducible in 2017.1

vrterritory commented 6 years ago

Reporting the same thing happens for me too.

I traced the problem down to:

nativeSetVideoTime(decoderID, (float) setTime); GL.IssuePluginEvent(GetRenderEventFunc(), decoderID);

So it seems to be an issue somewhere inside ViveMediaDecoder.cpp

kyo8568131 commented 6 years ago

Hi, I cannot reproduce the issue using Unity 2017.2.0f3. Please help to provide more details or video. Thanks.

vrterritory commented 6 years ago

Kyo: have you tried to build the project? It works well in the Editor, but when you build the project and run the exe outside of Unity, its lagging like crazy (no way to not notice the issue).

kyo8568131 commented 6 years ago

Yes, I had build the project and it works normally. My test environment is Win 7 64 bits. Test video formats are mp4 and webm. Both work fine.

vrterritory commented 6 years ago

I just prepared a quick example: https://synthesisvr.com/dl/ViveMediaDecoder-Bug.7z

It contains both the full project + the build. The video path is set to F:\ViveMediaDecoder-Bug\build\5_movie480.mp4

My env is Win10 Home (x64), Unity 2017.2.0f3 (same issue reproduced on 2017.3 beta)

kyo8568131 commented 6 years ago

It still works smoothly in my environment. Maybe it relate to OS. I will do further test to figure out the issue.

vrterritory commented 6 years ago

That's weird, because in Win10, it works well with Unity 2017.1 as well as 5.x. So it seems to be an issue when everything is on the latest version.. including the OS.

OlivierNemoz commented 6 years ago

Same here, noted that on Windows 10.

kyo8568131 commented 6 years ago

Hi, Please help to replace the dlls with FFmpeg 3.4 official build and try again. You can download it from https://ffmpeg.zeranoe.com/builds/ Thanks.

vrterritory commented 6 years ago

Thanks @kyo8568131

That works! Despite I had to stick with the default Unity player and do some nasty video transcoding in the backend, I'll consider migrating over to ViveMedia.

kyo8568131 commented 6 years ago

Great! I will update the plugin document and asset. Thanks.