Search Unity

Video Player in 5.6

Discussion in 'Linux' started by kmare, Mar 7, 2017.

  1. kmare

    kmare

    Joined:
    Jan 30, 2016
    Posts:
    34
  2. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    Unity doesn't support mp4 decoding on Linux atm - to transcode, the source will need to be webm or ogv.
     
    aroquega and kmare like this.
  3. kmare

    kmare

    Joined:
    Jan 30, 2016
    Posts:
    34
    Thank you @Tak ! I tried a webm file before, but for some reason it didn't work (guess wrong headers?) and I thought it was a general problem with the new video player class in linux. Tried another file and it worked. Is support for more file formats on linux planned for the 5.6 release?
     
  4. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    Probably not for 5.6.0. Part of the issue is that we don't have a builtin media framework on Linux, like AVFoundation or Windows Media Foundation, that gives us a legitimate way to work with patented formats. We're still investigating our options in this direction.
     
  5. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    260
    Hi kmare!

    Our messaging regarding supported/unsupported codecs is rather crude at the moment, we'll improve this over time.

    A few things to add here about webm:
    • The webm files you use should have video tracks encoded with the vp8 codec, not vp9. For the time being, only vp8 is supported but we'll add vp9 as well down the line.
    • Similarly to video, the audio tracks should be encoded with the vorbis codec, not the newer opus codec, which may be added in the future.
    • Webm is supported through software on Linux (and most platforms in fact except Android at the moment) so the webm files you use in the editor can be used in your game without having to enable transcode in the importer.
    So a possible reason for your earlier attempt to use webm to fail is that it may have contained video tracks with vp9. I just made a note to emit a proper warning when we detect it's the case. The upcoming doc explains this as well.

    And about ogv, this file format is only supported in the editor on Linux so you have to transcode those (into webm) using the transcode option in the importer.

    Thanks for giving the VideoPlayer a try on Linux!

    Dominique
    A/V developer at Unity.
     
    kmare likes this.
  6. mikael_kalms

    mikael_kalms

    Joined:
    Mar 16, 2017
    Posts:
    5
    Hi,

    it seems that Unity 2017.1.0f3 still does not have support for .mp4 files. This also results in not being able to build players for other platforms from a headless Linux build machine, if the game contains .mp4 video content (... or convert all video content to webm...). Here's hoping that you will find a solution for this at some point in the future.
     
  7. jimver004

    jimver004

    Joined:
    May 29, 2017
    Posts:
    9
    I confirm that mp4 are not working 2017.1.1xf1Linux
     
  8. jimver004

    jimver004

    Joined:
    May 29, 2017
    Posts:
    9
    I am trying to find a format that is working in both Windows and Linux versions of Unity for WebGL and WindowsStandalone formats. Mp4 is working perfectly in 2017.1.1f1Windows for Editor, WinStandalone and WebGL exports. As indicated by Unity mp4 is not working at all in Linux version of Unity. I tranformed mp4 to ogv with Blender and tried to put it in both WindowsUnity and LinuxUnity. Here are some more tests


    OGV Video File in 2017.1.1xf1Linux:
    - ok in Editor, and WebGL
    - not ok in WindowsStandalone

    OGV Video File in 2017.1.1f1Windows:
    - not ok in Editor and WindowsStandalone
    - ok in WebGL
     
  9. dorianlangbeck

    dorianlangbeck

    Joined:
    Mar 22, 2019
    Posts:
    1
    Why does use ffmpeg wouldn't be an option in this case?
    Some legal issues?
     
  10. antoined73

    antoined73

    Joined:
    Feb 23, 2014
    Posts:
    24
    Any news on this ? Will the vp9 codec be supported on linux ? Thanks !
     
  11. adityakaishav

    adityakaishav

    Joined:
    Jan 16, 2019
    Posts:
    27
    Hi,
    Does Unity 2020 supports vp9, or is there any other way to make to working so that we can play video with codec vp9?
     
  12. KevinWelton

    KevinWelton

    Joined:
    Jul 26, 2018
    Posts:
    239
    Currently vp8 is supported, but not vp9. I know video codec support in Linux doesn't cover much breadth at present. Codec support on Linux is a more complicated story than Mac and Windows. Hopefully we'll be able to announce a more comprehensive solution at some point.
     
  13. BillyGalbreath

    BillyGalbreath

    Joined:
    Jan 12, 2014
    Posts:
    1
    Still no love for Linux :(

    Guess I'll try to write my own video player for H.264.
     
  14. mikejm_

    mikejm_

    Joined:
    Oct 9, 2021
    Posts:
    346
    Hey Dominique. It's been almost 5 years - Any update on VP9? From what I see still only VP8 playback in the Editor is supported. Is that the case? The reason I ask is Blender only exports to WebM VP9 and it is a pain in the ass to manually try to render VP8 videos as a result. I need videos with tranparency for my mobile app (on both iPhone & Android) so I think WebM is my only good option with good file sizes.

    It would be a lot easier if Unity supported WebM VP9. Then I could just use the video clips straight out of Blender. If it makes any difference, I am needing this video to be played back in the UI Elements GUI system.

    If it might be possible for you to implement WebM VP9 and you haven't yet gotten to it, could you give any estimate on when it might be reasonable to expect?

    I know this is the Linux forum - I am using in Windows - but I think the question is the same.

    Thanks
     
    Last edited: Jan 21, 2022
    grobonom likes this.
  15. grobonom

    grobonom

    Joined:
    Jun 23, 2018
    Posts:
    335
    I think it is more than time to care a bit about linux and serious video formats^^

    MP4 H265+MP3 would be the best choice but in the meanwhile, VP9 is just mandatory...
     
  16. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    345
    Still no support for VP9
     
    grobonom likes this.
  17. alan-lawrance

    alan-lawrance

    Joined:
    Feb 1, 2013
    Posts:
    360
    vp9 support would be very useful for us. Why isn't it being added?
     
    grobonom likes this.