From ef9338f5af7baac37e0a39764c96cb910b97847c Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Tue, 17 Jan 2023 21:36:27 -0700 Subject: [PATCH 1/3] Remove rpi warning about not working hwaccel (#5145) --- docs/docs/configuration/hardware_acceleration.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/docs/configuration/hardware_acceleration.md b/docs/docs/configuration/hardware_acceleration.md index 93fb568f25..c9ff695c5f 100644 --- a/docs/docs/configuration/hardware_acceleration.md +++ b/docs/docs/configuration/hardware_acceleration.md @@ -7,12 +7,6 @@ It is recommended to update your configuration to enable hardware accelerated de ### Raspberry Pi 3/4 -:::caution - -There is currently a bug in ffmpeg that causes hwaccel to not work for the RPi kernel 5.15.61 and above. For more information see https://github.com/blakeblackshear/frigate/issues/3780 - -::: - Ensure you increase the allocated RAM for your GPU to at least 128 (raspi-config > Performance Options > GPU Memory). **NOTICE**: If you are using the addon, you may need to turn off `Protection mode` for hardware acceleration. From 2631a4c35b6f6e6ee08a1faf5aa6cadfcc78dbf1 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Tue, 17 Jan 2023 21:36:52 -0700 Subject: [PATCH 2/3] Fix not using custom set stream name (#5134) --- web/src/routes/Camera.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/routes/Camera.jsx b/web/src/routes/Camera.jsx index c703ea1ced..3be2bfb716 100644 --- a/web/src/routes/Camera.jsx +++ b/web/src/routes/Camera.jsx @@ -112,7 +112,7 @@ export default function Camera({ camera }) { player = (
- +
); @@ -129,7 +129,7 @@ export default function Camera({ camera }) { player = (
- +
); From f5466426dfafe97037d003a81d3de733c4e5d5a6 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Tue, 17 Jan 2023 21:38:17 -0700 Subject: [PATCH 3/3] Fix go2rtc error when not set (#5133) --- .../rootfs/usr/local/go2rtc/create_config.py | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/docker/rootfs/usr/local/go2rtc/create_config.py b/docker/rootfs/usr/local/go2rtc/create_config.py index 20e8de4948..e2658a6bff 100644 --- a/docker/rootfs/usr/local/go2rtc/create_config.py +++ b/docker/rootfs/usr/local/go2rtc/create_config.py @@ -5,6 +5,7 @@ import yaml +BTBN_PATH = "/usr/lib/btbn-ffmpeg" config_file = os.environ.get("CONFIG_FILE", "/config/config.yml") # Check if we can use .yaml instead of .yml @@ -20,12 +21,27 @@ elif config_file.endswith(".json"): config = json.loads(raw_config) -go2rtc_config: dict[str, any] = config["go2rtc"] +go2rtc_config: dict[str, any] = config.get("go2rtc", {}) -if not go2rtc_config.get("log", {}).get("format"): +# we want to ensure that logs are easy to read +if go2rtc_config.get("log") is None: go2rtc_config["log"] = {"format": "text"} +elif go2rtc_config["log"].get("format") is None: + go2rtc_config["log"]["format"] = "text" +# should set default stun server so webrtc can work if not go2rtc_config.get("webrtc", {}).get("candidates", []): go2rtc_config["webrtc"] = {"candidates": ["stun:8555"]} -print(json.dumps(go2rtc_config)) \ No newline at end of file +# need to replace ffmpeg command when using ffmpeg4 +if not os.path.exists(BTBN_PATH): + if go2rtc_config.get("ffmpeg") is None: + go2rtc_config["ffmpeg"] = { + "rtsp": "-fflags nobuffer -flags low_delay -stimeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i {input}" + } + elif go2rtc_config["ffmpeg"].get("rtsp") is None: + go2rtc_config["ffmpeg"][ + "rtsp" + ] = "-fflags nobuffer -flags low_delay -stimeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i {input}" + +print(json.dumps(go2rtc_config))