Search Unity

Video support on Linux

Discussion in 'Linux' started by Krisi98, Jan 9, 2021.

  1. Krisi98

    Krisi98

    Joined:
    Jan 9, 2021
    Posts:
    1
    Hello all,

    Playing a game build with the latest Unity on Linux I was unable to use one of the game features being animated backgrounds as enabling this in settings resulted in a black screen. Googling my problem I find this forum and that most video formats are not supported in Linux except webm while this game uses mp4. Replacing those videos with webm made the game too lagy, something that wasn't a problem before.

    So is there any plans for more video files support in the near future ? And what can I do in my case ?
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    VP8 encoded videos should work without lag.

    We can't add mp4 support on Linux because it depends on h.264 and h.265 decoders and Linux doesn't ship with them built-in (since there's nobody to pay the licensing fees).
     
  3. gamefox87

    gamefox87

    Joined:
    Aug 19, 2016
    Posts:
    64
    There is an Openh264 project that pays those licensing fees and has the codecs available for Linux. https://www.openh264.org/
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
  5. chibiskuld2

    chibiskuld2

    Joined:
    Nov 11, 2022
    Posts:
    11
    Is there not a way to check if the library exists on the system, and if so then enable support?
    I'd be perfectly fine with asking customers to install openh264, if they want mp4 support.
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    It's a gray area. This would also not be applicable to most games as they wouldn't want to redistribute openh264 (just like we don't) and it's really not a great idea to ask gamers to install stuff manually - they expect the install button on Steam to just get the game working. Given all that, we decided to not pursue that avenue.