docker-jitsi-meet
docker-jitsi-meet copied to clipboard
Enable VP9 codec easily using environment variables
I've been following the community VP9 support thread recently: https://community.jitsi.org/t/flagship-vp9-support-notes-and-discussion/33921/20
From what I understand, VP9 codec support has already been added, and to enable it, two configuration files must be edited: web/config.js and jicofo.conf. The docker setup opts to use environment variables to change configuration files, recreating the configuration files based on those variables each time the container is restarted. (See issue https://github.com/jitsi/docker-jitsi-meet/issues/895 )
After enabling VP9 in docker-compose, jicofo.conf is modified to reflect the change, but web/config.js remains unchanged. Because of this, conferences still use VP8 as the default codec, even using two chrome browsers confirmed to support VP9. Adding a config-custom.js file to append settings is out of the question because the "preferredCodec" setting must fall under the video quality section of config.js.
So what's the proper way to set VP9 as the preferred codec?
Need to add env variables in config.js to fix this. I'm already using env variables for this for a while but due to some other urgent work couldn't push it to community.
Don't change anything at jicofo level. If you disable vp8 then fallback from vp9 to vp8 won't work.
@cloudslash7 Can you please try this PR? https://github.com/jitsi/docker-jitsi-meet/pull/1051
I’ll try it today, thanks!
@prayagsingh Setting ENABLE_VIDEOQUALITY to true and PREFERRED_CODEC to VP9 in docker-compose.yml didn't seem to work. The conference still defaulted to VP8. I was wondering if something was wrong in my test environment, but after when I checked .jitsi-meet-cfg/web/config.js , I didn't see anything to reflect the environment variables. It's weird because web/rootfs/defaults/settings-config.js was edited so the changes should work.
Let me know if you need any more info from me.
EDIT: Toggling ENFORCE_PREFERRED_CODEC will actually break Safari support as expected...But I'm still not seeing VP9 when using two chromium browsers.
@cloudslash7 you have to build the docker image for service web. If you are using jitsi/web:latest or jitsi/web:tag_number then it won't work . Can you try it by building an image? I tried it and it is working fine on my side.
@prayagsingh I'm building unstable right? Running "JITSI_RELEASE=unstable make"
@cloudslash7 you can build from any of the release.
JITSI_RELEASE=unstable make is fine.
@prayagsingh I'm still seeing VP8, unfortunately. It's P2P though, which I noticed has a separate setting for preferredCodec in config.js. Could that be the problem?
@cloudslash7 yes it is. Can you please try by disabling P2P once?
If this works for you then I'll try to fix this for P2P as well.
How can I disable p2p? I set the env variable ENABLE_P2P to false, but config.js still shows it as enabled, and a two person conference still uses p2p.
EDIT: After some more investigation, I've found that very few of the environment variables in the docker-compose file are working for me (i.e. START_AUDIO_ONLY, START_MUTED, START_SILENT, etc.) The only one that seems to have any effect is ENABLE_NOISY_MIC_DETECTION, which doesn't show up after I set it to false.
I've also tried explicitly changing the settings in web/rootfs/defaults/settings-config.js rather than using environment variables. I set config.p2p.enabled to false and config.startAudioOnly to true and the changes aren't reflected. I definitely built the image and I'm sure I'm using those built images.
EDIT 2: Okay I'm really dumb and kinda a noob. I didn't realize you have to rebuild the image after changing those settings facepalm
I've done some more testing. After manually configuring some settings in settings-config.js, none of them were actually reflected in config.js. Only when I put them in system-config.js did they show up. After changing the settings manually in system-config.js, VP9 worked. Is that supposed to be the case?
@cloudslash7 If you are adding anything to docker-jitsi repo on your local machine then you have to build the images as well. Only then the changes you made will be visible.
So steps are:-
- Clone repo
- Add your changes
- Rebuild docker images on your local machine
- Replace jitsi/web image in docker-compose.yml file with the image you created in step 3.
- Run docker-compose up -d
- Verify your changes (in this case in config.js file)
@cloudslash7 I have added the env variable to configure the video codec for p2p. Could you please try?
docker-compose down
set .evn
it works for vp8 or vp9 or 264.