Comments (12)
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
from viseron.
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
from viseron.
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
from viseron.
Hmm interesting.
Can you provide your full config as well as debug logs from the startup?
logger:
default_level: debug
from viseron.
Should this logger line be at the bottom of my config or included as a environment variable for the docker container?
from viseron.
This line for config. https://viseron.netlify.app/components-explorer/components/logger
from viseron.
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
from viseron.
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
from viseron.
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
from viseron.
Ahh sorry about that!
from viseron.
Will check if something is different when attempting to reconnect with the stream information.
from viseron.
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
from viseron.
Related Issues (20)
- Trouble getting one RTMP REOLINK camera going - error - invalid data found when processing input HOT 2
- How to turn off recording。 HOT 1
- Need more graphics drivers and/or newer VA-API? HOT 15
- Requested feature to use a `custom_model` per camera? HOT 3
- How to make two AI detection models work under one camera.
- file permission setting for recording folders and files HOT 2
- How to make two AI detection models work under one camera. HOT 1
- Right path to add in the config file for IP webcam HOT 1
- Using a local usb webcam? HOT 5
- Issues connecting MQTT with Home assistant HOT 1
- Happy with Viseron but... HOT 1
- Restart RSTP Stream HOT 4
- Help setup motion detection recording HOT 3
- 461 Transport Unsupported HOT 1
- Failed to load license plate HOT 2
- Externally Trigger Motion Event
- Failed to retrieve result for object_detector (Failed to initialize Inference Engine backend (device = GPU)) HOT 2
- codeproject.ai face_recognition no entity HOT 1
- Mask is completely being ignored... HOT 2
- Add camera for image feed HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from viseron.