Closed Abkob closed 1 year ago
HELP I NEED TO MAKE THIS WORK
You can bypass the FFprobe step by specifying width
, height
, fps
, codec
and audio_codec
.
Lets say your camera is 1920x1080@6 fps with h264 codec and no audio, the config looks like this:
ffmpeg:
camera:
viseron_camera:
name: Camera 1
host: 192.168.1.XX
port: 554
path: /profile1
username: admin
password: adminXX
width: 1920
height: 1080
fps: 6
codec: h264
audio_codec: null
Nope i inputted the extra values in terms of height and width exc but alas : 2023-05-23 16:21:41 [2023-05-23 13:21:41] [INFO ] [viseron.components] - Setting up domain camera for component ffmpeg with identifier viseron_camera, attempt 3 2023-05-23 16:21:56 [2023-05-23 13:21:56] [ERROR ] [viseron.components.ffmpeg.stream.viseron_camera] - Retrying None in 2.0 seconds as it raised FFprobeTimeout: FFprobe command timed out after 15s. 2023-05-23 16:21:59 [2023-05-23 13:21:59] [ERROR ] [viseron.components.ffmpeg.stream.viseron_camera] - [rtsp @ 0x55839a34c540] method SETUP failed: 453 Not Enough Bandwidth 2023-05-23 16:21:59 [2023-05-23 13:21:59] [ERROR ] [viseron.components.ffmpeg.stream.viseron_camera] - rtsp://:@192.168.1.10:554/profile1: Server returned 4XX Client Error, but not one of 40{0,1,3,4} 2023-05-23 16:21:59 [2023-05-23 13:21:59] [ERROR ] [viseron.components] - Domain camera for component ffmpeg is not ready. Retrying in 30 seconds. Error: FFprobe could not connect to stream. Output: {'error': {'code': -1482175736, 'string': 'Server returned 4XX Client Error, but not one of 40{0,1,3,4}'}} ITS STILL GIVING THIS STUPID ERRORS thnx for the help man
Camera 1 - Retrying setup
FFprobe could not connect to stream. Output: {'error': {'code': -1482175736, 'string': 'Server returned 4XX Client Error, but not one of 40{0,1,3,4}'}}
ignore the not wnough bandwidth i was checking if the rtsp ulrl works via vlc( it does)
Can you show your config please? If you specify all the parameters that i listed, Viseron will not run FFprobe
i removed everything just to make the camera stream to isolate the problem : this is my whole config : ffmpeg: camera: viseron_camera: name: Camera 1 host: 192.168.1.10 port: 554 path: /profile1 username: admin password: admin1234 width: 1280 height: 720 fps: 6 codec: h264 audio_codec: null
its Tvt ip camera
thnx for the help man
Can you enabled debug logging, restart Viseron and paste the full log here?
To enable debug logging you add this to your config:
logger:
default_level: debug
sure
2023-05-23 16:34:36 [viseron-finish] Viseron exit code 100 2023-05-23 16:34:36 [2023-05-23 13:34:36] [INFO ] [viseron.core] - ------------------------------------------- 2023-05-23 16:34:36 [2023-05-23 13:34:36] [INFO ] [viseron.core] - Initializing Viseron 2023-05-23 16:34:36 [2023-05-23 13:34:36] [INFO ] [viseron.components] - Setting up component data_stream 2023-05-23 16:34:36 [2023-05-23 13:34:36] [INFO ] [viseron.components] - Setup of component data_stream took 0.0 seconds 2023-05-23 16:34:36 [2023-05-23 13:34:36] [INFO ] [viseron.components] - Setting up component webserver 2023-05-23 16:34:36 [2023-05-23 13:34:36] [INFO ] [viseron.components] - Setup of component webserver took 0.0 seconds 2023-05-23 16:34:36 [2023-05-23 13:34:36] [INFO ] [viseron.components] - Setting up component ffmpeg 2023-05-23 16:34:36 [2023-05-23 13:34:36] [INFO ] [viseron.components] - Setup of component ffmpeg took 0.0 seconds 2023-05-23 16:34:37 [2023-05-23 13:34:37] [WARNING ] [viseron.core] - Manually setting up component nvr with identifier viseron_camera. Consider adding it your config.yaml instead 2023-05-23 16:34:37 [2023-05-23 13:34:37] [INFO ] [viseron.components] - Setting up component nvr 2023-05-23 16:34:37 [2023-05-23 13:34:37] [INFO ] [viseron.components] - Setup of component nvr took 0.0 seconds 2023-05-23 16:34:37 [2023-05-23 13:34:37] [INFO ] [viseron.components] - Setting up domain camera for component ffmpeg with identifier viseron_camera 2023-05-23 16:34:37 [2023-05-23 13:34:37] [INFO ] [viseron.components] - Setting up domain nvr for component nvr with identifier viseron_camera 2023-05-23 16:34:37 [2023-05-23 13:34:37] [ERROR ] [viseron.components] - Error validating config for domain camera and component ffmpeg: extra keys not allowed @ data['viseron_camera']['logger']. Got None 2023-05-23 16:34:37 Traceback (most recent call last): 2023-05-23 16:34:37 File "/src/viseron/components/init.py", line 242, in validate_domain_config 2023-05-23 16:34:37 return domain_module.CONFIG_SCHEMA(config), None # type: ignore 2023-05-23 16:34:37 File "/usr/local/lib/python3.8/dist-packages/voluptuous/schema_builder.py", line 272, in call 2023-05-23 16:34:37 return self._compiled([], data) 2023-05-23 16:34:37 File "/usr/local/lib/python3.8/dist-packages/voluptuous/schema_builder.py", line 594, in validate_dict 2023-05-23 16:34:37 return base_validate(path, iteritems(data), out) 2023-05-23 16:34:37 File "/usr/local/lib/python3.8/dist-packages/voluptuous/schema_builder.py", line 432, in validate_mapping 2023-05-23 16:34:37 raise er.MultipleInvalid(errors) 2023-05-23 16:34:37 voluptuous.error.MultipleInvalid: extra keys not allowed @ data['viseron_camera']['logger'] 2023-05-23 16:34:37 [2023-05-23 13:34:37] [ERROR ] [viseron.components] - Setup of domain camera for component ffmpeg with identifier viseron_camera failed 2023-05-23 16:34:37 [2023-05-23 13:34:37] [ERROR ] [viseron.components] - Unable to setup dependencies for domain nvr for component nvr. Failed dependencies: ['domain: camera, identifier: viseron_camera'] 2023-05-23 16:34:37 [2023-05-23 13:34:37] [INFO ] [viseron.core] - Viseron initialized in 0.6 seconds
Camera 1 - Failed setup
Error validating config for domain camera and component ffmpeg: extra keys not allowed @ data['viseron_camera']['logger']. Got None
plus awesome software man i cant believe one man made all this
when i removed the debug line look it gives me this : 2023-05-23 16:44:11 [2023-05-23 13:44:11] [WARNING ] [tornado.access] - 404 GET /api/v1/camera/viseron_camera/snapshot?rand=n0d9l&width=447 (172.17.0.1) 0.62ms 2023-05-23 16:44:21 [2023-05-23 13:44:21] [WARNING ] [tornado.access] - 404 GET /api/v1/camera/viseron_camera/snapshot?rand=r9aye&width=447 (172.17.0.1) 0.76ms 2023-05-23 16:44:31 [2023-05-23 13:44:31] [WARNING ] [tornado.access] - 404 GET /api/v1/camera/viseron_camera/snapshot?rand=djp1e&width=447 (172.17.0.1) 0.83ms 2023-05-23 16:44:38 [2023-05-23 13:44:38] [WARNING ] [tornado.access] - 404 GET /api/v1/camera/viseron_camera/snapshot?rand=gj40r&width=447 (172.17.0.1) 0.92ms 2023-05-23 16:44:48 [2023-05-23 13:44:48] [WARNING ] [tornado.access] - 404 GET /api/v1/camera/viseron_camera/snapshot?rand=tzq6ug&width=447 (172.17.0.1) 0.64ms 2023-05-23 16:44:58 [2023-05-23 13:44:58] [WARNING ] [tornado.access] - 404 GET /api/v1/camera/viseron_camera/snapshot?rand=pzcrr&width=447 (172.17.0.1) 0.60ms 2023-05-23 16:45:10 [2023-05-23 13:45:10] [WARNING ] [tornado.access] - 404 GET /api/v1/camera/viseron_camera/snapshot?rand=wsezsj&width=447 (172.17.0.1) 0.66ms 2023-05-23 16:45:18 [2023-05-23 13:45:18] [WARNING ] [tornado.access] - 404 GET /viseron_camera/mjpeg-stream (172.17.0.1) 60071.71ms
and the video keeps loading with seemingly no output
https://github.com/roflcoopter/viseron/assets/104631518/9de12ed3-31c6-42e5-9acb-d4db1187a017 heres a video showing everything
logger
goes in the root of the config, not under ffmpeg
.
It should look like this:
ffmpeg:
camera:
viseron_camera:
name: Camera 1
host: 192.168.1.XX
port: 554
path: /profile1
username: admin
password: adminXX
width: 1920
height: 1080
fps: 6
codec: h264
audio_codec: null
logger:
default_level: debug
The reason why the UI image is just spinning is because you need at least one object and/or motion detector configured. Otherwise Viseron will not proces any frames and the UI wont receive any.
oh i see
https://github.com/roflcoopter/viseron/assets/104631518/dab50041-c365-492d-96e6-65b3ff0bb489
log :
2023-05-23 17:06:54 [2023-05-23 14:06:54] [INFO ] [viseron.components] - Setting up domain camera for component ffmpeg with identifier viseron_camera
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.states] - Adding entity Camera 1 Connected from component ffmpeg
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.components.data_stream] - Subscribing to data topic event/viseron_camera/camera/status, <bound method ConnectionStatusBinarySensor.handle_event of <viseron.domains.camera.entity.binary_sensor.ConnectionStatusBinarySensor object at 0x7f26f77e6e50>>
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.states] - Setting state of binary_sensor.viseron_camera_connected to state: off, attributes {'name': 'Camera 1 Connected', 'domain': 'binary_sensor'}
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.states] - Adding entity Camera 1 Connection from component ffmpeg
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.components.data_stream] - Subscribing to data topic event/viseron_camera/camera/start, <bound method CameraConnectionToggle.handle_start_event of <viseron.domains.camera.entity.toggle.CameraConnectionToggle object at 0x7f26f77ee0d0>>
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.components.data_stream] - Subscribing to data topic event/viseron_camera/camera/stop, <bound method CameraConnectionToggle.handle_stop_event of <viseron.domains.camera.entity.toggle.CameraConnectionToggle object at 0x7f26f77ee0d0>>
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.components.data_stream] - Subscribing to data topic event/viseron_camera/camera/started, <bound method CameraConnectionToggle.handle_started_stopped_event of <viseron.domains.camera.entity.toggle.CameraConnectionToggle object at 0x7f26f77ee0d0>>
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.components.data_stream] - Subscribing to data topic event/viseron_camera/camera/stopped, <bound method CameraConnectionToggle.handle_started_stopped_event of <viseron.domains.camera.entity.toggle.CameraConnectionToggle object at 0x7f26f77ee0d0>>
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.states] - Setting state of toggle.viseron_camera_connection to state: off, attributes {'name': 'Camera 1 Connection', 'domain': 'toggle'}
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.states] - Adding entity Camera 1 Access Token from component ffmpeg
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.states] - Setting state of sensor.viseron_camera_access_token to state: 59935f50d9c903ad0b48f516b7dba88c6045020c55762a6952e7a995d04437eb1de1d5168f952037660c6ceef3de654d5f61162dcd3b1696d4cebe096f5f81dd, attributes {'name': 'Camera 1 Access Token', 'domain': 'sensor'}
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.states] - Setting state of sensor.viseron_camera_access_token to state: 36fd485db5a6cc2256184a503179c403ccd7742eeea4af7bc04cf968380db7f14c26258ca72c41915c40e8889ebb2095aa6d94f649254d2ee03a1bab8f618e63, attributes {'name': 'Camera 1 Access Token', 'domain': 'sensor'}
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.components.ffmpeg.recorder.viseron_camera] - Running cleanup
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.states] - Adding entity Camera 1 Recorder from component ffmpeg
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.components.data_stream] - Subscribing to data topic event/viseron_camera/recorder/start, <bound method RecorderBinarySensor.handle_start_event of <viseron.domains.camera.entity.binary_sensor.RecorderBinarySensor object at 0x7f26f77f9d30>>
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.components.data_stream] - Subscribing to data topic event/viseron_camera/recorder/stop, <bound method RecorderBinarySensor.handle_stop_event of <viseron.domains.camera.entity.binary_sensor.RecorderBinarySensor object at 0x7f26f77f9d30>>
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.states] - Setting state of binary_sensor.viseron_camera_recorder to state: off, attributes {'name': 'Camera 1 Recorder', 'domain': 'binary_sensor'}
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.states] - Adding entity Camera 1 Latest Thumbnail from component ffmpeg
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.components.data_stream] - Subscribing to data topic event/viseron_camera/recorder/start, <bound method ThumbnailImage.handle_event of <viseron.domains.camera.entity.image.ThumbnailImage object at 0x7f26f77f9ee0>>
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.states] - Setting state of image.viseron_camera_latest_thumbnail to state: unknown, attributes {'name': 'Camera 1 Latest Thumbnail', 'domain': 'image', 'start_time': None, 'path': None, 'thumbnail_path': None}
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.components.ffmpeg.recorder.viseron_camera] - Initializing recorder
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.components.data_stream] - Subscribing to data topic viseron/signal/shutdown, <bound method SegmentCleanup.shutdown of <viseron.components.ffmpeg.segments.SegmentCleanup object at 0x7f26f77e6e80>>
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.components.ffmpeg.camera.viseron_camera] - Initializing camera Camera 1
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.components.ffmpeg.camera.viseron_camera] - Resolution: 2592x1944 @ 6 FPS
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.components.ffmpeg.camera.viseron_camera] - Camera Camera 1 initialized
2023-05-23 17:06:54 [2023-05-23 14:06:54] [DEBUG ] [viseron.core] - Registering domain camera with identifier viseron_camera
2023-05-23 17:06:54 [2023-05-23 14:06:54] [INFO ] [viseron.components] - Setup of domain camera for component ffmpeg with identifier viseron_camera took 0.0 seconds
2023-05-23 17:06:54 [2023-05-23 14:06:54] [INFO ] [viseron.core] - Viseron initialized in 0.7 seconds
2023-05-23 17:06:58 [2023-05-23 14:06:58] [DEBUG ] [viseron.components.webserver.websocket_api] - WebSocket opened
2023-05-23 17:06:58 [2023-05-23 14:06:58] [DEBUG ] [viseron.components.webserver.websocket_api] - Received {"type":"subscribe_event","event":"domain/registered/camera","command_id":1}
2023-05-23 17:06:58 [2023-05-23 14:06:58] [DEBUG ] [viseron.components.webserver.websocket_api] - Received {"type":"subscribe_event","event":"/recorder/complete","command_id":2}
2023-05-23 17:06:58 [2023-05-23 14:06:58] [DEBUG ] [viseron.components.data_stream] - Subscribing to data topic event/domain/registered/camera, <function subscribe_event.
now it just keeps on loading without showing any feed well thats progress i guess
" The reason why the UI image is just spinning is because you need at least one object and/or motion detector configured. Otherwise Viseron will not proces any frames and the UI wont receive any." I also added detectors as seen in the video still its not working
config in video : ffmpeg: camera: viseron_camera: name: Camera 1 host: 192.168.1.10 port: 554 path: /profile1 username: admin password: admin1234 width: 2592 height: 1944 fps: 6 codec: h264 audio_codec: null logger: default_level: debug
## Then add an object detector
darknet: object_detector: cameras: camera: # Attach detector to the configured camera above fps: 1 scan_on_motion_only: false # Scan for objects even when there is no motion labels:
mog2: motion_detector: cameras: camera: # Attach detector to the configured camera above fps: 1
nvr: camera: # Run NVR for camera_1
Your camera identifier is wrong for mog, darknet and nvr. It has to match what you put under ffmpeg.
Right now you have a camera identifier of camera_one
under ffmpeg
but for the rest of the components you use camera
.
Change them to be camera_one
and it should work.
I suggest you read through the docs which explains all of this: https://viseron.netlify.app/docs/documentation/configuration#camera-domain
Pro tip: when pasting your config, enclose it within triple back-ticks (```) to keep indentation. Its very hard for me to read your config when it is not formatted. Information on this here: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks
camera:
viseron_camera:
name: Camera 1
host: 192.168.1.10
port: 554
path: /profile1
username: admin
password: admin1234
width: 2592
height: 1944
fps: 6
codec: h264
audio_codec: null
logger:
default_level: debug
## Then add an object detector
darknet:
object_detector:
cameras:
camera: # Attach detector to the configured camera above
fps: 1
scan_on_motion_only: false # Scan for objects even when there is no motion
labels:
- label: person
confidence: 0.75
trigger_recorder: true
## You can also use motion detection
mog2:
motion_detector:
cameras:
camera: # Attach detector to the configured camera above
fps: 1
## To tie everything together we need to configure one more component.
nvr:
camera: # Run NVR for camera_1
# Now you can restart Viseron and you should be good to go!
i see ill fix it thnx or the pro tip
No problem!
It worked ! thank you really
[2023-05-23 11:25:52] [ERROR ] [viseron.components.ffmpeg.stream.viseron_camera] - Retrying None in 4.0 seconds as it raised FFprobeTimeout: FFprobe command timed out after 30s. I am trying to connect camera : ffmpeg: camera: viseron_camera: name: Camera 1 host: 192.168.1.XX port: 554 path: /profile1 username: admin password: adminXX BUT ITS NOT WOKRING KEEPS GIVING THE SAME ERROR****