mozilla / janus-plugin-sfu

Janus plugin to act as a kind of SFU for game networking data.
Mozilla Public License 2.0
135 stars 40 forks source link

Testing vp8 video codec #89

Open vincentfretin opened 2 years ago

vincentfretin commented 2 years ago

I'm creating the PR as draft just so this have some visibility in case someone is interested. Here switching from h264 to vp8 by default for all rooms. I don't use that myself, this was just to test that it works, and yes it works on Desktop, Android, iOS without any changes in naf-janus-adapter. I'll keep h264 for now because I read vp8 is not hardware accelerated on iOS devices, so taking much cpu and battery.

vincentfretin commented 2 years ago

You can also replace Vp8 by Vp9, it works too, but currently vp9 doesn't work on iOS 14.6 by default, you need to enable the flags in Safari -> Advanced -> Experimental Features More infos: https://bugs.webkit.org/show_bug.cgi?id=173141 https://caniuse.com/webm

mqp commented 2 years ago

Makes sense. I'm 90% sure that the only reason we used to use H.264 over VP8 was for Mobile Safari support. If and when iOS supports something more modern with hardware acceleration it would be good to upgrade the default.

vincentfretin commented 2 years ago

We could also make it configurable in janus.plugin.sfu.cfg with video_codec = "h264|vp8|vp9" and h264_profile="42e01f" vp9_profile="2"