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.27k stars 349 forks source link

undefined error=read tcp #856

Open lesourcil opened 8 months ago

lesourcil commented 8 months ago

Hi,

im using Frigate v12 with upgraded go2rtc package v1.8.5 and out of 8 cameras, one is not working. It's a chinese rebrand of a hikvision.

Here are the logs:

undefined error=read tcp 172.18.0.2:38176->192.168.99.208:554: i/o timeout url=rtsp://username:password@192.168.99.208:554/Streaming/Channels/1 caller=github.com/AlexxIT/go2rtc/internal/streams/producer.go:171

But if i try the same url in VLC or directly in the cameras section of Frigate config, everything works perfectly.

My config in Frigate is super simple:

go2rtc:
    NotWorkingCam:
    - "rtsp://username:{FRIGATE_RTSP_PASSWORD}@192.168.99.208:554/Streaming/Channels/1"
    - "ffmpeg:NotWorkingCam#audio=aac"
cameras:
  NotWorkingCam:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/NotWorkingCam

Any ideas ?

Soulflyzz commented 6 months ago

I would also like to join in on this. I have 3 different Hikvision Models cameras in my house and 2 of them work with go2rtc but one has the same issue as above. There are 2 main differences with this camera it has Audio and it's on wifi. I have disabled the audio in the Config settings on the camera, besides that everything is the same on all three cameras.

lesourcil commented 6 months ago

Just to add to this, if in go2rtc I reencode with ffmpeg it now works.

botnet01 commented 6 months ago

Same for me and my "Anpviz" IP Camera. VLC Media Player can display the RTSP stream without issues, however, ffmpeg re-encoding is required in go2rtc which I would love to avoid. The RTSP video stream from the camera is H264 encoded, but I also tried H265 and different resolutions - does not make any difference for me, the stream always times out.

lesourcil commented 6 months ago

Im also having this problem with an Anpviz ptz camera. I have 5 others Anpviz working just fine (one different model with PTZ as well).

AlexxIT commented 4 months ago

You can increase log level for rtsp module to trace