Describe the problem you are having
I have 2 different anpviz cameras set up as rtsp cameras in frigate. I managed to successfully display the rtsp video feed of both.
I decided to enable go2rtc recently, as I wanted a more lightweight approach to displaying the videostreams on Home Assistant. After reading the documentation, I managed to set it up on one camera but not on the other one.
The one that is working was originally set up to publish one main stream and one substream. The one that is not working well is configured to display 3 streams (main, Sub-stream, third stream). The reason for this is that when running detection on the sub-stream, the resolution offered by the sub-stream was low and the system would create false positives. I yesterday reached out to the vendor and they confirm the camera is able to handle 4 channels.
As I thought I could be facing a resource starvation, I started considering leveraging restreaming the video feed. The reason why I create this issue is I'm unable to get this second camera to properly restream the video feed, while its sibling is working just fine.
For testing purposes I even switched off the sub-stream channel, before registering this issue but the problem still happens.
In a nutshell:
- The camera that I have managed to get working with webrtc is not doing restreaming
- The camera that does not work, despite being a very similar model (not the very same one) is not working without restreaming
- I can't get the camera that does not work to restream, in order to avoid resource starvation on the camera
Does anybody know whether my configuration file is incorrectly configured? the problematic camera is the one with name anpviz-camera-dome-comedor.
Port 8554 is enabled in the Frigate add-on in home assistant.
Version
0.12
Frigate config file
mqtt:
host: 192.168.1.5
user: USER
password: PASSWORD
birdseye:
enabled: True
mode: motion
go2rtc:
streams:
anpviz-camera-dome-comedor:
- rtsp://192.168.1.31:554/stream0
- "ffmpeg:anpviz-camera-dome-comedor#audio=opus"
anpviz-camera-dome-comedor_sub:
- rtsp://192.168.1.31:554/stream2
- "ffmpeg:anpviz-camera-dome-comedor_sub#audio=opus"
anpviz-camera-dome-recibidor:
- rtsp://192.168.1.32:554/stream0
cameras:
anpviz-camera-dome-comedor:
ffmpeg:
hwaccel_args: preset-intel-qsv-h264
output_args:
record: preset-record-generic-audio-copy
inputs:
- path: rtsp://127.0.0.1:8554/anpviz-camera-dome-comedor
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/anpviz-camera-dome-comedor_sub
input_args: preset-rtsp-restream
roles:
- detect
objects:
track:
- person
detect:
enabled: false
width: 1280
height: 720
fps: 5
snapshots:
enabled: true
timestamp: true
bounding_box: true
retain:
default: 7
record:
enabled: True
events:
retain:
default: 14
mode: active_objects
anpviz-camera-dome-recibidor:
ffmpeg:
hwaccel_args: preset-intel-qsv-h264
inputs:
- path: rtsp://192.168.1.32:554/stream0
roles:
- record
- path: rtsp://192.168.1.32:554/stream1
roles:
- detect
objects:
track:
- person
detect:
enabled: false
width: 720
height: 480
fps: 5
motion:
mask:
- 453,170,459,204,482,198,498,182,509,154,518,103,511,82,489,79,469,87
snapshots:
enabled: true
timestamp: true
bounding_box: true
retain:
default: 7
record:
enabled: True
events:
retain:
default: 14
mode: active_objects
detectors:
coral:
type: edgetpu
device: usb
Relevant log output
2023-11-28 23:05:40.795955333 [2023-11-29 00:05:40] frigate.video ERROR : anpviz-camera-dome-comedor: Unable to read frames from ffmpeg process.
2023-11-28 23:05:40.796584262 [2023-11-29 00:05:40] frigate.video ERROR : anpviz-camera-dome-comedor: ffmpeg process is not running. exiting capture thread...
2023-11-28 23:05:55.709205065 [2023-11-29 00:05:55] watchdog.anpviz-camera-dome-comedor ERROR : Ffmpeg process crashed unexpectedly for anpviz-camera-dome-comedor.
2023-11-28 23:05:55.709288568 [2023-11-29 00:05:55] watchdog.anpviz-camera-dome-comedor ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-28 23:05:55.709405683 [2023-11-29 00:05:55] ffmpeg.anpviz-camera-dome-comedor.detect ERROR : rtsp://127.0.0.1:8554/anpviz-camera-dome-comedor_sub: Invalid data found when processing input
2023-11-28 23:05:55.716936923 [2023-11-29 00:05:55] ffmpeg.anpviz-camera-dome-comedor.record ERROR : rtsp://127.0.0.1:8554/anpviz-camera-dome-comedor: Invalid data found when processing input
2023-11-28 23:05:55.720336730 [2023-11-29 00:05:55] watchdog.anpviz-camera-dome-comedor INFO : Terminating the existing ffmpeg process...
2023-11-28 23:05:55.720496995 [2023-11-29 00:05:55] watchdog.anpviz-camera-dome-comedor INFO : Waiting for ffmpeg to exit gracefully...
2023-11-28 23:06:11.241165815 [2023-11-29 00:06:11] frigate.video ERROR : anpviz-camera-dome-comedor: ffmpeg process is not running. exiting capture thread...
2023-11-28 23:06:15.759231901 [2023-11-29 00:06:15] watchdog.anpviz-camera-dome-comedor ERROR : Ffmpeg process crashed unexpectedly for anpviz-camera-dome-comedor.
2023-11-28 23:06:15.759547155 [2023-11-29 00:06:15] watchdog.anpviz-camera-dome-comedor ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-28 23:06:15.759845658 [2023-11-29 00:06:15] ffmpeg.anpviz-camera-dome-comedor.detect ERROR : [rtsp @ 0x5596a09113c0] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
2023-11-28 23:06:15.760372175 [2023-11-29 00:06:15] ffmpeg.anpviz-camera-dome-comedor.detect ERROR : Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
2023-11-28 23:06:15.760795788 [2023-11-29 00:06:15] ffmpeg.anpviz-camera-dome-comedor.detect ERROR : Output file #0 does not contain any stream
2023-11-28 23:06:15.781941753 [2023-11-29 00:06:15] ffmpeg.anpviz-camera-dome-comedor.record ERROR : [rtsp @ 0x55e6a2e01500] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
2023-11-28 23:06:15.782031525 [2023-11-29 00:06:15] ffmpeg.anpviz-camera-dome-comedor.record ERROR : Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
2023-11-28 23:06:15.782107196 [2023-11-29 00:06:15] ffmpeg.anpviz-camera-dome-comedor.record ERROR : Output file #0 does not contain any stream
2023-11-28 23:06:15.782182969 [2023-11-29 00:06:15] watchdog.anpviz-camera-dome-comedor INFO : Terminating the existing ffmpeg process...
2023-11-28 23:06:15.782275108 [2023-11-29 00:06:15] watchdog.anpviz-camera-dome-comedor INFO : Waiting for ffmpeg to exit gracefully...
2023-11-28 23:06:20.910626311 [2023-11-29 00:06:20] frigate.video ERROR : anpviz-camera-dome-comedor: Unable to read frames from ffmpeg process.
2023-11-28 23:06:20.910654471 [2023-11-29 00:06:20] frigate.video ERROR : anpviz-camera-dome-comedor: ffmpeg process is not running. exiting capture thread...
### Frigate stats
_No response_
### Operating system
Debian
### Install method
HassOS Addon
### Coral version
Other
### Any other information that may be helpful
_No response_
Describe the problem you are having
I have 2 different anpviz cameras set up as rtsp cameras in frigate. I managed to successfully display the rtsp video feed of both.
I decided to enable go2rtc recently, as I wanted a more lightweight approach to displaying the videostreams on Home Assistant. After reading the documentation, I managed to set it up on one camera but not on the other one.
The one that is working was originally set up to publish one main stream and one substream. The one that is not working well is configured to display 3 streams (main, Sub-stream, third stream). The reason for this is that when running detection on the sub-stream, the resolution offered by the sub-stream was low and the system would create false positives. I yesterday reached out to the vendor and they confirm the camera is able to handle 4 channels.
As I thought I could be facing a resource starvation, I started considering leveraging restreaming the video feed. The reason why I create this issue is I'm unable to get this second camera to properly restream the video feed, while its sibling is working just fine.
For testing purposes I even switched off the sub-stream channel, before registering this issue but the problem still happens.
In a nutshell:
Does anybody know whether my configuration file is incorrectly configured? the problematic camera is the one with name anpviz-camera-dome-comedor.
Port 8554 is enabled in the Frigate add-on in home assistant.
Version
0.12
Frigate config file
Relevant log output