Search Unity

Video New Video player in Unity 5.6 and ffmpeg?

Discussion in 'Audio & Video' started by philipd, Apr 13, 2017.

  1. philipd

    philipd

    Joined:
    Apr 15, 2016
    Posts:
    7
    Hi

    I don't know if this has been documented properly anywhere else or if the question has been brought up anyway but I am trying to get information about the best settings for video encoding for Unity's new Video plugin.

    We use ffmpeg to do the majority of our encoding as it's gives the best results and the smallest file sizes, also it has a good range of tools to encode to an exact size which is very important for android. We have released a film on Steam called 'We are Stars' http://store.steampowered.com/app/556140/ which uses the AVpro plugin and offer two playback options, one that uses Media foundation and is a smaller resolution 2880x2880 which at the time was the maximum resolution available for media foundation. We also provided a full 4k resolution 4096x4096 version which required you to install the LAV codecs to get the video to play. This is a wopping 16gb file. The announcement of Unity having a built in video player that plays back 4k natively meaning people won't have to install codecs is something we would really like to try however the Unity video player doesn't play back the 4096x4096 file and although it plays back the 2080x2080 file it doesn't play it back smoothly. Both are encoded using h264.

    So after that ramble the question is, what is the best, highest encoding settings we can use to get smooth playback (PC based systems and android, we are releasing on Oculus and Vive and hopefully GearVR)? What is considered 4k for example? Do you have any ffmpeg encoding parameters? In short what do you recommend? That's to the Unity developers but anyone else with advice are welcome :)

    All the best

    Phil
     
  2. Max-Bot

    Max-Bot

    Joined:
    Sep 25, 2013
    Posts:
    83
  3. scvnathan

    scvnathan

    Joined:
    Apr 29, 2016
    Posts:
    75
    I'm curious too philipd. You guys discover anything? I've found that 720p videos actually look quite good in VR (Vive) and the performance isn't too bad either (1-5ms per frame for 3 videoplayers). Although I have come across a particular video that for whatever reason killed performance (in the profiler PreUpdate.UpdateVideo(), would spike very often)