Set User Agent for FFmpeg calls (#4555)

* Set User Agent for FFmpeg calls

* Allow to use shell-like string args

* Add test for arg as string with space
This commit is contained in:
Felipe Santos
2022-11-30 19:53:45 -03:00
committed by GitHub
parent 5ad391977e
commit 4523c9b06d
8 changed files with 40 additions and 6 deletions

View File

@@ -32,6 +32,7 @@ from frigate.ffmpeg_presets import (
parse_preset_output_record,
parse_preset_output_rtmp,
)
from frigate.version import VERSION
logger = logging.getLogger(__name__)
@@ -357,7 +358,13 @@ class BirdseyeCameraConfig(BaseModel):
)
FFMPEG_GLOBAL_ARGS_DEFAULT = ["-hide_banner", "-loglevel", "warning"]
FFMPEG_GLOBAL_ARGS_DEFAULT = [
"-hide_banner",
"-loglevel",
"warning",
"-user_agent",
f"FFmpeg Frigate/{VERSION}",
]
FFMPEG_INPUT_ARGS_DEFAULT = [
"-avoid_negative_ts",
"make_zero",