AlexxIT / go2rtc

Ultimate camera streaming application with support RTSP, RTMP, HTTP-FLV, WebRTC, MSE, HLS, MP4, MJPEG, HomeKit, FFmpeg, etc.
https://github.com/AlexxIT/Blog
MIT License
4.78k stars 383 forks source link

Allow udp restream on go2rtc #1383

Open hannesroth88 opened 1 week ago

hannesroth88 commented 1 week ago

Hi,

I have a Reolink Camera and some Intercom. I want to read the video stream from the camera by the intercom to later view the video in a call. It doesn't let me connect it because of codec issues. I am running frigate over truenas, so i wanted to use the restream capability and see if the intercom is able to read the video stream via rtsp from there.

The stream is shown on frigate ui. But when i try to connect the intercom I get. "Unsupported Transport". As I played around a bit already with cocker-compose ffmpeg + aler9/rtsp-simple-server. I could fix this error by allowing udp. But having troubles with disconnects :(

Is it possible to allow udp on go2rtc?. I hope this question is correctly placed in here as go2rtc sets up the server right?

Heres my frigate config:

mqtt:
  enabled: false
cameras:
  hauseingang:
    enabled: true
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/hauseingang # <--- the name here must match the name of the camera in restream
          input_args: preset-rtsp-restream
          roles:
            - record
            - detect
go2rtc:
  streams:
    hauseingang: # <- for RTSP streams
      - "ffmpeg:http://192.168.0.11/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=mySecurePw#video=copy#audio=copy#audio=opus"
      - ffmpeg:hauseingang#audio=opus#video=h264#hardware   # <- copy of the stream which transcodes audio to the missing codec (usually will be opus)
version: 0.14
camera_groups:
  Haus:
    order: 1
    icon: LuSprout
    cameras:
      - hauseingang
AlexxIT commented 1 week ago

This is not just a "allow". This is heavy enhancement. And in my opinion UDP protocol has more cons than pros. But I understand that some software only can handle this protocol.