viseron
viseron copied to clipboard
Cameras on wifi report "could not get stream info" after recent power outage
I have a total of 5 cameras on my system and after a recent power outage my two wifi cams consistently report "Could not get needed stream information. Missing at least on of ect ect"
I tried setting all values for height, width, fps and codec manually but Viseron still reports the exact same error for the wifi cams after restart
Nothing change in my config between the power outage and now and I've tried restarting the cams thinking maybe they are not responding to probe
Got a similar report here #691
Seems FFProbe is acting up. Not sure why it starts happening randomly. Will investigate if i can move to something else instead of FFprobe.
In the meantime you can get around the issue by following this #506 and specifying the options according to your camera
The error message is missleading, sorry about that. You need to specify width, height, fps, codec and audio_codec
Im guessing you are missing audio_codec. If your camera does not have audio you simply set audio_codec: null
This is my config section atm
width: 2560
height: 1440
fps: 30
codec: h265
audio_codec: null
for audio_codec ive so far tried null, aac, AAC
my stream is RTMP and I think should be AAC basec on the camera type
the weird thing is this only started after my power outage and only for wifi cams, ive been using Viseron for more than a year I think without issue
PS: i wasnt clear here, still can't get the feed to fire up, same error
Hmm interesting. Can you provide your full config as well as debug logs from the startup?
logger:
default_level: debug
Should this logger line be at the bottom of my config or included as a environment variable for the docker container?
This line for config. https://viseron.netlify.app/components-explorer/components/logger
Log below, the issue is with cameras 2 and 4 @roflcoopter
[2024-03-27 23:41:22] [INFO ] [viseron.components] - Setting up domain motion_detector for component mog2 with identifier camera_4
[2024-03-27 23:41:22] [INFO ] [viseron.components] - Setting up domain object_detector for component darknet with identifier camera_4
[2024-03-27 23:41:22] [INFO ] [viseron.components] - Setting up domain nvr for component nvr with identifier camera_4
[2024-03-27 23:41:22] [DEBUG ] [viseron.components.ffmpeg.stream.camera_3] - Getting stream information for rtmp://*****:*****@10.0.0.87:1935/bcs/channel0_main.bcs?token=sdasdasd&channel=0&stream=0&user=*****&password=*****
[2024-03-27 23:41:22] [DEBUG ] [viseron.components.ffmpeg.stream.camera_3] - FFprobe command: ffprobe -hide_banner -loglevel error -print_format json -show_error -show_entries stream=codec_type,codec_name,width,height,avg_frame_rate rtmp://*****:*****@10.0.0.87:1935/bcs/channel0_main.bcs?token=sdasdasd&channel=0&stream=0&user=*****&password=*****
[2024-03-27 23:41:22] [DEBUG ] [viseron.components.ffmpeg.stream.camera_2] - Stream information from FFprobe: Width: 2560 Height: 1440 FPS: 24 Video Codec: h265 Audio Codec: aac
[2024-03-27 23:41:22] [DEBUG ] [viseron.components.ffmpeg.stream.camera_2] - Getting stream information for rtmp://*****:*****@10.0.0.73:1935/bcs/channel0_sub.bcs?token=sdasdasd&channel=0&stream=0&user=*****&password=*****
[2024-03-27 23:41:22] [DEBUG ] [viseron.components.ffmpeg.stream.camera_2] - FFprobe command: ffprobe -hide_banner -loglevel error -print_format json -show_error -show_entries stream=codec_type,codec_name,width,height,avg_frame_rate rtmp://*****:*****@10.0.0.73:1935/bcs/channel0_sub.bcs?token=sdasdasd&channel=0&stream=0&user=*****&password=*****
[2024-03-27 23:41:22] [DEBUG ] [viseron.components.ffmpeg.stream.camera_4] - Getting stream information for rtmp://*****:*****@10.0.0.122:1935/bcs/channel0_main.bcs?token=sdasdasd&channel=0&stream=0&user=*****&password=*****
[2024-03-27 23:41:22] [DEBUG ] [viseron.components.ffmpeg.stream.camera_4] - FFprobe command: ffprobe -hide_banner -loglevel error -print_format json -show_error -show_entries stream=codec_type,codec_name,width,height,avg_frame_rate rtmp://*****:*****@10.0.0.122:1935/bcs/channel0_main.bcs?token=sdasdasd&channel=0&stream=0&user=*****&password=*****
[2024-03-27 23:41:22] [DEBUG ] [viseron.components.ffmpeg.stream.camera_1] - Getting stream information for rtmp://*****:*****@10.0.0.180:1935/bcs/channel0_main.bcs?token=sdasdasd&channel=0&stream=0&user=*****&password=*****
[2024-03-27 23:41:22] [DEBUG ] [viseron.components.ffmpeg.stream.camera_1] - FFprobe command: ffprobe -hide_banner -loglevel error -print_format json -show_error -show_entries stream=codec_type,codec_name,width,height,avg_frame_rate rtmp://*****:*****@10.0.0.180:1935/bcs/channel0_main.bcs?token=sdasdasd&channel=0&stream=0&user=*****&password=*****
[2024-03-27 23:41:26] [DEBUG ] [viseron.components.ffmpeg.stream.camera_1] - Stream information from FFprobe: Width: 2560 Height: 1920 FPS: 11 Video Codec: h264 Audio Codec: aac
[2024-03-27 23:41:26] [DEBUG ] [viseron.components.ffmpeg.stream.camera_1] - Getting stream information for rtmp://*****:*****@10.0.0.180:1935/bcs/channel0_sub.bcs?token=sdasdasd&channel=0&stream=0&user=*****&password=*****
[2024-03-27 23:41:26] [DEBUG ] [viseron.components.ffmpeg.stream.camera_1] - FFprobe command: ffprobe -hide_banner -loglevel error -print_format json -show_error -show_entries stream=codec_type,codec_name,width,height,avg_frame_rate rtmp://*****:*****@10.0.0.180:1935/bcs/channel0_sub.bcs?token=sdasdasd&channel=0&stream=0&user=*****&password=*****
[2024-03-27 23:41:26] [DEBUG ] [viseron.components.ffmpeg.stream.camera_4] - Stream information from FFprobe: Width: 2560 Height: 1440 FPS: 9 Video Codec: h264 Audio Codec: aac
[2024-03-27 23:41:26] [DEBUG ] [viseron.components.ffmpeg.stream.camera_4] - Getting stream information for rtmp://*****:*****@10.0.0.122:1935/bcs/channel0_sub.bcs?token=sdasdasd&channel=0&stream=0&user=*****&password=*****
[2024-03-27 23:41:26] [DEBUG ] [viseron.components.ffmpeg.stream.camera_4] - FFprobe command: ffprobe -hide_banner -loglevel error -print_format json -show_error -show_entries stream=codec_type,codec_name,width,height,avg_frame_rate rtmp://*****:*****@10.0.0.122:1935/bcs/channel0_sub.bcs?token=sdasdasd&channel=0&stream=0&user=*****&password=*****
[2024-03-27 23:41:27] [DEBUG ] [viseron.components.ffmpeg.stream.camera_3] - Stream information from FFprobe: Width: 2560 Height: 1920 FPS: 16 Video Codec: h264 Audio Codec: aac
[2024-03-27 23:41:27] [DEBUG ] [viseron.components.ffmpeg.stream.camera_3] - Getting stream information for rtmp://*****:*****@10.0.0.87:1935/bcs/channel0_sub.bcs?token=sdasdasd&channel=0&stream=0&user=*****&password=*****
[2024-03-27 23:41:27] [DEBUG ] [viseron.components.ffmpeg.stream.camera_3] - FFprobe command: ffprobe -hide_banner -loglevel error -print_format json -show_error -show_entries stream=codec_type,codec_name,width,height,avg_frame_rate rtmp://*****:*****@10.0.0.87:1935/bcs/channel0_sub.bcs?token=sdasdasd&channel=0&stream=0&user=*****&password=*****
[2024-03-27 23:41:31] [DEBUG ] [viseron.components.ffmpeg.stream.camera_2] - Stream information from FFprobe: Width: 640 Height: 352 FPS: 0 Video Codec: h264 Audio Codec: aac
[2024-03-27 23:41:31] [ERROR ] [viseron.components] - Uncaught exception setting up domain camera for component ffmpeg: Could not get needed stream information. Missing at least one of width, height, fps or codec. You can specify the missing information in the config to circumvent this. Width: 640 Height: 352 FPS: 0 Codec: h264
Traceback (most recent call last):
File "/src/viseron/components/__init__.py", line 418, in setup_domain
result = domain_module.setup(
File "/src/viseron/components/ffmpeg/camera.py", line 304, in setup
Camera(vis, config[identifier], identifier)
File "/src/viseron/components/ffmpeg/camera.py", line 319, in __init__
self.stream = Stream(config, self, identifier)
File "/src/viseron/components/ffmpeg/stream.py", line 113, in __init__
self._substream = self.get_stream_information(config[CONFIG_SUBSTREAM])
File "/src/viseron/components/ffmpeg/stream.py", line 260, in get_stream_information
raise StreamInformationError(width, height, fps, codec)
viseron.exceptions.StreamInformationError: Could not get needed stream information. Missing at least one of width, height, fps or codec. You can specify the missing information in the config to circumvent this. Width: 640 Height: 352 FPS: 0 Codec: h264
[2024-03-27 23:41:31] [ERROR ] [viseron.components] - Setup of domain camera for component ffmpeg with identifier camera_2 failed
[2024-03-27 23:41:31] [ERROR ] [viseron.components] - Unable to setup dependencies for domain motion_detector for component mog2. Failed dependencies: ['domain: camera, identifier: camera_2']
[2024-03-27 23:41:31] [ERROR ] [viseron.components] - Unable to setup dependencies for domain object_detector for component darknet. Failed dependencies: ['domain: camera, identifier: camera_2', 'domain: motion_detector, identifier: camera_2']
[2024-03-27 23:41:31] [ERROR ] [viseron.components] - Unable to setup dependencies for domain nvr for component nvr. Failed dependencies: ['domain: camera, identifier: camera_2', 'domain: motion_detector, identifier: camera_2', 'domain: object_detector, identifier: camera_2']
[2024-03-27 23:41:31] [DEBUG ] [viseron.components.ffmpeg.stream.camera_1] - Stream information from FFprobe: Width: 640 Height: 480 FPS: 14 Video Codec: h264 Audio Codec: aac
[2024-03-27 23:41:31] [DEBUG ] [viseron.components.ffmpeg.recorder.camera_1] - Running cleanup
[2024-03-27 23:41:31] [DEBUG ] [viseron.components.ffmpeg.recorder.camera_1] - Items in /recordings/camera_1/2024-03-21: 10
[2024-03-27 23:41:31] [DEBUG ] [viseron.components.ffmpeg.recorder.camera_1] - Items in /recordings/camera_1/2024-03-27: 22
[2024-03-27 23:41:31] [DEBUG ] [viseron.components.ffmpeg.recorder.camera_1] - Items in /recordings/camera_1/2024-03-26: 10
[2024-03-27 23:41:31] [DEBUG ] [viseron.components.ffmpeg.recorder.camera_1] - Items in /recordings/camera_1/2024-03-24: 6
[2024-03-27 23:41:31] [DEBUG ] [viseron.components.ffmpeg.recorder.camera_1] - Items in /recordings/camera_1/2024-03-22: 20
[2024-03-27 23:41:31] [DEBUG ] [viseron.components.ffmpeg.recorder.camera_1] - Items in /recordings/camera_1/2024-03-23: 12
[2024-03-27 23:41:31] [DEBUG ] [viseron.components.ffmpeg.recorder.camera_1] - Items in /recordings/camera_1/2024-03-25: 10
[2024-03-27 23:41:31] [DEBUG ] [viseron.components.ffmpeg.recorder.camera_1] - Initializing recorder
[2024-03-27 23:41:31] [DEBUG ] [viseron.components.ffmpeg.camera.camera_1] - Initializing camera Front Yard
[2024-03-27 23:41:31] [DEBUG ] [viseron.components.ffmpeg.camera.camera_1] - Resolution: 640x480 @ 14 FPS
[2024-03-27 23:41:31] [DEBUG ] [viseron.components.ffmpeg.camera.camera_1] - Camera Front Yard initialized
[2024-03-27 23:41:31] [INFO ] [viseron.components] - Setup of domain camera for component ffmpeg with identifier camera_1 took 9.5 seconds
[2024-03-27 23:41:31] [INFO ] [viseron.components] - Setup of domain motion_detector for component mog2 with identifier camera_1 took 0.0 seconds
[2024-03-27 23:41:31] [INFO ] [viseron.components] - Setup of domain object_detector for component darknet with identifier camera_1 took 0.0 seconds
[2024-03-27 23:41:31] [DEBUG ] [viseron.components.ffmpeg.camera.camera_1] - Starting capture thread
[2024-03-27 23:41:31] [DEBUG ] [viseron.components.ffmpeg.stream.camera_1] - FFmpeg decoder command: ffmpeg_camera_1 -hide_banner -loglevel error -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts -use_wallclock_as_timestamps 1 -vsync 0 -rw_timeout 5000000 -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -i rtmp://*****:*****@10.0.0.180:1935/bcs/channel0_sub.bcs?token=sdasdasd&channel=0&stream=0&user=*****&password=***** -vf fps=2.0 -f rawvideo -pix_fmt nv12 pipe:1
[2024-03-27 23:41:31] [DEBUG ] [viseron.components.ffmpeg.stream.camera_1] - FFmpeg segments command: ffmpeg_camera_1_seg -hide_banner -loglevel error -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts -use_wallclock_as_timestamps 1 -vsync 0 -rw_timeout 5000000 -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -i rtmp://*****:*****@10.0.0.180:1935/bcs/channel0_main.bcs?token=sdasdasd&channel=0&stream=0&user=*****&password=***** -f segment -segment_time 5 -reset_timestamps 1 -strftime 1 -c:v copy -c:a copy /segments/camera_1/%Y%m%d%H%M%S.mp4
[2024-03-27 23:41:31] [INFO ] [viseron.components.nvr.nvr.camera_1] - NVR for camera Front Yard initialized
[2024-03-27 23:41:31] [INFO ] [viseron.components] - Setup of domain nvr for component nvr with identifier camera_1 took 0.0 seconds
[2024-03-27 23:41:32] [DEBUG ] [viseron.components.ffmpeg.stream.camera_3] - Stream information from FFprobe: Width: 640 Height: 480 FPS: 12 Video Codec: h264 Audio Codec: aac
[2024-03-27 23:41:32] [DEBUG ] [viseron.components.ffmpeg.recorder.camera_3] - Running cleanup
[2024-03-27 23:41:32] [DEBUG ] [viseron.components.ffmpeg.recorder.camera_3] - Items in /recordings/camera_3/2024-03-21: 8
[2024-03-27 23:41:32] [DEBUG ] [viseron.components.ffmpeg.recorder.camera_3] - Items in /recordings/camera_3/2024-03-27: 4
[2024-03-27 23:41:32] [DEBUG ] [viseron.components.ffmpeg.recorder.camera_3] - Items in /recordings/camera_3/2024-03-26: 4
[2024-03-27 23:41:32] [DEBUG ] [viseron.components.ffmpeg.recorder.camera_3] - Items in /recordings/camera_3/2024-03-24: 4
[2024-03-27 23:41:32] [DEBUG ] [viseron.components.ffmpeg.recorder.camera_3] - Items in /recordings/camera_3/2024-03-22: 2
[2024-03-27 23:41:32] [DEBUG ] [viseron.components.ffmpeg.recorder.camera_3] - Items in /recordings/camera_3/2024-03-23: 10
[2024-03-27 23:41:32] [DEBUG ] [viseron.components.ffmpeg.recorder.camera_3] - Items in /recordings/camera_3/2024-03-25: 14
[2024-03-27 23:41:32] [DEBUG ] [viseron.components.ffmpeg.recorder.camera_3] - Initializing recorder
[2024-03-27 23:41:32] [DEBUG ] [viseron.components.ffmpeg.camera.camera_3] - Initializing camera Back Yard
[2024-03-27 23:41:32] [DEBUG ] [viseron.components.ffmpeg.camera.camera_3] - Resolution: 640x480 @ 12 FPS
[2024-03-27 23:41:32] [DEBUG ] [viseron.components.ffmpeg.camera.camera_3] - Camera Back Yard initialized
[2024-03-27 23:41:32] [INFO ] [viseron.components] - Setup of domain camera for component ffmpeg with identifier camera_3 took 10.3 seconds
[2024-03-27 23:41:32] [INFO ] [viseron.components] - Setup of domain motion_detector for component mog2 with identifier camera_3 took 0.0 seconds
[2024-03-27 23:41:32] [INFO ] [viseron.components] - Setup of domain object_detector for component darknet with identifier camera_3 took 0.0 seconds
[2024-03-27 23:41:32] [DEBUG ] [viseron.components.ffmpeg.camera.camera_3] - Starting capture thread
[2024-03-27 23:41:32] [DEBUG ] [viseron.components.ffmpeg.stream.camera_3] - FFmpeg decoder command: ffmpeg_camera_3 -hide_banner -loglevel error -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts -use_wallclock_as_timestamps 1 -vsync 0 -rw_timeout 5000000 -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -i rtmp://*****:*****@10.0.0.87:1935/bcs/channel0_sub.bcs?token=sdasdasd&channel=0&stream=0&user=*****&password=***** -vf fps=2.0 -f rawvideo -pix_fmt nv12 pipe:1
[2024-03-27 23:41:32] [DEBUG ] [viseron.components.ffmpeg.stream.camera_3] - FFmpeg segments command: ffmpeg_camera_3_seg -hide_banner -loglevel error -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts -use_wallclock_as_timestamps 1 -vsync 0 -rw_timeout 5000000 -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -i rtmp://*****:*****@10.0.0.87:1935/bcs/channel0_main.bcs?token=sdasdasd&channel=0&stream=0&user=*****&password=***** -f segment -segment_time 5 -reset_timestamps 1 -strftime 1 -c:v copy -c:a copy /segments/camera_3/%Y%m%d%H%M%S.mp4
[2024-03-27 23:41:32] [INFO ] [viseron.components.nvr.nvr.camera_3] - NVR for camera Back Yard initialized
[2024-03-27 23:41:32] [INFO ] [viseron.components] - Setup of domain nvr for component nvr with identifier camera_3 took 0.0 seconds
[2024-03-27 23:41:34] [DEBUG ] [viseron.components.ffmpeg.stream.camera_4] - Stream information from FFprobe: Width: 640 Height: 352 FPS: 0 Video Codec: h264 Audio Codec: aac
[2024-03-27 23:41:34] [ERROR ] [viseron.components] - Uncaught exception setting up domain camera for component ffmpeg: Could not get needed stream information. Missing at least one of width, height, fps or codec. You can specify the missing information in the config to circumvent this. Width: 640 Height: 352 FPS: 0 Codec: h264
Traceback (most recent call last):
File "/src/viseron/components/__init__.py", line 418, in setup_domain
result = domain_module.setup(
File "/src/viseron/components/ffmpeg/camera.py", line 304, in setup
Camera(vis, config[identifier], identifier)
File "/src/viseron/components/ffmpeg/camera.py", line 319, in __init__
self.stream = Stream(config, self, identifier)
File "/src/viseron/components/ffmpeg/stream.py", line 113, in __init__
self._substream = self.get_stream_information(config[CONFIG_SUBSTREAM])
File "/src/viseron/components/ffmpeg/stream.py", line 260, in get_stream_information
raise StreamInformationError(width, height, fps, codec)
viseron.exceptions.StreamInformationError: Could not get needed stream information. Missing at least one of width, height, fps or codec. You can specify the missing information in the config to circumvent this. Width: 640 Height: 352 FPS: 0 Codec: h264
[2024-03-27 23:41:34] [ERROR ] [viseron.components] - Setup of domain camera for component ffmpeg with identifier camera_4 failed
[2024-03-27 23:41:34] [ERROR ] [viseron.components] - Unable to setup dependencies for domain motion_detector for component mog2. Failed dependencies: ['domain: camera, identifier: camera_4']
[2024-03-27 23:41:34] [ERROR ] [viseron.components] - Unable to setup dependencies for domain object_detector for component darknet. Failed dependencies: ['domain: camera, identifier: camera_4', 'domain: motion_detector, identifier: camera_4']
[2024-03-27 23:41:34] [ERROR ] [viseron.components] - Unable to setup dependencies for domain nvr for component nvr. Failed dependencies: ['domain: camera, identifier: camera_4', 'domain: motion_detector, identifier: camera_4', 'domain: object_detector, identifier: camera_4']
[2024-03-27 23:41:34] [INFO ] [viseron.core] - Viseron initialized in 13.4 seconds
FFprobe sometimes fails to get the needed stream information, or the camera does not report it properly. Sadly nothing i can do about that from Viserons perspective
To remedy this you can manually specify width, height, fps and codec in the config to avoid these issues in the future
@roflcoopter
Lastcyear the first thing you had me try was manually setting what youndescribed, we diwcussed it above last year, when that didnt work you asked me for the logs above
This is my config section atm
width: 2560 height: 1440 fps: 30 codec: h265 audio_codec: null
for audio_codec ive so far tried null, aac, AAC
my stream is RTMP and I think should be AAC basec on the camera type
the weird thing is this only started after my power outage and only for wifi cams, ive been using Viseron for more than a year I think without issue
PS: i wasnt clear here, still can't get the feed to fire up, same error
After this follow up, you asked me for these logs, but you are telling me to apply the same solution again
Ahh sorry about that!
Will check if something is different when attempting to reconnect with the stream information.
Are you by any chance using a substream? Judging from your logs it appears so. In that case, you need to set the stream information for that one as well.
Should be something like this:
ffmpeg:
camera:
camera_2:
...rest of your config
width: 2560
height: 1440
fps: 30
codec: h265
audio_codec: null
substream:
...rest of your config
width: 640
height: 352
fps: ??? # This is what seems to be reported as 0 from your camera which is causing issues
codec: h265
audio_codec: null
If that doesnt work out either, please post your full config