Closed weitheng closed 3 years ago
Currently its not supported but its on my todo list. The thing is, i dont have a Jetson Nano so i depend on that other people can help me and run some tests.
If you are willing to stick around and run some simple tests for me when i need it i could start with this right now!
Currently its not supported but its on my todo list. The thing is, i dont have a Jetson Nano so i depend on that other people can help me and run some tests.
If you are willing to stick around and run some simple tests for me when i need it i could start with this right now!
Yes of course! Happy to contribute :)
Currently its not supported but its on my todo list. The thing is, i dont have a Jetson Nano so i depend on that other people can help me and run some tests. If you are willing to stick around and run some simple tests for me when i need it i could start with this right now!
Yes of course! Happy to contribute :)
Okay so i took a first stab at this and it seems more complicated than i thought. The problem is that i use Ubuntu 20.04 for all my base images, but NVIDIA has decided to stop supporting the Jetson Nano so the latest officially supported OS is Ubuntu 20.04.
I tried to get around this however and would need you to test if this works: docker run -it --rm --runtime=nvidia roflcoopter/jetson-nano-ffmpeg:4.4 ffmpeg --help
Currently its not supported but its on my todo list. The thing is, i dont have a Jetson Nano so i depend on that other people can help me and run some tests. If you are willing to stick around and run some simple tests for me when i need it i could start with this right now!
Yes of course! Happy to contribute :)
Okay so i took a first stab at this and it seems more complicated than i thought. The problem is that i use Ubuntu 20.04 for all my base images, but NVIDIA has decided to stop supporting the Jetson Nano so the latest officially supported OS is Ubuntu 20.04.
I tried to get around this however and would need you to test if this works: docker run -it --rm --runtime=nvidia roflcoopter/jetson-nano-ffmpeg:4.4 ffmpeg --help
Yeah it sucks that NVIDIA will no longer be supporting the latest OS on Jetson Nano :( Anyway,I tried running the command just now, but seems like I will have to get back to you in a week or so as I have run out of storage space, will need to get another larger micro-SD card before I can test this out. I will do whatever I can to get it up and running ASAP, as I am excited to be running this on my device
I see, i was afraid that would happen! Ill see what i can do to reduce the image size
My new SD card arrived! I decided to do a fresh install with Ubuntu 20.04 image on my Jetson Nano since NVIDIA will not support further firmware upgrade. I tried running the command, but got this message:
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Error: Can't initialize nvrm channel
Error: Can't initialize nvrm channel
Couldn't create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession
I suspect it could be because the architecture (it shouldn't be amd64?) is not right. But could it be because I am running Ubuntu 20.04?
I think the architecture warning is just a bug in docker, the image is arm64, so I don't think you need to worry about that.
Can you try running the container with --privileged? So docker run -it --rm --runtime=nvidia --privileged roflcoopter/jetson-nano-ffmpeg:4.4 ffmpeg --help
It still doesn't run. If you prefer me running Ubuntu 18.04, please let me know
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
ffmpeg version 8d172d9 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 7 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
configuration: --enable-nvmpi
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Getting help:
-h -- print basic options
-h long -- print more options
-h full -- print all options (including all format and codec specific options, very long)
-h type=name -- print all options for the named decoder/encoder/demuxer/muxer/filter/bsf/protocol
See man ffmpeg for detailed description of the options.
Print help / information / capabilities:
-L show license
-h topic show help
-? topic show help
-help topic show help
--help topic show help
-version show version
-buildconf show build configuration
-formats show available formats
-muxers show available muxers
-demuxers show available demuxers
-devices show available devices
-codecs show available codecs
-decoders show available decoders
-encoders show available encoders
-bsfs show available bit stream filters
-protocols show available protocols
-filters show available filters
-pix_fmts show available pixel formats
-layouts show standard channel layouts
-sample_fmts show available audio sample formats
-colors show available color names
-sources device list sources of the input device
-sinks device list sinks of the output device
-hwaccels show available HW acceleration methods
Global options (affect whole program instead of just one file):
-loglevel loglevel set logging level
-v loglevel set logging level
-report generate a report
-max_alloc bytes set maximum size of a single allocated block
-y overwrite output files
-n never overwrite output files
-ignore_unknown Ignore unknown stream types
-filter_threads number of non-complex filter threads
-filter_complex_threads number of threads for -filter_complex
-stats print progress report during encoding
-max_error_rate maximum error rate ratio of decoding errors (0.0: no errors, 1.0: 100% errors) above which ffmpeg returns an error instead of success.
-bits_per_raw_sample number set the number of bits per raw sample
-vol volume change audio volume (256=normal)
Per-file main options:
-f fmt force format
-c codec codec name
-codec codec codec name
-pre preset preset name
-map_metadata outfile[,metadata]:infile[,metadata] set metadata information of outfile from infile
-t duration record or transcode "duration" seconds of audio/video
-to time_stop record or transcode stop time
-fs limit_size set the limit file size in bytes
-ss time_off set the start time offset
-sseof time_off set the start time offset relative to EOF
-seek_timestamp enable/disable seeking by timestamp with -ss
-timestamp time set the recording timestamp ('now' to set the current time)
-metadata string=string add metadata
-program title=string:st=number... add program with specified streams
-target type specify target file type ("vcd", "svcd", "dvd", "dv" or "dv50" with optional prefixes "pal-", "ntsc-" or "film-")
-apad audio pad
-frames number set the number of frames to output
-filter filter_graph set stream filtergraph
-filter_script filename read stream filtergraph description from a file
-reinit_filter reinit filtergraph on input parameter changes
-discard discard
-disposition disposition
Video options:
-vframes number set the number of video frames to output
-r rate set frame rate (Hz value, fraction or abbreviation)
-fpsmax rate set max frame rate (Hz value, fraction or abbreviation)
-s size set frame size (WxH or abbreviation)
-aspect aspect set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)
-bits_per_raw_sample number set the number of bits per raw sample
-vn disable video
-vcodec codec force video codec ('copy' to copy stream)
-timecode hh:mm:ss[:;.]ff set initial TimeCode value.
-pass n select the pass number (1 to 3)
-vf filter_graph set video filters
-ab bitrate audio bitrate (please use -b:a)
-b bitrate video bitrate (please use -b:v)
-dn disable data
Audio options:
-aframes number set the number of audio frames to output
-aq quality set audio quality (codec-specific)
-ar rate set audio sampling rate (in Hz)
-ac channels set number of audio channels
-an disable audio
-acodec codec force audio codec ('copy' to copy stream)
-vol volume change audio volume (256=normal)
-af filter_graph set audio filters
Subtitle options:
-s size set frame size (WxH or abbreviation)
-sn disable subtitle
-scodec codec force subtitle codec ('copy' to copy stream)
-stag fourcc/tag force subtitle tag/fourcc
-fix_sub_duration fix subtitles duration
-canvas_size size set canvas size (WxH or abbreviation)
-spre preset set the subtitle options to the indicated preset
That actually looks correct, the command I asked you to run was just ffmpeg --help
.
Can you try to connect to your camera and see if the hardware accelerated decoding works? Let me know if you need help with writing the command
Ahh I see. Here's my docker-compose code
version: '2.4'
services:
viseron:
container_name: viseron
privileged: true
image: roflcoopter/jetson-nano-ffmpeg:4.4
restart: unless-stopped
runtime: nvidia
volumes:
- /home/jetson/Downloads/Viseron/config:/config
- /home/jetson/Downloads/Viseron/recordings:/recordings
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
Am I supposed to get an exit code 0 when running?
viseron is up-to-date
Attaching to viseron
viseron exited with code 0
And also, how do I enable VAAPI? is it just another line with
devices:
- /dev/dri:/dev/dri
Ahh I see. Here's my docker-compose code
version: '2.4' services: viseron: container_name: viseron privileged: true image: roflcoopter/jetson-nano-ffmpeg:4.4 restart: unless-stopped runtime: nvidia volumes: - /home/jetson/Downloads/Viseron/config:/config - /home/jetson/Downloads/Viseron/recordings:/recordings - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro
Am I supposed to get an exit code 0 when running?
viseron is up-to-date Attaching to viseron viseron exited with code 0
And also, how do I enable VAAPI? is it just another line with
devices: - /dev/dri:/dev/dri
I might have been a little bit unclear.
roflcoopter/jetson-nano-ffmpeg:4.4
only contains FFmpeg, its not the full image of Viseron.
I just needed you to test out if FFmpeg worked or not before i started building out the rest of the containers since they depend on FFmpeg working. Also FFmpeg is the hardest part to get working.
But it seems that FFmpeg works. I will let you know when the full image is ready to test, it will probably take a few more days to complete
Edit: I dont think VAAPI is supported on the Nano but i might be wrong
Ahh I see. Here's my docker-compose code
version: '2.4' services: viseron: container_name: viseron privileged: true image: roflcoopter/jetson-nano-ffmpeg:4.4 restart: unless-stopped runtime: nvidia volumes: - /home/jetson/Downloads/Viseron/config:/config - /home/jetson/Downloads/Viseron/recordings:/recordings - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro
Am I supposed to get an exit code 0 when running?
viseron is up-to-date Attaching to viseron viseron exited with code 0
And also, how do I enable VAAPI? is it just another line with
devices: - /dev/dri:/dev/dri
I might have been a little bit unclear.
roflcoopter/jetson-nano-ffmpeg:4.4
only contains FFmpeg, its not the full image of Viseron. I just needed you to test out if FFmpeg worked or not before i started building out the rest of the containers since they depend on FFmpeg working. Also FFmpeg is the hardest part to get working.But it seems that FFmpeg works. I will let you know when the full image is ready to test, it will probably take a few more days to complete
Edit: I dont think VAAPI is supported on the Nano but i might be wrong
Okay, got it. But do you need me to include my cameras in the config, so that the FFmpeg can be tested?
Edit: Not sure whether I need to test it now. But I have tested it with this config, got the same message viseron exited with code 0
. Hopefully that's helpful.
mqtt:
broker: 192.168.X.XX
port: 1883
client_id: viseron
user: XXX
password: XXXX
cameras:
- name: Foyer
mqtt_name: viseron_foyer
host: 192.168.X.XX
port: 554
username: XXXX
password: XXXX
path: /cam/realmonitor?channel=1@subtype=0
width: 1920
height: 1080
fps: 5
motion_detection:
interval: 1
trigger_detector: false
object_detection:
interval: 1
labels:
- label: person
confidence: 0.9
substream:
port: 554
path: /cam/realmonitor?channel=1@subtype=1
fps: 3
width: 704
height: 576
Sorry for confusing you! ffmpeg is just a CLI program so the configuration wont have any effect on that.
However i thought it was easiest if i just finished everything off so now there is a full image called roflcoopter/jetson-nano-viseron:dev
To test it you can use this docker-compose:
version: '2.4'
services:
viseron:
container_name: viseron
privileged: true
image: roflcoopter/jetson-nano-viseron:dev
restart: unless-stopped
runtime: nvidia
volumes:
- /home/jetson/Downloads/Viseron/config:/config
- /home/jetson/Downloads/Viseron/recordings:/recordings
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
Wow, that's fast!
I tried running it just now. But it doesn't like something in my config file. I am using the same config I included above your reply.
Attaching to viseron
viseron | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
viseron | [s6-init] ensuring user provided files have correct perms...exited 0.
viseron | [fix-attrs.d] applying ownership & permissions fixes...
viseron | [fix-attrs.d] done.
viseron | [cont-init.d] executing container initialization scripts...
viseron | [cont-init.d] 10-adduser: executing...
viseron | ************************ UID/GID *************************
viseron | User uid: 0
viseron | User gid: 0
viseron | ************************** Done **************************
viseron | [cont-init.d] 10-adduser: exited 0.
viseron | [cont-init.d] 20-gid-video-device: executing...
viseron | [cont-init.d] 20-gid-video-device: exited 0.
viseron | [cont-init.d] 30-edgetpu-permission: executing...
viseron | ************** Setting EdgeTPU permissions ***************
viseron | Coral Vendor IDs:
viseron | "1a6e"
viseron | "18d1"
viseron | No EdgeTPU USB device was found
viseron | ************************** Done **************************
viseron | [cont-init.d] 30-edgetpu-permission: exited 0.
viseron | [cont-init.d] 40-set-env-vars: executing...
viseron | ****** Checking for hardware acceleration platforms ******
viseron | OpenCL cannot be used
viseron | VA-API cannot be used
viseron | CUDA cannot be used
viseron | *********************** Done *****************************
viseron | [cont-init.d] 40-set-env-vars: exited 0.
viseron | [cont-init.d] 50-check-if-rpi: executing...
viseron | ********** Checking if we are running on an RPi **********
viseron | Not running on any supported RPi
viseron | *********************** Done *****************************
viseron | [cont-init.d] 50-check-if-rpi: exited 0.
viseron | [cont-init.d] done.
viseron | [services.d] starting services
viseron | [services.d] done.
viseron | Traceback (most recent call last):
viseron | File "/usr/local/lib/python3.8/runpy.py", line 185, in _run_module_as_main
viseron | mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
viseron | File "/usr/local/lib/python3.8/runpy.py", line 144, in _get_module_details
viseron | return _get_module_details(pkg_main_name, error)
viseron | File "/usr/local/lib/python3.8/runpy.py", line 111, in _get_module_details
viseron | __import__(pkg_name)
viseron | File "/src/viseron/__init__.py", line 8, in <module>
viseron | from viseron.config import CONFIG, NVRConfig, ViseronConfig
viseron | File "/src/viseron/config/__init__.py", line 93, in <module>
viseron | raw_config = load_config()
viseron | File "/src/viseron/config/__init__.py", line 69, in load_config
viseron | return yaml.load(config_file, Loader=yaml.SafeLoader)
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/__init__.py", line 114, in load
viseron | return loader.get_single_data()
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/constructor.py", line 49, in get_single_data
viseron | node = self.get_single_node()
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 36, in get_single_node
viseron | document = self.compose_document()
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 55, in compose_document
viseron | node = self.compose_node(None, None)
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 84, in compose_node
viseron | node = self.compose_mapping_node(anchor)
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 133, in compose_mapping_node
viseron | item_value = self.compose_node(node, item_key)
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 82, in compose_node
viseron | node = self.compose_sequence_node(anchor)
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 111, in compose_sequence_node
viseron | node.value.append(self.compose_node(node, index))
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 84, in compose_node
viseron | node = self.compose_mapping_node(anchor)
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 127, in compose_mapping_node
viseron | while not self.check_event(MappingEndEvent):
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/parser.py", line 98, in check_event
viseron | self.current_event = self.state()
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/parser.py", line 438, in parse_block_mapping_key
viseron | raise ParserError("while parsing a block mapping", self.marks[-1],
viseron | yaml.parser.ParserError: while parsing a block mapping
viseron | in "/config/config.yaml", line 17, column 5
viseron | expected <block end>, but found '<block mapping start>'
viseron | in "/config/config.yaml", line 35, column 6
viseron | [cont-finish.d] executing container finish scripts...
viseron | [cont-finish.d] done.
viseron | [s6-finish] waiting for services.
viseron | [s6-finish] sending all processes the TERM signal.
viseron | [s6-finish] sending all processes the KILL signal and exiting.
viseron | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
viseron | [s6-init] ensuring user provided files have correct perms...exited 0.
viseron | [fix-attrs.d] applying ownership & permissions fixes...
viseron | [fix-attrs.d] done.
viseron | [cont-init.d] executing container initialization scripts...
viseron | [cont-init.d] 10-adduser: executing...
viseron | usermod: no changes
viseron | ************************ UID/GID *************************
viseron | User uid: 0
viseron | User gid: 0
viseron | ************************** Done **************************
viseron | [cont-init.d] 10-adduser: exited 0.
viseron | [cont-init.d] 20-gid-video-device: executing...
viseron | [cont-init.d] 20-gid-video-device: exited 0.
viseron | [cont-init.d] 30-edgetpu-permission: executing...
viseron | ************** Setting EdgeTPU permissions ***************
viseron | Coral Vendor IDs:
viseron | "1a6e"
viseron | "18d1"
viseron | No EdgeTPU USB device was found
viseron | ************************** Done **************************
viseron | [cont-init.d] 30-edgetpu-permission: exited 0.
viseron | [cont-init.d] 40-set-env-vars: executing...
viseron | ****** Checking for hardware acceleration platforms ******
viseron | OpenCL cannot be used
viseron | VA-API cannot be used
viseron | CUDA cannot be used
viseron | *********************** Done *****************************
viseron | [cont-init.d] 40-set-env-vars: exited 0.
viseron | [cont-init.d] 50-check-if-rpi: executing...
viseron | ********** Checking if we are running on an RPi **********
viseron | Not running on any supported RPi
viseron | *********************** Done *****************************
viseron | [cont-init.d] 50-check-if-rpi: exited 0.
viseron | [cont-init.d] done.
viseron | [services.d] starting services
viseron | [services.d] done.
viseron | Traceback (most recent call last):
viseron | File "/usr/local/lib/python3.8/runpy.py", line 185, in _run_module_as_main
viseron | mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
viseron | File "/usr/local/lib/python3.8/runpy.py", line 144, in _get_module_details
viseron | return _get_module_details(pkg_main_name, error)
viseron | File "/usr/local/lib/python3.8/runpy.py", line 111, in _get_module_details
viseron | __import__(pkg_name)
viseron | File "/src/viseron/__init__.py", line 8, in <module>
viseron | from viseron.config import CONFIG, NVRConfig, ViseronConfig
viseron | File "/src/viseron/config/__init__.py", line 93, in <module>
viseron | raw_config = load_config()
viseron | File "/src/viseron/config/__init__.py", line 69, in load_config
viseron | return yaml.load(config_file, Loader=yaml.SafeLoader)
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/__init__.py", line 114, in load
viseron | return loader.get_single_data()
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/constructor.py", line 49, in get_single_data
viseron | node = self.get_single_node()
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 36, in get_single_node
viseron | document = self.compose_document()
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 55, in compose_document
viseron | node = self.compose_node(None, None)
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 84, in compose_node
viseron | node = self.compose_mapping_node(anchor)
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 133, in compose_mapping_node
viseron | item_value = self.compose_node(node, item_key)
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 82, in compose_node
viseron | node = self.compose_sequence_node(anchor)
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 111, in compose_sequence_node
viseron | node.value.append(self.compose_node(node, index))
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 84, in compose_node
viseron | node = self.compose_mapping_node(anchor)
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 127, in compose_mapping_node
viseron | while not self.check_event(MappingEndEvent):
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/parser.py", line 98, in check_event
viseron | self.current_event = self.state()
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/parser.py", line 438, in parse_block_mapping_key
viseron | raise ParserError("while parsing a block mapping", self.marks[-1],
viseron | yaml.parser.ParserError: while parsing a block mapping
viseron | in "/config/config.yaml", line 17, column 5
viseron | expected <block end>, but found '<block mapping start>'
viseron | in "/config/config.yaml", line 35, column 6
viseron | [cont-finish.d] executing container finish scripts...
viseron | [cont-finish.d] done.
viseron | [s6-finish] waiting for services.
viseron | [s6-finish] sending all processes the TERM signal.
viseron | [s6-finish] sending all processes the KILL signal and exiting.
viseron exited with code 0
viseron | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
viseron | [s6-init] ensuring user provided files have correct perms...exited 0.
viseron | [fix-attrs.d] applying ownership & permissions fixes...
viseron | [fix-attrs.d] done.
viseron | [cont-init.d] executing container initialization scripts...
viseron | [cont-init.d] 10-adduser: executing...
viseron | usermod: no changes
viseron | ************************ UID/GID *************************
viseron | User uid: 0
viseron | User gid: 0
viseron | ************************** Done **************************
viseron | [cont-init.d] 10-adduser: exited 0.
viseron | [cont-init.d] 20-gid-video-device: executing...
viseron | [cont-init.d] 20-gid-video-device: exited 0.
viseron | [cont-init.d] 30-edgetpu-permission: executing...
viseron | ************** Setting EdgeTPU permissions ***************
viseron | Coral Vendor IDs:
viseron | "1a6e"
viseron | "18d1"
viseron | No EdgeTPU USB device was found
viseron | ************************** Done **************************
viseron | [cont-init.d] 30-edgetpu-permission: exited 0.
viseron | [cont-init.d] 40-set-env-vars: executing...
viseron | ****** Checking for hardware acceleration platforms ******
viseron | OpenCL cannot be used
viseron | VA-API cannot be used
viseron | CUDA cannot be used
viseron | *********************** Done *****************************
viseron | [cont-init.d] 40-set-env-vars: exited 0.
viseron | [cont-init.d] 50-check-if-rpi: executing...
viseron | ********** Checking if we are running on an RPi **********
viseron | Not running on any supported RPi
viseron | *********************** Done *****************************
viseron | [cont-init.d] 50-check-if-rpi: exited 0.
viseron | [cont-init.d] done.
viseron | [services.d] starting services
viseron | [services.d] done.
viseron | Traceback (most recent call last):
viseron | File "/usr/local/lib/python3.8/runpy.py", line 185, in _run_module_as_main
viseron | mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
viseron | File "/usr/local/lib/python3.8/runpy.py", line 144, in _get_module_details
viseron | return _get_module_details(pkg_main_name, error)
viseron | File "/usr/local/lib/python3.8/runpy.py", line 111, in _get_module_details
viseron | __import__(pkg_name)
viseron | File "/src/viseron/__init__.py", line 8, in <module>
viseron | from viseron.config import CONFIG, NVRConfig, ViseronConfig
viseron | File "/src/viseron/config/__init__.py", line 93, in <module>
viseron | raw_config = load_config()
viseron | File "/src/viseron/config/__init__.py", line 69, in load_config
viseron | return yaml.load(config_file, Loader=yaml.SafeLoader)
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/__init__.py", line 114, in load
viseron | return loader.get_single_data()
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/constructor.py", line 49, in get_single_data
viseron | node = self.get_single_node()
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 36, in get_single_node
viseron | document = self.compose_document()
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 55, in compose_document
viseron | node = self.compose_node(None, None)
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 84, in compose_node
viseron | node = self.compose_mapping_node(anchor)
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 133, in compose_mapping_node
viseron | item_value = self.compose_node(node, item_key)
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 82, in compose_node
viseron | node = self.compose_sequence_node(anchor)
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 111, in compose_sequence_node
viseron | node.value.append(self.compose_node(node, index))
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 84, in compose_node
viseron | node = self.compose_mapping_node(anchor)
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 127, in compose_mapping_node
viseron | while not self.check_event(MappingEndEvent):
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/parser.py", line 98, in check_event
viseron | self.current_event = self.state()
viseron | File "/usr/local/lib/python3.8/site-packages/yaml/parser.py", line 438, in parse_block_mapping_key
viseron | raise ParserError("while parsing a block mapping", self.marks[-1],
viseron | yaml.parser.ParserError: while parsing a block mapping
viseron | in "/config/config.yaml", line 17, column 5
viseron | expected <block end>, but found '<block mapping start>'
viseron | in "/config/config.yaml", line 35, column 6
viseron | [cont-finish.d] executing container finish scripts...
viseron | [cont-finish.d] done.
viseron | [s6-finish] waiting for services.
viseron | [s6-finish] sending all processes the TERM signal.
viseron | [s6-finish] sending all processes the KILL signal and exiting.
viseron exited with code 0
Wow, that's fast!
I tried running it just now. But it doesn't like something in my config file. I am using the same config I included above your reply.
Attaching to viseron viseron | [s6-init] making user provided files available at /var/run/s6/etc...exited 0. viseron | [s6-init] ensuring user provided files have correct perms...exited 0. viseron | [fix-attrs.d] applying ownership & permissions fixes... viseron | [fix-attrs.d] done. viseron | [cont-init.d] executing container initialization scripts... viseron | [cont-init.d] 10-adduser: executing... viseron | ************************ UID/GID ************************* viseron | User uid: 0 viseron | User gid: 0 viseron | ************************** Done ************************** viseron | [cont-init.d] 10-adduser: exited 0. viseron | [cont-init.d] 20-gid-video-device: executing... viseron | [cont-init.d] 20-gid-video-device: exited 0. viseron | [cont-init.d] 30-edgetpu-permission: executing... viseron | ************** Setting EdgeTPU permissions *************** viseron | Coral Vendor IDs: viseron | "1a6e" viseron | "18d1" viseron | No EdgeTPU USB device was found viseron | ************************** Done ************************** viseron | [cont-init.d] 30-edgetpu-permission: exited 0. viseron | [cont-init.d] 40-set-env-vars: executing... viseron | ****** Checking for hardware acceleration platforms ****** viseron | OpenCL cannot be used viseron | VA-API cannot be used viseron | CUDA cannot be used viseron | *********************** Done ***************************** viseron | [cont-init.d] 40-set-env-vars: exited 0. viseron | [cont-init.d] 50-check-if-rpi: executing... viseron | ********** Checking if we are running on an RPi ********** viseron | Not running on any supported RPi viseron | *********************** Done ***************************** viseron | [cont-init.d] 50-check-if-rpi: exited 0. viseron | [cont-init.d] done. viseron | [services.d] starting services viseron | [services.d] done. viseron | Traceback (most recent call last): viseron | File "/usr/local/lib/python3.8/runpy.py", line 185, in _run_module_as_main viseron | mod_name, mod_spec, code = _get_module_details(mod_name, _Error) viseron | File "/usr/local/lib/python3.8/runpy.py", line 144, in _get_module_details viseron | return _get_module_details(pkg_main_name, error) viseron | File "/usr/local/lib/python3.8/runpy.py", line 111, in _get_module_details viseron | __import__(pkg_name) viseron | File "/src/viseron/__init__.py", line 8, in <module> viseron | from viseron.config import CONFIG, NVRConfig, ViseronConfig viseron | File "/src/viseron/config/__init__.py", line 93, in <module> viseron | raw_config = load_config() viseron | File "/src/viseron/config/__init__.py", line 69, in load_config viseron | return yaml.load(config_file, Loader=yaml.SafeLoader) viseron | File "/usr/local/lib/python3.8/site-packages/yaml/__init__.py", line 114, in load viseron | return loader.get_single_data() viseron | File "/usr/local/lib/python3.8/site-packages/yaml/constructor.py", line 49, in get_single_data viseron | node = self.get_single_node() viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 36, in get_single_node viseron | document = self.compose_document() viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 55, in compose_document viseron | node = self.compose_node(None, None) viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 84, in compose_node viseron | node = self.compose_mapping_node(anchor) viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 133, in compose_mapping_node viseron | item_value = self.compose_node(node, item_key) viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 82, in compose_node viseron | node = self.compose_sequence_node(anchor) viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 111, in compose_sequence_node viseron | node.value.append(self.compose_node(node, index)) viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 84, in compose_node viseron | node = self.compose_mapping_node(anchor) viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 127, in compose_mapping_node viseron | while not self.check_event(MappingEndEvent): viseron | File "/usr/local/lib/python3.8/site-packages/yaml/parser.py", line 98, in check_event viseron | self.current_event = self.state() viseron | File "/usr/local/lib/python3.8/site-packages/yaml/parser.py", line 438, in parse_block_mapping_key viseron | raise ParserError("while parsing a block mapping", self.marks[-1], viseron | yaml.parser.ParserError: while parsing a block mapping viseron | in "/config/config.yaml", line 17, column 5 viseron | expected <block end>, but found '<block mapping start>' viseron | in "/config/config.yaml", line 35, column 6 viseron | [cont-finish.d] executing container finish scripts... viseron | [cont-finish.d] done. viseron | [s6-finish] waiting for services. viseron | [s6-finish] sending all processes the TERM signal. viseron | [s6-finish] sending all processes the KILL signal and exiting. viseron | [s6-init] making user provided files available at /var/run/s6/etc...exited 0. viseron | [s6-init] ensuring user provided files have correct perms...exited 0. viseron | [fix-attrs.d] applying ownership & permissions fixes... viseron | [fix-attrs.d] done. viseron | [cont-init.d] executing container initialization scripts... viseron | [cont-init.d] 10-adduser: executing... viseron | usermod: no changes viseron | ************************ UID/GID ************************* viseron | User uid: 0 viseron | User gid: 0 viseron | ************************** Done ************************** viseron | [cont-init.d] 10-adduser: exited 0. viseron | [cont-init.d] 20-gid-video-device: executing... viseron | [cont-init.d] 20-gid-video-device: exited 0. viseron | [cont-init.d] 30-edgetpu-permission: executing... viseron | ************** Setting EdgeTPU permissions *************** viseron | Coral Vendor IDs: viseron | "1a6e" viseron | "18d1" viseron | No EdgeTPU USB device was found viseron | ************************** Done ************************** viseron | [cont-init.d] 30-edgetpu-permission: exited 0. viseron | [cont-init.d] 40-set-env-vars: executing... viseron | ****** Checking for hardware acceleration platforms ****** viseron | OpenCL cannot be used viseron | VA-API cannot be used viseron | CUDA cannot be used viseron | *********************** Done ***************************** viseron | [cont-init.d] 40-set-env-vars: exited 0. viseron | [cont-init.d] 50-check-if-rpi: executing... viseron | ********** Checking if we are running on an RPi ********** viseron | Not running on any supported RPi viseron | *********************** Done ***************************** viseron | [cont-init.d] 50-check-if-rpi: exited 0. viseron | [cont-init.d] done. viseron | [services.d] starting services viseron | [services.d] done. viseron | Traceback (most recent call last): viseron | File "/usr/local/lib/python3.8/runpy.py", line 185, in _run_module_as_main viseron | mod_name, mod_spec, code = _get_module_details(mod_name, _Error) viseron | File "/usr/local/lib/python3.8/runpy.py", line 144, in _get_module_details viseron | return _get_module_details(pkg_main_name, error) viseron | File "/usr/local/lib/python3.8/runpy.py", line 111, in _get_module_details viseron | __import__(pkg_name) viseron | File "/src/viseron/__init__.py", line 8, in <module> viseron | from viseron.config import CONFIG, NVRConfig, ViseronConfig viseron | File "/src/viseron/config/__init__.py", line 93, in <module> viseron | raw_config = load_config() viseron | File "/src/viseron/config/__init__.py", line 69, in load_config viseron | return yaml.load(config_file, Loader=yaml.SafeLoader) viseron | File "/usr/local/lib/python3.8/site-packages/yaml/__init__.py", line 114, in load viseron | return loader.get_single_data() viseron | File "/usr/local/lib/python3.8/site-packages/yaml/constructor.py", line 49, in get_single_data viseron | node = self.get_single_node() viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 36, in get_single_node viseron | document = self.compose_document() viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 55, in compose_document viseron | node = self.compose_node(None, None) viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 84, in compose_node viseron | node = self.compose_mapping_node(anchor) viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 133, in compose_mapping_node viseron | item_value = self.compose_node(node, item_key) viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 82, in compose_node viseron | node = self.compose_sequence_node(anchor) viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 111, in compose_sequence_node viseron | node.value.append(self.compose_node(node, index)) viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 84, in compose_node viseron | node = self.compose_mapping_node(anchor) viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 127, in compose_mapping_node viseron | while not self.check_event(MappingEndEvent): viseron | File "/usr/local/lib/python3.8/site-packages/yaml/parser.py", line 98, in check_event viseron | self.current_event = self.state() viseron | File "/usr/local/lib/python3.8/site-packages/yaml/parser.py", line 438, in parse_block_mapping_key viseron | raise ParserError("while parsing a block mapping", self.marks[-1], viseron | yaml.parser.ParserError: while parsing a block mapping viseron | in "/config/config.yaml", line 17, column 5 viseron | expected <block end>, but found '<block mapping start>' viseron | in "/config/config.yaml", line 35, column 6 viseron | [cont-finish.d] executing container finish scripts... viseron | [cont-finish.d] done. viseron | [s6-finish] waiting for services. viseron | [s6-finish] sending all processes the TERM signal. viseron | [s6-finish] sending all processes the KILL signal and exiting. viseron exited with code 0 viseron | [s6-init] making user provided files available at /var/run/s6/etc...exited 0. viseron | [s6-init] ensuring user provided files have correct perms...exited 0. viseron | [fix-attrs.d] applying ownership & permissions fixes... viseron | [fix-attrs.d] done. viseron | [cont-init.d] executing container initialization scripts... viseron | [cont-init.d] 10-adduser: executing... viseron | usermod: no changes viseron | ************************ UID/GID ************************* viseron | User uid: 0 viseron | User gid: 0 viseron | ************************** Done ************************** viseron | [cont-init.d] 10-adduser: exited 0. viseron | [cont-init.d] 20-gid-video-device: executing... viseron | [cont-init.d] 20-gid-video-device: exited 0. viseron | [cont-init.d] 30-edgetpu-permission: executing... viseron | ************** Setting EdgeTPU permissions *************** viseron | Coral Vendor IDs: viseron | "1a6e" viseron | "18d1" viseron | No EdgeTPU USB device was found viseron | ************************** Done ************************** viseron | [cont-init.d] 30-edgetpu-permission: exited 0. viseron | [cont-init.d] 40-set-env-vars: executing... viseron | ****** Checking for hardware acceleration platforms ****** viseron | OpenCL cannot be used viseron | VA-API cannot be used viseron | CUDA cannot be used viseron | *********************** Done ***************************** viseron | [cont-init.d] 40-set-env-vars: exited 0. viseron | [cont-init.d] 50-check-if-rpi: executing... viseron | ********** Checking if we are running on an RPi ********** viseron | Not running on any supported RPi viseron | *********************** Done ***************************** viseron | [cont-init.d] 50-check-if-rpi: exited 0. viseron | [cont-init.d] done. viseron | [services.d] starting services viseron | [services.d] done. viseron | Traceback (most recent call last): viseron | File "/usr/local/lib/python3.8/runpy.py", line 185, in _run_module_as_main viseron | mod_name, mod_spec, code = _get_module_details(mod_name, _Error) viseron | File "/usr/local/lib/python3.8/runpy.py", line 144, in _get_module_details viseron | return _get_module_details(pkg_main_name, error) viseron | File "/usr/local/lib/python3.8/runpy.py", line 111, in _get_module_details viseron | __import__(pkg_name) viseron | File "/src/viseron/__init__.py", line 8, in <module> viseron | from viseron.config import CONFIG, NVRConfig, ViseronConfig viseron | File "/src/viseron/config/__init__.py", line 93, in <module> viseron | raw_config = load_config() viseron | File "/src/viseron/config/__init__.py", line 69, in load_config viseron | return yaml.load(config_file, Loader=yaml.SafeLoader) viseron | File "/usr/local/lib/python3.8/site-packages/yaml/__init__.py", line 114, in load viseron | return loader.get_single_data() viseron | File "/usr/local/lib/python3.8/site-packages/yaml/constructor.py", line 49, in get_single_data viseron | node = self.get_single_node() viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 36, in get_single_node viseron | document = self.compose_document() viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 55, in compose_document viseron | node = self.compose_node(None, None) viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 84, in compose_node viseron | node = self.compose_mapping_node(anchor) viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 133, in compose_mapping_node viseron | item_value = self.compose_node(node, item_key) viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 82, in compose_node viseron | node = self.compose_sequence_node(anchor) viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 111, in compose_sequence_node viseron | node.value.append(self.compose_node(node, index)) viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 84, in compose_node viseron | node = self.compose_mapping_node(anchor) viseron | File "/usr/local/lib/python3.8/site-packages/yaml/composer.py", line 127, in compose_mapping_node viseron | while not self.check_event(MappingEndEvent): viseron | File "/usr/local/lib/python3.8/site-packages/yaml/parser.py", line 98, in check_event viseron | self.current_event = self.state() viseron | File "/usr/local/lib/python3.8/site-packages/yaml/parser.py", line 438, in parse_block_mapping_key viseron | raise ParserError("while parsing a block mapping", self.marks[-1], viseron | yaml.parser.ParserError: while parsing a block mapping viseron | in "/config/config.yaml", line 17, column 5 viseron | expected <block end>, but found '<block mapping start>' viseron | in "/config/config.yaml", line 35, column 6 viseron | [cont-finish.d] executing container finish scripts... viseron | [cont-finish.d] done. viseron | [s6-finish] waiting for services. viseron | [s6-finish] sending all processes the TERM signal. viseron | [s6-finish] sending all processes the KILL signal and exiting. viseron exited with code 0
The substream block has one extra space it seems, try this:
mqtt:
broker: 192.168.X.XX
port: 1883
client_id: viseron
user: XXX
password: XXXX
cameras:
- name: Foyer
mqtt_name: viseron_foyer
host: 192.168.X.XX
port: 554
username: XXXX
password: XXXX
path: /cam/realmonitor?channel=1@subtype=0
width: 1920
height: 1080
fps: 5
motion_detection:
interval: 1
trigger_detector: false
object_detection:
interval: 1
labels:
- label: person
confidence: 0.9
substream:
port: 554
path: /cam/realmonitor?channel=1@subtype=1
fps: 3
width: 704
height: 576
Getting another error, seems to be related to mqtt user.
Creating viseron ... done
Attaching to viseron
viseron | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
viseron | [s6-init] ensuring user provided files have correct perms...exited 0.
viseron | [fix-attrs.d] applying ownership & permissions fixes...
viseron | [fix-attrs.d] done.
viseron | [cont-init.d] executing container initialization scripts...
viseron | [cont-init.d] 10-adduser: executing...
viseron | ************************ UID/GID *************************
viseron | User uid: 0
viseron | User gid: 0
viseron | ************************** Done **************************
viseron | [cont-init.d] 10-adduser: exited 0.
viseron | [cont-init.d] 20-gid-video-device: executing...
viseron | [cont-init.d] 20-gid-video-device: exited 0.
viseron | [cont-init.d] 30-edgetpu-permission: executing...
viseron | ************** Setting EdgeTPU permissions ***************
viseron | Coral Vendor IDs:
viseron | "1a6e"
viseron | "18d1"
viseron | No EdgeTPU USB device was found
viseron | ************************** Done **************************
viseron | [cont-init.d] 30-edgetpu-permission: exited 0.
viseron | [cont-init.d] 40-set-env-vars: executing...
viseron | ****** Checking for hardware acceleration platforms ******
viseron | OpenCL cannot be used
viseron | VA-API cannot be used
viseron | CUDA cannot be used
viseron | *********************** Done *****************************
viseron | [cont-init.d] 40-set-env-vars: exited 0.
viseron | [cont-init.d] 50-check-if-rpi: executing...
viseron | ********** Checking if we are running on an RPi **********
viseron | Not running on any supported RPi
viseron | *********************** Done *****************************
viseron | [cont-init.d] 50-check-if-rpi: exited 0.
viseron | [cont-init.d] done.
viseron | [services.d] starting services
viseron | [services.d] done.
viseron | Traceback (most recent call last):
viseron | File "/usr/local/lib/python3.8/runpy.py", line 185, in _run_module_as_main
viseron | mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
viseron | File "/usr/local/lib/python3.8/runpy.py", line 144, in _get_module_details
viseron | return _get_module_details(pkg_main_name, error)
viseron | File "/usr/local/lib/python3.8/runpy.py", line 111, in _get_module_details
viseron | __import__(pkg_name)
viseron | File "/src/viseron/__init__.py", line 8, in <module>
viseron | from viseron.config import CONFIG, NVRConfig, ViseronConfig
viseron | File "/src/viseron/config/__init__.py", line 95, in <module>
viseron | CONFIG = VISERON_CONFIG_SCHEMA(raw_config)
viseron | File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in __call__
viseron | return self._compiled([], data)
viseron | File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
viseron | return base_validate(path, iteritems(data), out)
viseron | File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping
viseron | raise er.MultipleInvalid(errors)
viseron | voluptuous.error.MultipleInvalid: extra keys not allowed @ data['mqtt']['user']
viseron | [cont-finish.d] executing container finish scripts...
viseron | [cont-finish.d] done.
viseron | [s6-finish] waiting for services.
viseron | [s6-finish] sending all processes the TERM signal.
viseron | [s6-finish] sending all processes the KILL signal and exiting.
My bad. I have figured out the problem It should be username:
instead of user:
Getting yet another error, this time related to the camera I set up?
viseron | Exception in thread setup.Foyer:
viseron | Traceback (most recent call last):
viseron | File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
viseron | self.run()
viseron | File "/src/viseron/__init__.py", line 144, in run
viseron | FFMPEGNVR(camera_config, self._detector)
viseron | File "/src/viseron/nvr.py", line 120, in __init__
viseron | self.camera = FFMPEGCamera(config, detector)
viseron | File "/src/viseron/camera/__init__.py", line 34, in __init__
viseron | self.initialize_camera(detector)
viseron | File "/src/viseron/camera/__init__.py", line 46, in initialize_camera
viseron | self.stream = Stream(
viseron | File "/src/viseron/camera/stream.py", line 63, in __init__
viseron | ) = self.get_stream_information(self.stream_config.stream_url)
viseron | File "/src/viseron/camera/stream.py", line 195, in get_stream_information
viseron | width, height, fps, codec, audio_codec = self.ffprobe_stream_information(
viseron | File "/src/viseron/camera/stream.py", line 160, in ffprobe_stream_information
viseron | streams = self.run_ffprobe(stream_url)
viseron | File "/src/viseron/camera/stream.py", line 150, in run_ffprobe
viseron | output: dict = json.loads(stdout)
viseron | File "/usr/local/lib/python3.8/json/__init__.py", line 357, in loads
viseron | return _default_decoder.decode(s)
viseron | File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode
viseron | obj, end = self.raw_decode(s, idx=_w(s, 0).end())
viseron | File "/usr/local/lib/python3.8/json/decoder.py", line 355, in raw_decode
viseron | raise JSONDecodeError("Expecting value", s, err.value) from None
viseron | json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
viseron | [2021-06-07 22:15:34] [INFO ] [viseron ] - Initialization complete
viseron | [cont-finish.d] executing container finish scripts...
viseron | [cont-finish.d] done.
viseron | [s6-finish] waiting for services.
viseron | [s6-finish] sending all processes the TERM signal.
viseron | [s6-finish] sending all processes the KILL signal and exiting.
Getting yet another error, this time related to the camera I set up?
viseron | Exception in thread setup.Foyer: viseron | Traceback (most recent call last): viseron | File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner viseron | self.run() viseron | File "/src/viseron/__init__.py", line 144, in run viseron | FFMPEGNVR(camera_config, self._detector) viseron | File "/src/viseron/nvr.py", line 120, in __init__ viseron | self.camera = FFMPEGCamera(config, detector) viseron | File "/src/viseron/camera/__init__.py", line 34, in __init__ viseron | self.initialize_camera(detector) viseron | File "/src/viseron/camera/__init__.py", line 46, in initialize_camera viseron | self.stream = Stream( viseron | File "/src/viseron/camera/stream.py", line 63, in __init__ viseron | ) = self.get_stream_information(self.stream_config.stream_url) viseron | File "/src/viseron/camera/stream.py", line 195, in get_stream_information viseron | width, height, fps, codec, audio_codec = self.ffprobe_stream_information( viseron | File "/src/viseron/camera/stream.py", line 160, in ffprobe_stream_information viseron | streams = self.run_ffprobe(stream_url) viseron | File "/src/viseron/camera/stream.py", line 150, in run_ffprobe viseron | output: dict = json.loads(stdout) viseron | File "/usr/local/lib/python3.8/json/__init__.py", line 357, in loads viseron | return _default_decoder.decode(s) viseron | File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode viseron | obj, end = self.raw_decode(s, idx=_w(s, 0).end()) viseron | File "/usr/local/lib/python3.8/json/decoder.py", line 355, in raw_decode viseron | raise JSONDecodeError("Expecting value", s, err.value) from None viseron | json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) viseron | [2021-06-07 22:15:34] [INFO ] [viseron ] - Initialization complete viseron | [cont-finish.d] executing container finish scripts... viseron | [cont-finish.d] done. viseron | [s6-finish] waiting for services. viseron | [s6-finish] sending all processes the TERM signal. viseron | [s6-finish] sending all processes the KILL signal and exiting.
Hmm never seen this one before, can you paste the full log?
This is a silly question. Do I run docker logs [container_ID]
?
Yes exactly
Yes exactly
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing...
************************ UID/GID *************************
User uid: 0
User gid: 0
************************** Done **************************
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-gid-video-device: executing...
[cont-init.d] 20-gid-video-device: exited 0.
[cont-init.d] 30-edgetpu-permission: executing...
************** Setting EdgeTPU permissions ***************
Coral Vendor IDs:
"1a6e"
"18d1"
No EdgeTPU USB device was found
************************** Done **************************
[cont-init.d] 30-edgetpu-permission: exited 0.
[cont-init.d] 40-set-env-vars: executing...
****** Checking for hardware acceleration platforms ******
OpenCL cannot be used
VA-API cannot be used
CUDA cannot be used
*********************** Done *****************************
[cont-init.d] 40-set-env-vars: exited 0.
[cont-init.d] 50-check-if-rpi: executing...
********** Checking if we are running on an RPi **********
Not running on any supported RPi
*********************** Done *****************************
[cont-init.d] 50-check-if-rpi: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2021-06-07 22:36:44] [INFO ] [viseron ] - -------------------------------------------
[2021-06-07 22:36:44] [INFO ] [viseron ] - Initializing...
[2021-06-07 22:36:44] [DEBUG ] [viseron.watchdog ] - Starting scheduler
[2021-06-07 22:36:45] [DEBUG ] [viseron ] - Starting cleanup scheduler
[2021-06-07 22:36:45] [DEBUG ] [viseron ] - Running initial cleanup
[2021-06-07 22:36:45] [DEBUG ] [viseron.cleanup ] - Running cleanup
[2021-06-07 22:36:45] [INFO ] [viseron.mqtt ] - Initializing MQTT connection
[2021-06-07 22:36:45] [DEBUG ] [viseron.mqtt ] - MQTT connected with returncode 0
[2021-06-07 22:36:45] [DEBUG ] [viseron.detector ] - Initializing object detector darknet
[2021-06-07 22:36:45] [DEBUG ] [viseron.data_stream ] - Subscribing to data topic */frame/scan/object, <queue.Queue object at 0x7f4c574bb0>
[2021-06-07 22:36:45] [DEBUG ] [viseron.detector ] - Object detector initialized
[2021-06-07 22:36:45] [INFO ] [viseron ] - Initializing NVR threads
[2021-06-07 22:36:45] [DEBUG ] [viseron.nvr.foyer ] - Initializing NVR thread
[2021-06-07 22:36:45] [DEBUG ] [viseron.camera.foyer ] - Initializing camera Foyer
[2021-06-07 22:36:45] [DEBUG ] [viseron.camera.stream.foyer] - Getting stream information for rtsp://*****:*****@192.168.0.88:554/cam/realmonitor?channel=17@subtype=1
Exception in thread setup.Foyer:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/src/viseron/__init__.py", line 144, in run
FFMPEGNVR(camera_config, self._detector)
File "/src/viseron/nvr.py", line 120, in __init__
self.camera = FFMPEGCamera(config, detector)
File "/src/viseron/camera/__init__.py", line 34, in __init__
self.initialize_camera(detector)
File "/src/viseron/camera/__init__.py", line 46, in initialize_camera
self.stream = Stream(
File "/src/viseron/camera/stream.py", line 63, in __init__
) = self.get_stream_information(self.stream_config.stream_url)
File "/src/viseron/camera/stream.py", line 195, in get_stream_information
width, height, fps, codec, audio_codec = self.ffprobe_stream_information(
File "/src/viseron/camera/stream.py", line 160, in ffprobe_stream_information
streams = self.run_ffprobe(stream_url)
File "/src/viseron/camera/stream.py", line 150, in run_ffprobe
output: dict = json.loads(stdout)
File "/usr/local/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[2021-06-07 22:36:50] [INFO ] [viseron ] - Initialization complete
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing...
usermod: no changes
************************ UID/GID *************************
User uid: 0
User gid: 0
************************** Done **************************
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-gid-video-device: executing...
[cont-init.d] 20-gid-video-device: exited 0.
[cont-init.d] 30-edgetpu-permission: executing...
************** Setting EdgeTPU permissions ***************
Coral Vendor IDs:
"1a6e"
"18d1"
No EdgeTPU USB device was found
************************** Done **************************
[cont-init.d] 30-edgetpu-permission: exited 0.
[cont-init.d] 40-set-env-vars: executing...
****** Checking for hardware acceleration platforms ******
OpenCL cannot be used
VA-API cannot be used
CUDA cannot be used
*********************** Done *****************************
[cont-init.d] 40-set-env-vars: exited 0.
[cont-init.d] 50-check-if-rpi: executing...
********** Checking if we are running on an RPi **********
Not running on any supported RPi
*********************** Done *****************************
[cont-init.d] 50-check-if-rpi: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2021-06-07 22:36:57] [INFO ] [viseron ] - -------------------------------------------
[2021-06-07 22:36:57] [INFO ] [viseron ] - Initializing...
[2021-06-07 22:36:57] [DEBUG ] [viseron.watchdog ] - Starting scheduler
[2021-06-07 22:36:57] [DEBUG ] [viseron ] - Starting cleanup scheduler
[2021-06-07 22:36:57] [DEBUG ] [viseron ] - Running initial cleanup
[2021-06-07 22:36:57] [DEBUG ] [viseron.cleanup ] - Running cleanup
[2021-06-07 22:36:57] [INFO ] [viseron.mqtt ] - Initializing MQTT connection
[2021-06-07 22:36:57] [DEBUG ] [viseron.mqtt ] - MQTT connected with returncode 0
[2021-06-07 22:36:57] [DEBUG ] [viseron.detector ] - Initializing object detector darknet
[2021-06-07 22:36:58] [DEBUG ] [viseron.data_stream ] - Subscribing to data topic */frame/scan/object, <queue.Queue object at 0x7f35f014f0>
[2021-06-07 22:36:58] [DEBUG ] [viseron.detector ] - Object detector initialized
[2021-06-07 22:36:58] [INFO ] [viseron ] - Initializing NVR threads
[2021-06-07 22:36:58] [DEBUG ] [viseron.nvr.foyer ] - Initializing NVR thread
[2021-06-07 22:36:58] [DEBUG ] [viseron.camera.foyer ] - Initializing camera Foyer
[2021-06-07 22:36:58] [DEBUG ] [viseron.camera.stream.foyer] - Getting stream information for rtsp://*****:*****@192.168.0.88:554/cam/realmonitor?channel=17@subtype=1
Exception in thread setup.Foyer:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/src/viseron/__init__.py", line 144, in run
FFMPEGNVR(camera_config, self._detector)
File "/src/viseron/nvr.py", line 120, in __init__
self.camera = FFMPEGCamera(config, detector)
File "/src/viseron/camera/__init__.py", line 34, in __init__
self.initialize_camera(detector)
File "/src/viseron/camera/__init__.py", line 46, in initialize_camera
self.stream = Stream(
File "/src/viseron/camera/stream.py", line 63, in __init__
) = self.get_stream_information(self.stream_config.stream_url)
File "/src/viseron/camera/stream.py", line 195, in get_stream_information
width, height, fps, codec, audio_codec = self.ffprobe_stream_information(
File "/src/viseron/camera/stream.py", line 160, in ffprobe_stream_information
streams = self.run_ffprobe(stream_url)
File "/src/viseron/camera/stream.py", line 150, in run_ffprobe
output: dict = json.loads(stdout)
File "/usr/local/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[2021-06-07 22:37:02] [INFO ] [viseron ] - Initialization complete
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing...
usermod: no changes
************************ UID/GID *************************
User uid: 0
User gid: 0
************************** Done **************************
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-gid-video-device: executing...
[cont-init.d] 20-gid-video-device: exited 0.
[cont-init.d] 30-edgetpu-permission: executing...
************** Setting EdgeTPU permissions ***************
Coral Vendor IDs:
"1a6e"
"18d1"
No EdgeTPU USB device was found
************************** Done **************************
[cont-init.d] 30-edgetpu-permission: exited 0.
[cont-init.d] 40-set-env-vars: executing...
****** Checking for hardware acceleration platforms ******
OpenCL cannot be used
VA-API cannot be used
CUDA cannot be used
*********************** Done *****************************
[cont-init.d] 40-set-env-vars: exited 0.
[cont-init.d] 50-check-if-rpi: executing...
********** Checking if we are running on an RPi **********
Not running on any supported RPi
*********************** Done *****************************
[cont-init.d] 50-check-if-rpi: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2021-06-07 22:37:10] [INFO ] [viseron ] - -------------------------------------------
[2021-06-07 22:37:10] [INFO ] [viseron ] - Initializing...
[2021-06-07 22:37:10] [DEBUG ] [viseron.watchdog ] - Starting scheduler
[2021-06-07 22:37:10] [DEBUG ] [viseron ] - Starting cleanup scheduler
[2021-06-07 22:37:10] [DEBUG ] [viseron ] - Running initial cleanup
[2021-06-07 22:37:10] [DEBUG ] [viseron.cleanup ] - Running cleanup
[2021-06-07 22:37:10] [INFO ] [viseron.mqtt ] - Initializing MQTT connection
[2021-06-07 22:37:10] [DEBUG ] [viseron.mqtt ] - MQTT connected with returncode 0
[2021-06-07 22:37:10] [DEBUG ] [viseron.detector ] - Initializing object detector darknet
[2021-06-07 22:37:10] [DEBUG ] [viseron.data_stream ] - Subscribing to data topic */frame/scan/object, <queue.Queue object at 0x7f3493e4c0>
[2021-06-07 22:37:10] [DEBUG ] [viseron.detector ] - Object detector initialized
[2021-06-07 22:37:10] [INFO ] [viseron ] - Initializing NVR threads
[2021-06-07 22:37:10] [DEBUG ] [viseron.nvr.foyer ] - Initializing NVR thread
[2021-06-07 22:37:10] [DEBUG ] [viseron.camera.foyer ] - Initializing camera Foyer
[2021-06-07 22:37:10] [DEBUG ] [viseron.camera.stream.foyer] - Getting stream information for rtsp://*****:*****@192.168.0.88:554/cam/realmonitor?channel=17@subtype=1
Exception in thread setup.Foyer:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/src/viseron/__init__.py", line 144, in run
FFMPEGNVR(camera_config, self._detector)
File "/src/viseron/nvr.py", line 120, in __init__
self.camera = FFMPEGCamera(config, detector)
File "/src/viseron/camera/__init__.py", line 34, in __init__
self.initialize_camera(detector)
File "/src/viseron/camera/__init__.py", line 46, in initialize_camera
self.stream = Stream(
File "/src/viseron/camera/stream.py", line 63, in __init__
) = self.get_stream_information(self.stream_config.stream_url)
File "/src/viseron/camera/stream.py", line 195, in get_stream_information
width, height, fps, codec, audio_codec = self.ffprobe_stream_information(
File "/src/viseron/camera/stream.py", line 160, in ffprobe_stream_information
streams = self.run_ffprobe(stream_url)
File "/src/viseron/camera/stream.py", line 150, in run_ffprobe
output: dict = json.loads(stdout)
File "/usr/local/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[2021-06-07 22:37:16] [INFO ] [viseron ] - Initialization complete
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
Whats the output of this command? ( you need to add your camera username and password
docker run -it --rm --entrypoint /bin/bash roflcoopter/jetson-nano-viseron:dev ffprobe -print_format json -show_error -show_streams rtsp://username:password@192.168.0.88:554/cam/realmonitor?channel=17@subtype=1
Whats the output of this command? ( you need to add your camera username and password
docker run -it --rm --entrypoint /bin/bash roflcoopter/jetson-nano-viseron:dev ffprobe -print_format json -show_error -show_streams rtsp://username:password@192.168.0.88:554/cam/realmonitor?channel=17@subtype=1
Got this /usr/local/bin/ffprobe: /usr/local/bin/ffprobe: cannot execute binary file
That was odd, try this instead:
docker run -it --rm --entrypoint "" --privileged roflcoopter/jetson-nano-viseron:dev ffprobe -print_format json -show_error -show_streams rtsp://username:password@192.168.0.88:554/cam/realmonitor?channel=17@subtype=1
That was odd, try this instead:
docker run -it --rm --entrypoint "" --privileged roflcoopter/jetson-nano-viseron:dev ffprobe -print_format json -show_error -show_streams rtsp://username:password@192.168.0.88:554/cam/realmonitor?channel=17@subtype=1
There's progress
nvbuf_utils: Could not get EGL display connection
ffprobe version 4.4 Copyright (c) 2007-2021 the FFmpeg developers
built with gcc 7 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-fontconfig --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libbluray --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-neon --enable-v4l2_m2m --enable-nvmpi --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
{
Input #0, rtsp, from 'rtsp://XXXX:XXXX@192.168.0.88:554/cam/realmonitor?channel=17@subtype=1':
Metadata:
title : Media Server
Duration: N/A, start: 0.302000, bitrate: N/A
Stream #0:0: Video: h264, yuvj420p(pc, bt470bg, progressive), 704x576 [SAR 16:11 DAR 16:9], 20 fps, 20 tbr, 90k tbn, 40 tbc
"streams": [
{
"index": 0,
"codec_name": "h264",
"codec_long_name": "unknown",
"profile": "100",
"codec_type": "video",
"codec_tag_string": "[0][0][0][0]",
"codec_tag": "0x0000",
"width": 704,
"height": 576,
"coded_width": 704,
"coded_height": 576,
"closed_captions": 0,
"has_b_frames": 0,
"sample_aspect_ratio": "16:11",
"display_aspect_ratio": "16:9",
"pix_fmt": "yuvj420p",
"level": 30,
"color_range": "pc",
"color_space": "bt470bg",
"color_transfer": "bt470bg",
"color_primaries": "bt470bg",
"chroma_location": "left",
"field_order": "progressive",
"refs": 1,
"is_avc": "false",
"nal_length_size": "0",
"r_frame_rate": "20/1",
"avg_frame_rate": "20/1",
"time_base": "1/90000",
"start_pts": 27180,
"start_time": "0.302000",
"bits_per_raw_sample": "8",
"disposition": {
"default": 0,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
}
}
]
}
Duplicate with #108
Hi, does this support Jetson Nano?
I tried to run this docker image:
roflcoopter/aarch64-viseron
with the following configurations in the config.yaml file using docker-compose:But I am getting an error with this message:
FileNotFoundError: [Errno 2] No such file or directory: '/detectors/models/darknet/coco.names'
And also, does this have CUDA support for Jetson Nano? I seems like the only docker image that supports CUDA cores is this
roflcoopter/amd64-cuda-viseron
, which is not supported on Jetson Nano.