ViveMediaDecoder icon indicating copy to clipboard operation
ViveMediaDecoder copied to clipboard

Video Decoding on windows is too slow

Open spaul13 opened this issue 5 years ago • 3 comments

The video with just one 1 I frame and 4 P frame is taking almost (~25 ms to allocate and initialize decoder context and additionally more than 100 ms is needed to decode it make the state from buffering to state) which implies the FPS that viveMediaPlayer can support is less than 10 FPS.

can anyone please tell me Why it's too slow? and is there any way to improve this? I am using viveMediaPlayer on Unity windows platform.

spaul13 avatar Feb 25 '19 21:02 spaul13

It could be divided to two things:

  • For initialization: loading file may related to disk and CPU. Please check your hardware if you want more performance.
  • For decoding: this plugin is CPU decoding. If it still too slow for you, you could modify the native code to support GPU decoding. Or check the other video format for better decoding performance. Thanks.

kyo8568131 avatar Mar 06 '19 05:03 kyo8568131

@kyo8568131, can u please tell me how to change the native code to support GPU decoding?

spaul13 avatar Mar 06 '19 05:03 spaul13

You can check the sample code hw_decode.c in FFmpeg development build. And also check the official reference page: https://trac.ffmpeg.org/wiki/HWAccelIntro

kyo8568131 avatar Mar 06 '19 06:03 kyo8568131