From ad60f4894b2929c153cd82d64a93f1602baba8e9 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 1 Feb 2023 17:09:56 -0700 Subject: [PATCH] Update go2rtc to 1.1.1 (#5333) * Update go2rtc to 1.1.1 * Remove redundant qualifiers * Remove qualifiers * Set default_query * Update version --- Dockerfile | 2 +- docker/rootfs/usr/local/go2rtc/create_config.py | 8 ++++++++ docs/docs/configuration/index.md | 2 +- docs/docs/configuration/live.md | 4 ++-- docs/docs/configuration/restream.md | 12 ++++++------ 5 files changed, 18 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index b5fde686d..a1b0cfea0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ RUN --mount=type=tmpfs,target=/tmp --mount=type=tmpfs,target=/var/cache/apt \ FROM wget AS go2rtc ARG TARGETARCH WORKDIR /rootfs/usr/local/go2rtc/bin -RUN wget -qO go2rtc "https://github.com/AlexxIT/go2rtc/releases/download/v1.1.0/go2rtc_linux_${TARGETARCH}" \ +RUN wget -qO go2rtc "https://github.com/AlexxIT/go2rtc/releases/download/v1.1.1/go2rtc_linux_${TARGETARCH}" \ && chmod +x go2rtc diff --git a/docker/rootfs/usr/local/go2rtc/create_config.py b/docker/rootfs/usr/local/go2rtc/create_config.py index 624415633..580963431 100644 --- a/docker/rootfs/usr/local/go2rtc/create_config.py +++ b/docker/rootfs/usr/local/go2rtc/create_config.py @@ -43,6 +43,14 @@ if not go2rtc_config.get("webrtc", {}).get("candidates", []): go2rtc_config["webrtc"] = {"candidates": default_candidates} else: print("[INFO] Not injecting WebRTC candidates into go2rtc config as it has been set manually", file=sys.stderr) + +# sets default RTSP response to be equivalent to ?video=h264,h265&audio=aac +# this means user does not need to specify audio codec when using restream +# as source for frigate and the integration supports HLS playback +if go2rtc_config.get("rtsp") is None: + go2rtc_config["rtsp"] = {"default_query": "mp4"} +elif go2rtc_config["rtsp"].get("default_query") is None: + go2rtc_config["rtsp"]["default_query"] = "mp4" # need to replace ffmpeg command when using ffmpeg4 if not os.path.exists(BTBN_PATH): diff --git a/docs/docs/configuration/index.md b/docs/docs/configuration/index.md index 6ee709c90..8062db020 100644 --- a/docs/docs/configuration/index.md +++ b/docs/docs/configuration/index.md @@ -350,7 +350,7 @@ rtmp: enabled: False # Optional: Restream configuration -# Uses https://github.com/AlexxIT/go2rtc (v1.0.1) +# Uses https://github.com/AlexxIT/go2rtc (v1.1.1) go2rtc: # Optional: jsmpeg stream configuration for WebUI diff --git a/docs/docs/configuration/live.md b/docs/docs/configuration/live.md index b5c328514..14978492e 100644 --- a/docs/docs/configuration/live.md +++ b/docs/docs/configuration/live.md @@ -50,11 +50,11 @@ cameras: output_args: record: preset-record-generic-audio-copy inputs: - - path: rtsp://127.0.0.1:8554/test_cam?video=copy&audio=aac # <--- the name here must match the name of the camera in restream + - path: rtsp://127.0.0.1:8554/test_cam # <--- the name here must match the name of the camera in restream input_args: preset-rtsp-restream roles: - record - - path: rtsp://127.0.0.1:8554/test_cam_sub?video=copy # <--- the name here must match the name of the camera_sub in restream + - path: rtsp://127.0.0.1:8554/test_cam_sub # <--- the name here must match the name of the camera_sub in restream input_args: preset-rtsp-restream roles: - detect diff --git a/docs/docs/configuration/restream.md b/docs/docs/configuration/restream.md index a504e821c..655aee272 100644 --- a/docs/docs/configuration/restream.md +++ b/docs/docs/configuration/restream.md @@ -56,7 +56,7 @@ cameras: output_args: record: preset-record-generic-audio-copy inputs: - - path: rtsp://127.0.0.1:8554/rtsp_cam?video=copy&audio=aac # <--- the name here must match the name of the camera in restream + - path: rtsp://127.0.0.1:8554/rtsp_cam # <--- the name here must match the name of the camera in restream input_args: preset-rtsp-restream roles: - record @@ -66,7 +66,7 @@ cameras: output_args: record: preset-record-generic-audio-copy inputs: - - path: rtsp://127.0.0.1:8554/http_cam?video=copy&audio=aac # <--- the name here must match the name of the camera in restream + - path: rtsp://127.0.0.1:8554/http_cam # <--- the name here must match the name of the camera in restream input_args: preset-rtsp-restream roles: - record @@ -99,11 +99,11 @@ cameras: output_args: record: preset-record-generic-audio-copy inputs: - - path: rtsp://127.0.0.1:8554/rtsp_cam?video=copy&audio=aac # <--- the name here must match the name of the camera in restream + - path: rtsp://127.0.0.1:8554/rtsp_cam # <--- the name here must match the name of the camera in restream input_args: preset-rtsp-restream roles: - record - - path: rtsp://127.0.0.1:8554/rtsp_cam_sub?video=copy&audio=aac # <--- the name here must match the name of the camera_sub in restream + - path: rtsp://127.0.0.1:8554/rtsp_cam_sub # <--- the name here must match the name of the camera_sub in restream input_args: preset-rtsp-restream roles: - detect @@ -112,11 +112,11 @@ cameras: output_args: record: preset-record-generic-audio-copy inputs: - - path: rtsp://127.0.0.1:8554/http_cam?video=copy&audio=aac # <--- the name here must match the name of the camera in restream + - path: rtsp://127.0.0.1:8554/http_cam # <--- the name here must match the name of the camera in restream input_args: preset-rtsp-restream roles: - record - - path: rtsp://127.0.0.1:8554/http_cam_sub?video=copy&audio=aac # <--- the name here must match the name of the camera_sub in restream + - path: rtsp://127.0.0.1:8554/http_cam_sub # <--- the name here must match the name of the camera_sub in restream input_args: preset-rtsp-restream roles: - detect