Skip to content

Commit fe9a3c9

Browse files
authored
docs(go2rtc): troubleshooting improvements (blakeblackshear#12192)
1 parent 012aa63 commit fe9a3c9

1 file changed

Lines changed: 67 additions & 48 deletions

File tree

docs/docs/guides/configuring_go2rtc.md

Lines changed: 67 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -24,59 +24,78 @@ go2rtc:
2424
2525
The easiest live view to get working is MSE. After adding this to the config, restart Frigate and try to watch the live stream by selecting MSE in the dropdown after clicking on the camera.
2626
27-
### What if my video doesn't play?
28-
29-
If you are unable to see your video feed, first check the go2rtc logs in the Frigate UI under Logs in the sidebar. If go2rtc is having difficulty connecting to your camera, you should see some error messages in the log. If you do not see any errors, then the video codec of the stream may not be supported in your browser. If your camera stream is set to H265, try switching to H264. You can see more information about [video codec compatibility](https://github.com/AlexxIT/go2rtc/tree/v1.9.4#codecs-madness) in the go2rtc documentation. If you are not able to switch your camera settings from H265 to H264 or your stream is a different format such as MJPEG, you can use go2rtc to re-encode the video using the [FFmpeg parameters](https://github.com/AlexxIT/go2rtc/tree/v1.9.4#source-ffmpeg). It supports rotating and resizing video feeds and hardware acceleration. Keep in mind that transcoding video from one format to another is a resource intensive task and you may be better off using the built-in jsmpeg view. Here is an example of a config that will re-encode the stream to H264 without hardware acceleration:
30-
31-
```yaml
32-
go2rtc:
33-
streams:
34-
back:
35-
- rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
36-
- "ffmpeg:back#video=h264"
37-
```
38-
39-
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.
40-
41-
```yaml
42-
go2rtc:
43-
streams:
44-
back:
45-
- ffmpeg:rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
46-
```
47-
48-
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:
49-
50-
```yaml
51-
go2rtc:
52-
streams:
53-
back:
54-
- rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
55-
- "ffmpeg:back#audio=aac"
56-
```
5727
58-
If you need to convert **both** the audio and video streams, you can use the following:
59-
60-
```yaml
61-
go2rtc:
62-
streams:
63-
back:
64-
- rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
65-
- "ffmpeg:back#video=h264#audio=aac"
66-
```
67-
68-
When using the ffmpeg module, you would add AAC audio like this:
28+
### What if my video doesn't play?
6929
70-
```yaml
71-
go2rtc:
72-
streams:
73-
back:
74-
- "ffmpeg:rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2#video=copy#audio=copy#audio=aac"
75-
```
30+
- Check Logs:
31+
- Access the go2rtc logs in the Frigate UI under Logs in the sidebar.
32+
- If go2rtc is having difficulty connecting to your camera, you should see some error messages in the log.
33+
34+
- Check go2rtc Web Interface: if you don't see any errors in the logs, try viewing the camera through go2rtc's web interface.
35+
- Navigate to port 1984 in your browser to access go2rtc's web interface.
36+
- If using Frigate through Home Assistant, enable the web interface at port 1984.
37+
- If using Docker, forward port 1984 before accessing the web interface.
38+
- Click `stream` for the specific camera to see if the camera's stream is being received.
39+
40+
- Check Video Codec:
41+
- If the camera stream works in go2rtc but not in your browser, the video codec might be unsupported.
42+
- If using H265, switch to H264. Refer to [video codec compatibility](https://github.com/AlexxIT/go2rtc/tree/v1.9.4#codecs-madness) in go2rtc documentation.
43+
- If unable to switch from H265 to H264, or if the stream format is different (e.g., MJPEG), re-encode the video using [FFmpeg parameters](https://github.com/AlexxIT/go2rtc/tree/v1.9.4#source-ffmpeg). It supports rotating and resizing video feeds and hardware acceleration. Keep in mind that transcoding video from one format to another is a resource intensive task and you may be better off using the built-in jsmpeg view.
44+
```yaml
45+
go2rtc:
46+
streams:
47+
back:
48+
- rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
49+
- "ffmpeg:back#video=h264"
50+
```
51+
52+
- Switch to FFmpeg if needed:
53+
- 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.
54+
```yaml
55+
go2rtc:
56+
streams:
57+
back:
58+
- ffmpeg:rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
59+
```
60+
61+
- If you can see the video but do not have audio, this is most likely because your
62+
camera's audio stream is not AAC.
63+
- If possible, update your camera's audio settings to AAC.
64+
- 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:
65+
```yaml
66+
go2rtc:
67+
streams:
68+
back:
69+
- rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
70+
- "ffmpeg:back#audio=aac"
71+
```
72+
73+
If you need to convert **both** the audio and video streams, you can use the following:
74+
75+
```yaml
76+
go2rtc:
77+
streams:
78+
back:
79+
- rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
80+
- "ffmpeg:back#video=h264#audio=aac"
81+
```
82+
83+
When using the ffmpeg module, you would add AAC audio like this:
84+
85+
```yaml
86+
go2rtc:
87+
streams:
88+
back:
89+
- "ffmpeg:rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2#video=copy#audio=copy#audio=aac"
90+
```
7691

7792
:::warning
7893

79-
To access the go2rtc stream externally when utilizing the Frigate Add-On (for instance through VLC), you must first enable the RTSP Restream port. You can do this by visiting the Frigate Add-On configuration page within Home Assistant and revealing the hidden options under the "Show disabled ports" section.
94+
To access the go2rtc stream externally when utilizing the Frigate Add-On (for
95+
instance through VLC), you must first enable the RTSP Restream port.
96+
You can do this by visiting the Frigate Add-On configuration page within Home
97+
Assistant and revealing the hidden options under the "Show disabled ports"
98+
section.
8099

81100
:::
82101

0 commit comments

Comments
 (0)