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.66k stars 379 forks source link

Stream timeout and playback issues with cv2 and go2rtc #1183

Open ValentinMyasnikov opened 3 months ago

ValentinMyasnikov commented 3 months ago

Hello!

I am experiencing stream timeout issues and playback stopping when trying to display the same stream simultaneously using go2rtc and the cv2 library. The error message '[WARN:1@6146.097] global cap_ffmpeg_impl.hpp:453 _opencv_ffmpeg_interrupt_callback Stream timeout triggered after 30029.631708 ms' appears periodically. Streams sometimes stop as if they reached the end, even though they should be continuous. If I restart the video playback on a separate device, it resumes, indicating that the stream continues running without interruption.

Config:

api:
  listen: ":1234"
rtsp:
  listen: ":1235"
webrtc:
  listen: ":1236"
srtp:
  listen: ":1237"

streams:
  test_1: ffmpeg:video/Test_video_1.mp4#video=h264
  test_2: ffmpeg:video/Test_video_2.mp4#video=h264
  test_3: ffmpeg:video/Test_video_3.mp4#video=h264
  test_4: ffmpeg:video/Test_video.mp4#video=h264
  test_5: ffmpeg:video/Test_video_4.mp4#video=h264

So when I play the same stream on one device or multiple devices, some streams may stop due to the above error, but one may continue working without issues. Any advice or solutions would be appreciated. Thanks!

AlexxIT commented 3 months ago

You showing error from some external software not related to go2rtc. I don't know how to help you.