Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support videos as loose files on Linux #1550

Closed
TheLacus opened this issue Oct 3, 2019 · 5 comments
Closed

Support videos as loose files on Linux #1550

TheLacus opened this issue Oct 3, 2019 · 5 comments
Assignees
Labels

Comments

@TheLacus
Copy link
Collaborator

@TheLacus TheLacus commented Oct 3, 2019

Video replacements can be provided from mods (with any supported format) or as loose files (with expected .mp4 extension and format).

Unfortunately mp4 is not supported on Linux so loose files mods are not viable on this platform. This is what the Unity documentation suggests:

For most plaftforms, H.264 (typically in a .mp4, .m4v, or .mov format) is the optimal supported video codec because it offers the best cross-platform compatibility. Linux is the notable exception.

For Linux, the optimal encoding is usually a .webm container with video tracks encoded using the VP8 codec, and audio encoded using the Vorbis codec.

Support for loose files on Linux should be added, for example with a #if compiler directive to use .webm when Linux is targeted. It's important that the new format is tested on Linux both inside the Unity Editor and with a compiled build. We might also switch to a different common format is there are no drawbacks for currently supported platforms (Windows and OSx).

@TheLacus

This comment has been minimized.

Copy link
Collaborator Author

@TheLacus TheLacus commented Oct 28, 2019

If i have confirmation that webm works on Linux i'll proceed with this change, unless someone wants to make a PR directly.

@TheLacus TheLacus self-assigned this Oct 28, 2019
@petchema

This comment has been minimized.

Copy link
Collaborator

@petchema petchema commented Oct 28, 2019

Yup, it works fine with just

-                string path = Path.Combine(moviePath, name + ".mp4");
+                string path = Path.Combine(moviePath, name + ".webm");

Tested with the FMV converted using
ffmpeg -i .../DAG2.mp4 -c:v libvpx -c:a libvorbis -b:v 6M .../DAG2.webm

First 10s for testing:
DAG2-webm-10s.zip

@TheLacus

This comment has been minimized.

Copy link
Collaborator Author

@TheLacus TheLacus commented Nov 1, 2019

Thank you!

@petchema

This comment has been minimized.

Copy link
Collaborator

@petchema petchema commented Nov 13, 2019

Does something need to be done for packaged videos too?

@TheLacus

This comment has been minimized.

Copy link
Collaborator Author

@TheLacus TheLacus commented Nov 14, 2019

Does something need to be done for packaged videos too?

No, they are seeked by filename without extension.

@TheLacus TheLacus closed this Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.