[Bug]: Video stops updating after random period of time #13047
-
Describe the problem you are havingAfter some time of having the video stream open, it stops working. In both full screen mode as well as the overview when live video is enabled with active ongoing movement. This can sometimes take 10 minutes, sometimes an hour, but eventually the video stops updating and never starts again - even with movement being actively detected by frigate. I have had this issue before on 0.13 when viewing a camera in MSE, so I switched the camera to WebRTC and it ran 24 hours no problem, every day. Unfortunately it seems in 0.14 I can no longer force WebRTC and the intelligent stream selection favors MSE, which would explain the issue. All cameras are RTSP streams, that I restream through go2rtc. I have both a Coral TPU as well as a Quadro P2000 for acceleration, which are both utilised and work fine just like they did in 0.13 I should mention that MSE streams have been problematic for me on multiple devices, Chrome in Linux as well as Android. So this is not a client problem with a specific device. Steps to reproduceOpen a video stream (that presumably uses MSE?), wait between several minutes and an hour, video will stop updating. Version0.14.0 Frigate config filerecord:
enabled: true
retain:
days: 7
mode: all
events:
retain:
default: 30
mode: active_objects
detect:
enabled: true
width: 1280
height: 720
fps: 5
max_disappeared: 25
stationary:
interval: 50
threshold: 50
max_frames:
default: 3000
objects:
person: 1000
detectors:
coral:
type: edgetpu
device: usb
objects:
track:
- person
birdseye:
enabled: true
mode: continuous
width: 1920
height: 1080
mqtt:
enabled: true
host: 192.168.0.11
port: 1883
user: frigate
password: 123456
ffmpeg:
output_args:
record: preset-record-generic-audio-aac
go2rtc:
streams:
bedroom:
- ffmpeg:rtsp://admin:[email protected]:554/stream1#input=rtsp/udp#video=h264#audio=aac#hardware=cuda
bedroom_sub:
- ffmpeg:rtsp://admin:[email protected]:554/stream2#input=rtsp/udp#video=h264#audio=aac#hardware=cuda
babyroom:
- ffmpeg:rtsp://admin:[email protected]:554/stream1#input=rtsp/udp#video=h264#audio=aac#hardware=cuda
babyroom_sub:
- ffmpeg:rtsp://admin:[email protected]:554/stream2#input=rtsp/udp#video=h264#audio=aac#hardware=cuda
livingroom:
- ffmpeg:rtsp://admin:[email protected]:554/stream1#input=rtsp/udp#video=h264#audio=aac#hardware=cuda
livingroom_sub:
- ffmpeg:rtsp://admin:[email protected]:554/stream2#input=rtsp/udp#video=h264#audio=aac#hardware=cuda
livingroom2:
- ffmpeg:rtsp://admin:[email protected]:554/stream1#input=rtsp/udp#video=h264#audio=aac#hardware=cuda
livingroom2_sub:
- ffmpeg:rtsp://admin:[email protected]:554/stream2#input=rtsp/udp#video=h264#audio=aac#hardware=cuda
office:
- ffmpeg:rtsp://admin:[email protected]:554/stream1#input=rtsp/udp#video=h264#audio=aac#hardware=cuda
office_sub:
- ffmpeg:rtsp://admin:[email protected]:554/stream2#input=rtsp/udp#video=h264#audio=aac#hardware=cuda
kitchen:
- ffmpeg:rtsp://admin:[email protected]:554/stream1#input=rtsp/udp#video=h264#audio=aac#hardware=cuda
kitchen_sub:
- ffmpeg:rtsp://admin:[email protected]:554/stream2#input=rtsp/udp#video=h264#audio=aac#hardware=cuda
hallway:
- ffmpeg:rtsp://admin:[email protected]:554/stream1#input=rtsp/udp#video=h264#audio=aac#hardware=cuda
hallway_sub:
- ffmpeg:rtsp://admin:[email protected]:554/stream2#input=rtsp/udp#video=h264#audio=aac#hardware=cuda
webrtc:
candidates:
- 192.168.0.10:8555
- stun:8555
cameras:
bedroom:
enabled: true
birdseye:
order: 6
ffmpeg:
hwaccel_args: preset-nvidia-h264
inputs:
- path: rtsp://192.168.0.10:8554/bedroom
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://192.168.0.10:8554/bedroom_sub
input_args: preset-rtsp-restream
roles:
- detect
detect:
width: 800
height: 448
motion:
mask: 0.007,0.076,0.008,0.004,0.207,0.011,0.206,0.063
livingroom:
enabled: true
birdseye:
order: 2
ffmpeg:
hwaccel_args: preset-nvidia-h264
inputs:
- path: rtsp://192.168.0.10:8554/livingroom
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://192.168.0.10:8554/livingroom_sub
input_args: preset-rtsp-restream
roles:
- detect
detect:
width: 800
height: 448
motion:
mask:
- 0.007,0.07,0.21,0.072,0.219,0.004,0.014,-0.001
- 0.068,0.285,0.054,0.134,0.224,0.134,0.227,0.252
hallway:
enabled: true
birdseye:
order: 5
ffmpeg:
hwaccel_args: preset-nvidia-h264
inputs:
- path: rtsp://192.168.0.10:8554/hallway
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://192.168.0.10:8554/hallway_sub
input_args: preset-rtsp-restream
roles:
- detect
detect:
width: 800
height: 448
motion:
mask: 0.01,0.072,0.008,0.007,0.219,0.004,0.217,0.063
livingroom2:
enabled: true
birdseye:
order: 1
ffmpeg:
hwaccel_args: preset-nvidia-h264
inputs:
- path: rtsp://192.168.0.10:8554/livingroom2
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://192.168.0.10:8554/livingroom2_sub
input_args: preset-rtsp-restream
roles:
- detect
detect:
width: 800
height: 448
motion:
mask: 0.003,0.074,0.219,0.059,0.213,-0.005,0.004,-0.001
kitchen:
enabled: true
birdseye:
order: 3
ffmpeg:
hwaccel_args: preset-nvidia-h264
inputs:
- path: rtsp://192.168.0.10:8554/kitchen
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://192.168.0.10:8554/kitchen_sub
input_args: preset-rtsp-restream
roles:
- detect
detect:
width: 800
height: 448
motion:
mask: 0.005,0.001,0.222,0.007,0.224,0.078,0.009,0.088
babyroom:
enabled: true
birdseye:
order: 8
ffmpeg:
hwaccel_args: preset-nvidia-h264
inputs:
- path: rtsp://192.168.0.10:8554/babyroom
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://192.168.0.10:8554/babyroom_sub
input_args: preset-rtsp-restream
roles:
- detect
detect:
width: 800
height: 448
motion:
mask: 0.006,0.013,0.212,0.004,0.217,0.08,0.005,0.07
entrance:
enabled: true
birdseye:
order: 4
ffmpeg:
hwaccel_args: preset-nvidia-h265
inputs:
- path: rtsp://admin:[email protected]:554/onvif1
input_args: -rtsp_transport udp
roles:
- record
- detect
detect:
width: 800
height: 448
office:
enabled: true
birdseye:
order: 7
ffmpeg:
hwaccel_args: preset-nvidia-h264
inputs:
- path: rtsp://192.168.0.10:8554/office
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://192.168.0.10:8554/office_sub
input_args: preset-rtsp-restream
roles:
- detect
detect:
width: 800
height: 448
motion:
mask: 0.005,0.076,0.219,0.063,0.212,0.003,0.008,0.004
version: 0.14
camera_groups:
Bedrooms:
order: 1
icon: LuBed
cameras:
- babyroom
- bedroom Relevant log outputThere is nothing in the logs when this issue happens. Operating systemOther Linux Install methodDocker Compose Network connectionWired Camera make and modelHamrol 4K 8MP Fisheye IP Security Camera (PoE) Any other information that may be helpfulAs mentioned in #12695 one possibility would be to give us back a setting to prefer WebRTC over MSE? I believe that could already fix the issue for me, although we might still want to figure out why MSE keeps cutting out after some time. Which may be entirely something within my setup, but I could not figure out what. I had the same problem with previous cameras as well, MSE never worked stable for extended periods of time for me, while WebRTC worked perfectly in my setup. On another note I have to say, despite my complaints: 0.14 is a massive step up from 0.13 and you have my respects for such an incredible update. It makes frigate infinitely more usable and I love it. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 19 replies
-
There are a few possibilities why this might be happening. In Frigate, navigate to the live stream of a single camera. Open your browser dev tools to the Network pane, select the You should see video data coming through the socket. When the video stops visually, do you see this data still streaming? It'd be helpful to see a screenshot of the first few entries of this pane as well, just as you start streaming a single camera. |
Beta Was this translation helpful? Give feedback.
-
Additionally, if you could use Chrome for this test and in another tab, open |
Beta Was this translation helpful? Give feedback.
-
I have a PR up (#13143) with these improvements and more that should mitigate your issues. If you're still having problems, let me know and we can debug further. Thanks for your help to test this code! |
Beta Was this translation helpful? Give feedback.
I have a PR up (#13143) with these improvements and more that should mitigate your issues. If you're still having problems, let me know and we can debug further. Thanks for your help to test this code!