mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-14 23:25:25 +03:00
Use ffmpeg for compatibility
This commit is contained in:
parent
e3a90e3aca
commit
c16b46bec8
@ -116,11 +116,12 @@ if int(os.environ["LIBAVFORMAT_VERSION_MAJOR"]) < 59:
|
|||||||
"-fflags nobuffer -flags low_delay -stimeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i {input}"
|
"-fflags nobuffer -flags low_delay -stimeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i {input}"
|
||||||
)
|
)
|
||||||
|
|
||||||
# add stream for each camera if user has not configured a stream already.
|
# create blank streams list
|
||||||
# this will ensure that all features are available to the user
|
|
||||||
if not go2rtc_config.get("streams"):
|
if not go2rtc_config.get("streams"):
|
||||||
go2rtc_config["streams"] = {}
|
go2rtc_config["streams"] = {}
|
||||||
|
|
||||||
|
# add stream for each camera if user has not configured a stream already.
|
||||||
|
# this will ensure that all features are available to the user
|
||||||
for camera_name, camera in config.get("cameras", {}).items():
|
for camera_name, camera in config.get("cameras", {}).items():
|
||||||
name = camera.get("live", {}).get("stream_name") or camera_name
|
name = camera.get("live", {}).get("stream_name") or camera_name
|
||||||
|
|
||||||
@ -133,11 +134,11 @@ for camera_name, camera in config.get("cameras", {}).items():
|
|||||||
if not inputs:
|
if not inputs:
|
||||||
continue
|
continue
|
||||||
elif len(inputs) == 1:
|
elif len(inputs) == 1:
|
||||||
go2rtc_config["streams"][name] = [inputs[0]["path"]]
|
go2rtc_config["streams"][name] = [f"ffmpeg:{inputs[0]["path"]}"]
|
||||||
else:
|
else:
|
||||||
for input in inputs:
|
for input in inputs:
|
||||||
if "detect" in input["roles"]:
|
if "detect" in input["roles"]:
|
||||||
go2rtc_config["streams"][name] = [input["path"]]
|
go2rtc_config["streams"][name] = [f"ffmpeg:{input["path"]}"]
|
||||||
break
|
break
|
||||||
|
|
||||||
# apply variable substitution to streams
|
# apply variable substitution to streams
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user