Frigate Dahua works, but not via go2rtc

Howdy, I have something strange going on. It is recommended to configure cameras via go2rtc, but to my chagrin, the camera that works perfectly when configured as:

Per_Cam_Direct:
  enabled: true
  ffmpeg:
    inputs:
      - path: rtsp://[user]:[pass]@[ip]:554/cam/realmonitor?channel=1&subtype=1
  detect:
    enabled: false

…does not work properly when configured as:

go2rtc:
  streams:
    Per_Cam:
      - rtsp://[user]:[pass]@[ip]:554/cam/realmonitor?channel=1&subtype=0 # subtype 0 = high res

  Per_Cam:
    enabled: true
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/Per_Cam
          input_args: preset-rtsp-restream
    detect:
      enabled: false # <---- disable detection until you have a working camera feed

In this configuration, the stream jitters, shows one image, does nothing for a while, and then shows another image.

To get to the root cause, I disabled even this camera and went to the go2rtc dashboard at :1984. No matter how I configure go2rtc:

go2rtc:
  streams:
    Per_Cam:
      - rtsp://[user]:[pass]@[ip]:554/cam/realmonitor?channel=1&subtype=0

or:

go2rtc:
  streams:
    Per_Cam:
      - ffmpeg:rtsp://[user]:[pass]@[ip]:554/cam/realmonitor?channel=1&subtype=0

or:

go2rtc:
  streams:
    Per_Cam:
      - rtsp://[user]:[pass]@[ip]/cam/realmonitor?channel=1&subtype=0

…or even if I use the low-res version:

go2rtc:
  streams:
    Per_Cam:
      - rtsp://[user]:[pass]@[ip]:554/cam/realmonitor?channel=1&subtype=1

I have the same problem. When I open the stream on go2rtc, it hangs and does not work properly (even though it works fine in VLC). The logs are all “happy,” showing only info-level messages that seem fine.

Logs:


12/28/2024, 8:04:18 PM info go2rtc version=1.9.2 platform=linux/amd64 revision=b2399f3
12/28/2024, 8:04:18 PM info config path=/dev/shm/go2rtc.yaml
12/28/2024, 8:04:18 PM info [rtsp] listen addr=:8554
12/28/2024, 8:04:18 PM info [api] listen addr=:1984
12/28/2024, 8:04:18 PM info [webrtc] listen addr=:8555/tcp

Here is the probe data from the camera:


producers
0
type RTSP passive producer
url rtsp://127.0.0.1:8554/4beef02729899be6e49c3c2902fdf6f9
remote_addr 127.0.0.1:41472
user_agent ffmpeg/go2rtc
sdp v=0\r\no=- 0 0 IN IP4 127.0.0.1\r\ns=Media Server\r\nc=IN IP4 127.0.0.1\r\nt=0 0\r\na=tool:libavformat LIBAVFORMAT_VERSION\r\nm=video 0 RTP/AVP 96\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z2QAMqwbGoAkAKP/AW4CAgKAAAH0AAAnEHQwARlAAAEBffXeXGhgAjKAAAIC++u8uFAA,aO44MAA=; profile-level-id=640032\r\na=control:streamid=0\r\n
medias
0 video, recvonly, H.264 High 5.0
receivers
0 96 H264, bytes=0, senders=1
consumers
0
type probe
remote_addr 172.23.0.1:46414
user_agent Mozilla/5.0 (X11; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0
medias
0 video, sendonly, ALL
1 audio, sendonly, ALL
2 audio, recvonly, ANY
senders
0 96 H264, bytes=0, receivers=1

Can anyone point me in the right direction? :blush:

Per_Cam_Direct

dont think so i commented out the direct camera feed like this:

# Per_Cam_Direct:
#  enabled: true
#  ffmpeg:
#   inputs:
#    - path: rtsp://[user]:[pass]@[ip]:554/cam/realmonitor?channel=1&subtype=1
# detect:
#   enabled: false

when i started using the go2rtc, futhermore, even when i comment out the whole other part aswel:

#  Per_Cam:
#    enabled: true
#    ffmpeg:
#      inputs:
#        - path: rtsp://127.0.0.1:8554/Per_Cam
#          input_args: preset-rtsp-restream
#    detect:
#      enabled: false # <---- disable detection until you have 

and am left with

go2rtc:
  streams:
    Per_Cam:
      - rtsp://[user]:[pass]@[ip]:554/cam/realmonitor?channel=1&subtype=0

the stream on the go2rtc on :1984 is still janky

I didn’t notice that you changed names eternally examples

What does this mean?
If it’s dropping in and out it likely won’t work in frigate. This could be the issue

You also don’t have role defined

ffmpeg:
  inputs:
    - path:
      roles:
        - detect
        - record
detect: