Closed pierg75 closed 2 years ago
Could you show the full debug logs from Viseron startup?
I actually got it working (at least the cameras) by using --network=host
on the podman line (sorry forgot to say I'm using podman and not docker). I really need to review the networking model for these containers. I guess we can close this, sorry for the noise.
I actually got it working (at least the cameras) by using
--network=host
on the podman line (sorry forgot to say I'm using podman and not docker). I really need to review the networking model for these containers. I guess we can close this, sorry for the noise.
Ahh i see, great you got it working! No worries, let me know if you face any other issues.
I'm having this issue also, and I don't want to use host
mode networking. I am able to ping the camera from inside the container, but ffprobe
hangs forever.
root@f942ccf5e773:/src# ping -c1 10.0.0.224
PING 10.0.0.224 (10.0.0.224): 56 data bytes
64 bytes from 10.0.0.224: icmp_seq=0 ttl=63 time=2.453 ms
--- 10.0.0.224 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/stddev = 2.453/2.453/2.453/0.000 ms
Seems like docker isn't forwarding ports properly somehow? This works fine with my Frigate container, incidentally.
Could you show your config and debug logs please?
Yes, here is my docker-compose config:
viseron:
image: roflcoopter/amd64-cuda-viseron:latest
volumes:
- ./viseron/recordings:/recordings
- ./viseron/config:/config
- /etc/localtime:/etc/localtime:ro
ports:
- 8888:8888
runtime: nvidia
privileged: true
devices:
- /dev/bus/usb:/dev/bus/usb
environment:
PUID: ${UID}
PGID: ${GID}
Viseron camera config:
ffmpeg:
camera:
cat_tree:
name: Cat Tree
host: 10.0.0.224
port: 554
path: /live
username: admin
password: password
stream_format: rtsp
protocol: rtsp
And a snippet of the logs from the Viseron container:
docker-viseron-1 | [2023-05-06 11:09:37] [INFO ] [viseron.core] - -------------------------------------------
docker-viseron-1 | [2023-05-06 11:09:37] [INFO ] [viseron.core] - Initializing Viseron
docker-viseron-1 | [2023-05-06 11:09:37] [INFO ] [viseron.components] - Setting up component data_stream
docker-viseron-1 | [2023-05-06 11:09:37] [INFO ] [viseron.components] - Setup of component data_stream took 0.0 seconds
docker-viseron-1 | [2023-05-06 11:09:37] [INFO ] [viseron.components] - Setting up component webserver
docker-viseron-1 | [2023-05-06 11:09:37] [INFO ] [viseron.components] - Setup of component webserver took 0.0 seconds
docker-viseron-1 | [2023-05-06 11:09:37] [INFO ] [viseron.components] - Setting up component mog2
docker-viseron-1 | [2023-05-06 11:09:37] [INFO ] [viseron.components] - Setting up component ffmpeg
docker-viseron-1 | [2023-05-06 11:09:37] [INFO ] [viseron.components] - Setting up component darknet
docker-viseron-1 | [2023-05-06 11:09:37] [INFO ] [viseron.components] - Setting up component nvr
docker-viseron-1 | [2023-05-06 11:09:37] [INFO ] [viseron.components] - Setup of component nvr took 0.0 seconds
docker-viseron-1 | [2023-05-06 11:09:37] [INFO ] [viseron.components] - Setup of component mog2 took 0.0 seconds
docker-viseron-1 | [2023-05-06 11:09:37] [INFO ] [viseron.components] - Setup of component ffmpeg took 0.0 seconds
docker-viseron-1 | [2023-05-06 11:09:39] [INFO ] [viseron.components] - Setup of component darknet took 2.0 seconds
docker-viseron-1 | [2023-05-06 11:09:39] [INFO ] [viseron.components] - Setting up domain camera for component ffmpeg with identifier cat_tree
docker-viseron-1 | [2023-05-06 11:09:39] [INFO ] [viseron.components] - Setting up domain motion_detector for component mog2 with identifier cat_tree
docker-viseron-1 | [2023-05-06 11:09:39] [INFO ] [viseron.components] - Setting up domain object_detector for component darknet with identifier cat_tree
docker-viseron-1 | [2023-05-06 11:09:39] [INFO ] [viseron.components] - Setting up domain nvr for component nvr with identifier cat_tree
docker-viseron-1 | [2023-05-06 11:09:54] [ERROR ] [viseron.components.ffmpeg.stream.cat_tree] - Retrying None in 2.0 seconds as it raised FFprobeTimeout: FFprobe command timed out after 15s.
---snip---
docker-viseron-1 | [2023-05-05 21:53:32] [ERROR ] [viseron.components.ffmpeg.stream.cat_tree] - Retrying None in 30.0 seconds as it raised FFprobeTimeout: FFprobe command timed out after 75s.
docker-viseron-1 | [2023-05-05 21:53:47] [WARNING ] [viseron.components] - Domain nvr for component nvr with identifier cat_tree is still waiting for dependencies: ['domain: camera, identifier: cat_tree', 'domain: object_detector, identifier: cat_tree', 'domain: motion_detector, identifier: cat_tree']
docker-viseron-1 | [2023-05-05 21:53:47] [WARNING ] [viseron.components] - Domain object_detector for component darknet with identifier cat_tree is still waiting for dependencies: ['domain: camera, identifier: cat_tree', 'domain: motion_detector, identifier: cat_tree']
docker-viseron-1 | [2023-05-05 21:53:47] [WARNING ] [viseron.components] - Domain motion_detector for component mog2 with identifier cat_tree is still waiting for dependencies: ['domain: camera, identifier: cat_tree']
docker-viseron-1 | [2023-05-05 21:54:26] [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 or fps. Width: 0 Height: 0 FPS: 0
docker-viseron-1 | Traceback (most recent call last):
docker-viseron-1 | File "/src/viseron/components/__init__.py", line 407, in setup_domain
docker-viseron-1 | result = domain_module.setup(
docker-viseron-1 | File "/src/viseron/components/ffmpeg/camera.py", line 295, in setup
docker-viseron-1 | Camera(vis, config[identifier], identifier)
docker-viseron-1 | File "/src/viseron/components/ffmpeg/camera.py", line 310, in __init__
docker-viseron-1 | self.stream = Stream(config, self, identifier)
docker-viseron-1 | File "/src/viseron/components/ffmpeg/stream.py", line 142, in __init__
docker-viseron-1 | raise StreamInformationError(self.width, self.height, self.fps)
docker-viseron-1 | viseron.exceptions.StreamInformationError: Could not get needed stream information. Missing at least one of width, height or fps. Width: 0 Height: 0 FPS: 0
Let me know if you need more log output.
I resolved this (sort of) by running ffprobe
from the host and manually specifying the needed arguments. So the streams work now. Unclear why ffprobe
wasn't working.
Great that you got it sorted. I don't know why ffprobe is acting up, might need to look at alternative ways to get stream information
I wanted to try viseron and when I configured a couple of cameras, I always get:
Howver, if I check the ffmpeg debug logs it says:
And if I try manually from the same host where the container is run, it seems to work normally: