Fix environment_vars not reaching ffmpeg processes (#24635)
CI / AMD64 Build (push) Canceled after 0s
CI / ARM Build (push) Canceled after 0s
CI / Jetson Jetpack 6 (push) Canceled after 0s
CI / AMD64 Extra Build (push) Canceled after 0s
CI / ARM Extra Build (push) Canceled after 0s
CI / Synaptics Build (push) Canceled after 0s
CI / Assemble and push default build (push) Canceled after 0s

* start the forkserver after the config applies environment_vars

The forkserver started as a side effect of creating the multiprocessing Manager at the top of main(), before the config loaded, so every worker process and the ffmpeg it launched inherited the environment from before environment_vars were applied. Variables like LIBVA_DRIVER_NAME set in config.yml never reached ffmpeg. The Manager now uses the fork context, so the forkserver does not start until the first worker process.

* fix test
This commit is contained in:
Josh Hawkins
2026-10-11 13:21:45 -06:00
committed by GitHub
parent 8e569ff4f9
commit 7e402d70df
2 changed files with 84 additions and 1 deletions
+3 -1
View File
@@ -15,7 +15,9 @@ from frigate.util.config import find_config_file
def main() -> None:
manager = mp.Manager()
# Fork this manager so the forkserver does not start until the first
# worker process, after the config has applied environment_vars.
manager = mp.get_context("fork").Manager()
faulthandler.enable()
# Setup the logging thread