No, this is passing already connected and detected USB device to container.
Create a separate “.sh” file. E.g. startup.sh. Add below lines into it as per your USB Devices. And then schedule newly created script to execute at every startup. This shall load the USB drivers for different USB devices.
# Below 2 lines shall load USB serial derivers to kernal. This shall help to load the correct drivers if non block devices (harddisk) are connected on USB. Ex. Z wave stick.
#sudo insmod /lib/modules/usbserial.ko
#sudo insmod /lib/modules/ftdi_sio.ko
# below lines shall be added on DSM 7 to load conbee II and Opto Meter probes
/sbin/modprobe usbserial
/sbin/modprobe ftdi_sio
/sbin/modprobe cdc-acm
I have been running Frigate on a docker container for a while now with success. I recently decided to install HAOS on my bare metal and run the add-on. I can’t seem to get HA to see the USB accelerator. I see some people were having this problem before, anybody know what the issue is? Do you need to manually install the packages for the accelerator to work?
I’ve been seeing frequent (every few second) crashes from cameras that have been working flawlessly for ages now, something like this:
[2022-01-10 14:43:34] frigate.app INFO : Starting Frigate (0.9.4-26ae608)
Starting migrations
[2022-01-10 14:43:34] peewee_migrate INFO : Starting migrations
There is nothing to migrate
[2022-01-10 14:43:34] peewee_migrate INFO : There is nothing to migrate
[2022-01-10 14:43:34] frigate.mqtt INFO : MQTT connected
[2022-01-10 14:43:34] detector.coral INFO : Starting detection process: 225
[2022-01-10 14:43:34] frigate.app INFO : Starting Frigate (0.9.4-26ae608)
Starting migrations
[2022-01-10 14:43:34] peewee_migrate INFO : Starting migrations
There is nothing to migrate
[2022-01-10 14:43:34] peewee_migrate INFO : There is nothing to migrate
[2022-01-10 14:43:34] frigate.mqtt INFO : MQTT connected
[2022-01-10 14:43:34] detector.coral INFO : Starting detection process: 225
[2022-01-10 14:43:34] frigate.app INFO : Output process started: 226
[2022-01-10 14:43:34] ws4py INFO : Using epoll
[2022-01-10 14:43:34] frigate.app INFO : Camera processor started for gate: 232
[2022-01-10 14:43:34] frigate.edgetpu INFO : Attempting to load TPU as usb:0
[2022-01-10 14:43:34] frigate.app INFO : Output process started: 226
[2022-01-10 14:43:34] ws4py INFO : Using epoll
[2022-01-10 14:43:34] frigate.app INFO : Camera processor started for gate: 232
[2022-01-10 14:43:34] frigate.edgetpu INFO : Attempting to load TPU as usb:0
[2022-01-10 14:43:34] frigate.app INFO : Capture process started for gate: 242
[2022-01-10 14:43:36] frigate.edgetpu INFO : TPU found
[2022-01-10 14:43:34] ws4py INFO : Using epoll
[2022-01-10 14:43:37] frigate.video INFO : gate: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2022-01-10 14:43:37] frigate.video INFO : gate: ffmpeg process is not running. exiting capture thread...
[2022-01-10 14:43:38] ws4py INFO : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:59200]
[2022-01-10 14:43:38] ws4py INFO : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:59200]
[2022-01-10 14:43:54] watchdog.gate ERROR : FFMPEG process crashed unexpectedly for gate.
[2022-01-10 14:43:54] watchdog.gate ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-01-10 14:43:54] watchdog.gate ERROR : You may have invalid args defined for this camera.
[2022-01-10 14:43:54] ffmpeg.gate.detect ERROR : [rtsp @ 0x561c0a423980] DTS discontinuity in stream 1: packet 6 with DTS 147764323295526, packet 7 with DTS 147764323314068
[2022-01-10 14:43:54] ffmpeg.gate.detect ERROR : av_interleaved_write_frame(): Connection reset by peer
[2022-01-10 14:43:54] ffmpeg.gate.detect ERROR : [flv @ 0x561c0a42b700] Failed to update header with correct duration.
[2022-01-10 14:43:54] ffmpeg.gate.detect ERROR : [flv @ 0x561c0a42b700] Failed to update header with correct filesize.
[2022-01-10 14:43:54] ffmpeg.gate.detect ERROR : Error writing trailer of rtmp://127.0.0.1/live/gate: Connection reset by peer
[2022-01-10 14:43:54] ws4py INFO : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:59200]
[2022-01-10 14:43:55] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:58152]
[2022-01-10 14:43:55] ws4py INFO : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:59236]
[2022-01-10 14:43:57] frigate.video INFO : gate: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2022-01-10 14:43:57] frigate.video INFO : gate: ffmpeg process is not running. exiting capture thread...
[2022-01-10 14:43:57] frigate.video INFO : gate: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2022-01-10 14:43:57] frigate.video INFO : gate: ffmpeg process is not running. exiting capture thread...
[2022-01-10 14:43:57] ws4py INFO : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:59236]
[2022-01-10 14:44:04] watchdog.gate ERROR : FFMPEG process crashed unexpectedly for gate.
[2022-01-10 14:44:04] watchdog.gate ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-01-10 14:44:04] watchdog.gate ERROR : You may have invalid args defined for this camera.
[2022-01-10 14:44:04] ffmpeg.gate.detect ERROR : av_interleaved_write_frame(): Connection reset by peer
[2022-01-10 14:44:04] ffmpeg.gate.detect ERROR : [flv @ 0x559386bbd700] Failed to update header with correct duration.
[2022-01-10 14:44:04] ffmpeg.gate.detect ERROR : [flv @ 0x559386bbd700] Failed to update header with correct filesize.
[2022-01-10 14:44:04] ffmpeg.gate.detect ERROR : Error writing trailer of rtmp://127.0.0.1/live/gate: Connection reset by peer
[2022-01-10 14:44:07] frigate.video INFO : gate: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2022-01-10 14:44:07] frigate.video INFO : gate: ffmpeg process is not running. exiting capture thread...
[2022-01-10 14:44:14] watchdog.gate ERROR : FFMPEG process crashed unexpectedly for gate.
[2022-01-10 14:44:14] watchdog.gate ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-01-10 14:44:14] watchdog.gate ERROR : You may have invalid args defined for this camera.
[2022-01-10 14:44:14] ffmpeg.gate.detect ERROR : av_interleaved_write_frame(): Connection reset by peer
[2022-01-10 14:44:14] ffmpeg.gate.detect ERROR : [flv @ 0x55c082f33700] Failed to update header with correct duration.
[2022-01-10 14:44:14] ffmpeg.gate.detect ERROR : [flv @ 0x55c082f33700] Failed to update header with correct filesize.
[2022-01-10 14:44:14] ffmpeg.gate.detect ERROR : Error writing trailer of rtmp://127.0.0.1/live/gate: Connection reset by peer
[2022-01-10 14:44:16] frigate.video INFO : gate: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2022-01-10 14:44:16] frigate.video INFO : gate: ffmpeg process is not running. exiting capture thread...
I’ve stripped the config back to barebones (as above, with just one camera), but I’m still seeing frequent crashes. The camera feed config is correct (resolution and FPS), so unsure what’s wrong.
If you just updated to 0.9.4, then this is probably because rtmp is being enabled by default. High resolutions like this often cause rtmp to fail.
That’s a very high resolution and frame rate. Unless you are tracking very small fast objects, you will be better off with a lower resolution and frame rate.
I started to experience issues with the camera stream, I added the same camera with 2 different streams to test different resolutions; but both of them are failing,
Any ideas/suggestions?
frigate_camera_tpu | [2022-01-12 08:22:00] ffmpeg.camera1.record ERROR : [h264 @ 0x55a8bad040] decode_slice_header error
frigate_camera_tpu | [2022-01-12 08:22:00] ffmpeg.camera1.record ERROR : [h264 @ 0x55a8bad040] no frame!
frigate_camera_tpu | [2022-01-12 08:22:00] ffmpeg.camera1.record ERROR : [h264 @ 0x55a8bad040] non-existing PPS 0 referenced
frigate_camera_tpu | [2022-01-12 08:22:00] ffmpeg.camera1.record ERROR : Last message repeated 1 times
frigate_camera_tpu | [2022-01-12 08:22:00] ffmpeg.camera1.record ERROR : [h264 @ 0x55a8bad040] decode_slice_header error
frigate_camera_tpu | [2022-01-12 08:22:00] ffmpeg.camera1.record ERROR : [h264 @ 0x55a8bad040] no frame!
frigate_camera_tpu | [2022-01-12 08:22:00] ffmpeg.camera1.record ERROR : Guessed Channel Layout for Input Stream #0.1 : mono
frigate_camera_tpu | [2022-01-12 08:22:00] ffmpeg.camera1.record ERROR : Could not write header for output file #0 (incorrect codec parameters ?): No space left on device
frigate_camera_tpu | [2022-01-12 08:22:00] ffmpeg.camera1.record ERROR :
frigate_camera_tpu | [2022-01-12 08:22:00] watchdog.camera1 INFO : Terminating the existing ffmpeg process...
frigate_camera_tpu | [2022-01-12 08:22:00] watchdog.camera1 INFO : Waiting for ffmpeg to exit gracefully...
frigate_camera_tpu | [2022-01-12 08:22:01] frigate.video INFO : camera2: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate_camera_tpu | [2022-01-12 08:22:01] frigate.video INFO : camera2: ffmpeg process is not running. exiting capture thread...
frigate_camera_tpu | [2022-01-12 08:22:00] ffmpeg.camera2.detect ERROR : [h264 @ 0x555f7ef180] decode_slice_header error
frigate_camera_tpu | [2022-01-12 08:22:00] ffmpeg.camera2.detect ERROR : [h264 @ 0x555f7ef180] no frame!
frigate_camera_tpu | [2022-01-12 08:22:00] ffmpeg.camera2.detect ERROR : Guessed Channel Layout for Input Stream #0.1 : mono
frigate_camera_tpu | [2022-01-12 08:22:00] ffmpeg.camera2.detect ERROR : Could not write header for output file #0 (incorrect codec parameters ?): No space left on device
frigate_camera_tpu | [2022-01-12 08:22:00] ffmpeg.camera2.detect ERROR :
Good people of this thread, who didn’t vote on this Feature Request, please vote on regards of the mount of NAS to HA.
If we will have big vote numbers, we will be seen. Thank you for your time.
Also, in general, is there a good way to identify what mini PCs would have a free M.2 pcie slot that would work with Coral. I’ve been searching for days and am struggling to find a solution.