Document supported codecs for Unity and AVPro video players on PC & Quest
tracked
RavenWorks
I'm trying to find the most efficient way to encode long videos for a VRChat world, and I found this table:
which in theory is exactly what I want, except, the table is two years old, and I have no way of telling whether the information is still correct (I have no Quest hardware to test with, for example).
There should be an official table, either in the docs or on the wiki, that states what codecs we should expect to work in each situation (AVPro vs Unity, PC vs Quest).
Log In
RavenWorks
Also, I went ahead and started the table myself on the wiki: https://wiki.vrchat.com/wiki/Video_players
ChrisFratz
RavenWorks I'd love to see this table (and your test world) extended to audio codes as well. I haven't been able to get flac audio in videos working on the quest. There's a world I use for hosting movie nights called Charon's Home Theater (linked below) and that world has demo videos with flac audio, but IDK how they got their flac audio to work on quest. As everything I've tried doesn't seem to play. And I encode my flac audio with the flac.exe cli encoder program and merge the audio to the video with MKXtoolNIX.
RavenWorks
ChrisFratz Interesting! I've just added another set of players to the world for testing audio, but so far on Win11 and (2D) Android, AVPro plays everything and Unity plays nothing... Give it a try on Quest and please fill in the wiki with your results!
ChrisFratz
RavenWorks I am now even more confused. All the audio tests work on AVPro (none of them worked with unity player) Quest 3 standalone. But when I try the suggested ffmpeg command with my own audio, it doesn't work. IDK what I'm doing wrong at this point. I also don't know how to add my results to the table.
Edit 2, never mind, I figured that part out and added my results.
RavenWorks
ChrisFratz Mysterious -- I think I'll add a player with an editable URL so you can test your own files for reference. In the meantime, can you link your test file?
ChrisFratz
RavenWorks Sure. This is a 5.1.2 (technically 7.1 I guess) file that I made for the world I liked above (since it uses 2 channels for height channels placed above the viewer). Ignore the file name, it has flac audio in it.
RavenWorks
ChrisFratz Well this is interesting -- your file works on both AVPro and Unity for me on Win11, but on Android, this is the first file I've seen that works on Unity but NOT on AVPro! (On AVPro, it SAYS "success", and starts playing, but before the logo is off the screen, it just stops?)
It appears to be something wrong with your encoder, because if I convert the audio to s16 and then back to s32 (just to force ffmpeg to re-encode even though the end format is the same as the starting one), the file that's been through the re-encoding works fine! (Of course, having been downsampled, the result would
sound
like an s16 file, but I'm just testing compatibility here...) But it isn't something wrong with the container, because if I ask ffmpeg to "encode" a new copy of that file without changing any formats, it recognizes correctly that it can just transcode and does so, and the new file is still broken, even though it came out to a slightly different filesize (presumably due to metadata).Ultimately, this is beyond my expertise at this point -- but the world has been updated with a player that takes a URL at the back of the room, so you can run further tests yourself! (Just don't forget that Android URLs will only work if they're HTTPS!)
RavenWorks
For anyone else interested in this topic, this world can help you gather data: https://vrchat.com/home/world/wrld_bcc3fb8b-6bbd-4ea8-991b-7f7da49c1a56/info although there's still so many platforms to try on, and I'm not sure if I'm missing any important formats...
This post was marked as
tracked