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
7.34k stars 531 forks source link

io timeouts from go2rtc #1413

Open bmrowe opened 1 month ago

bmrowe commented 1 month ago

I have go2rtc connected to eight reolink POE cameras. I then use the feeds from go2rtc for various apps including Frigate.

I am getting IO timeouts from Frigate in the go2rtc logs. These two dockers are on the same server, so I don't understand the timeouts.

The go2rtc logs in my go2rtc instance are empty image

The go2rtc logs in Frigate show the timeouts

2024-10-27 19:10:09.205597759  19:10:09.205 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:171 > error="read tcp 192.168.1.5:37722->192.168.1.198:8554: i/o timeout" url=rtsp://192.168.1.198:8554/sideyard_left_sub?mp4
2024-10-27 19:10:09.207133463  19:10:09.207 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:171 > error="read tcp 192.168.1.5:37792->192.168.1.198:8554: i/o timeout" url=rtsp://192.168.1.198:8554/sideyard_left?mp4
2024-10-27 19:12:20.845640769  19:12:20.845 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:171 > error="read tcp 192.168.1.5:37710->192.168.1.198:8554: i/o timeout" url=rtsp://192.168.1.198:8554/backyard_left?mp4
2024-10-27 19:12:20.848542572  19:12:20.848 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:171 > error="read tcp 192.168.1.5:37652->192.168.1.198:8554: i/o timeout" url=rtsp://192.168.1.198:8554/backyard_left_sub?mp4
2024-10-27 19:16:49.448674070  19:16:49.448 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:171 > error="read tcp 192.168.1.5:37796->192.168.1.198:8554: i/o timeout" url=rtsp://192.168.1.198:8554/sideyard_right?mp4
2024-10-27 19:16:49.486809134  19:16:49.486 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:171 > error="read tcp 192.168.1.5:37774->192.168.1.198:8554: i/o timeout" url=rtsp://192.168.1.198:8554/sideyard_right_sub?mp4
2024-10-27 19:16:54.487518600  19:16:54.487 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:171 > error="read tcp 192.168.1.5:45836->192.168.1.198:8554: i/o timeout" url=rtsp://192.168.1.198:8554/sideyard_right_sub?mp4
2024-10-27 19:17:31.411539800  19:17:31.411 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:171 > error="read tcp 192.168.1.5:37684->192.168.1.198:8554: i/o timeout" url=rtsp://192.168.1.198:8554/pool_sub?mp4
2024-10-27 19:17:31.433036365  19:17:31.432 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:171 > error="read tcp 192.168.1.5:37752->192.168.1.198:8554: i/o timeout" url=rtsp://192.168.1.198:8554/pool?mp4
2024-10-27 19:19:03.697563946  19:19:03.697 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:171 > error="read tcp 192.168.1.5:37738->192.168.1.198:8554: i/o timeout" url=rtsp://192.168.1.198:8554/backyard_right_sub?mp4
2024-10-27 19:19:03.698502217  19:19:03.698 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:171 > error="read tcp 192.168.1.5:37782->192.168.1.198:8554: i/o timeout" url=rtsp://192.168.1.198:8554/backyard_right?mp4
2024-10-27 19:21:57.988649019  19:21:57.988 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:171 > error="read tcp 192.168.1.5:37648->192.168.1.198:8554: i/o timeout" url=rtsp://192.168.1.198:8554/driveway_sub?mp4
2024-10-27 19:21:58.031395849  19:21:58.031 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:171 > error="read tcp 192.168.1.5:37674->192.168.1.198:8554: i/o timeout" url=rtsp://192.168.1.198:8554/driveway?mp4

In go2rtc, my cameras are configured as: image

In Frigate, I pull in the streams via: image image

AlexxIT commented 1 month ago

Awful RTSP realisation is a common problem for Reolink brand https://github.com/AlexxIT/go2rtc?tab=readme-ov-file#source-rtsp

bmrowe commented 1 month ago

Thanks @AlexxIT - I have also tried configuring go2rtc as follows:

backyard_left:
      - ffmpeg:http://192.168.1.28/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=XXXX&password=XXXX#video=copy#audio=copy#audio=opus#hardware

I still get io timeouts. I did add debug rtsp logging and see EOF errors:

image

image

image

AlexxIT commented 1 month ago

FFmpeg also can't connect to your camera. You has some network issues.