Search Unity

Video Hardware Video Decode

Discussion in 'Audio & Video' started by strych, Oct 1, 2018.

  1. strych

    strych

    Joined:
    Sep 25, 2018
    Posts:
    1
    Hello

    I'm new to the Unity. What I have to do is simple 360 Stereo video player with capability to receive commands sent by the COM port. It was fast and easy to achieve basic funcionality with built-in video player and skybox material. Now I'm stuck with the performance. The target platform is mobile Windows 10 device, probably one of the newest NUC from Intel with Core i7 and Iris Plus 650 or 655 graphic. Still I have to be careful with maximum resolution of the video. I have prepared some samples with different resolutions with ffmpeg using libx264 encoder (profile baseline, level 5.1, yuv420). I would like to use as high resolution as possible. I have to play two files in the same time (left and right eye).

    (All loads below are for playing one file)
    When I played files by Unity I was surprised by high cpu usage. I started this project with i5-6500 and integrated HD530 and I don't remember actual values. Now I'm sitting on the same 6500 but with GTX970 installed. Playing 3300x1650 video gives me now about 40% CPU, Video Engine Load is 0%. So it looks like the video hardware decoding is disabled.
    The same video file played by MPC-HC and LAV video decoder gives CPU around 1%, and this time Video Engine is loaded in between 20-40%. But I can't compare this directly - there is no rendering on the sphere.
    I found this article: https://software.intel.com/en-us/articles/hardware-accelerated-video-decode-in-unity. There is stated that Unity (on December 8, 2017) does not support hardware video decode. I checked this example and CPU load is below 10% and Video Engine is loaded about 26%. But playing isn't so smooth as before.

    So my question is how is the thing with hardware decoding? Are the data from GPU-Z reliable? When I read Unity manual it seems that it supports hardware decode for h264. Maybe one of the VideoPlayers from asset store would be good choice for me? I have limited time for this project and I would like to focus more on other parts.

    Thank you in advance!