From eb045e335b16b22f1a582ea554860b1f91f535ca Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sat, 4 Feb 2023 07:21:22 -0600 Subject: [PATCH] add note about cameras needing ffmpeg for go2rtc --- docs/docs/guides/configuring_go2rtc.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/docs/guides/configuring_go2rtc.md b/docs/docs/guides/configuring_go2rtc.md index 16b3fdebe..a6372eef4 100644 --- a/docs/docs/guides/configuring_go2rtc.md +++ b/docs/docs/guides/configuring_go2rtc.md @@ -33,6 +33,15 @@ go2rtc: - "ffmpeg:back#video=h264" ``` +Some camera streams may need to use the ffmpeg module in go2rtc. This has the downside of slower startup times, but has compatibility with more stream types. + +```yaml +go2rtc: + streams: + back: + - ffmpeg:rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2 +``` + If you can see the video but do not have audio, this is most likely because your camera's audio stream is not AAC. If possible, update your camera's audio settings to AAC. If your cameras do not support AAC audio, you will need to tell go2rtc to re-encode the audio to AAC on demand if you want audio. This will use additional CPU and add some latency. To add AAC audio on demand, you can update your go2rtc config as follows: ```yaml @@ -53,6 +62,15 @@ go2rtc: - "ffmpeg:back#video=h264#audio=aac" ``` +When using the ffmpeg module, you would add AAC audio like this: + +```yaml +go2rtc: + streams: + back: + - "ffmpeg:rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2#video=copy#audio=copy#audio=aac" +``` + ## Next steps 1. If the stream you added to go2rtc is also used by Frigate for the `record` or `detect` role, you can migrate your config to pull from the RTSP restream to reduce the number of connections to your camera as shown [here](/configuration/restream#reduce-connections-to-camera).