Home Assistant ustreamer

Video Capture AV USB card (ARKMICRO 18ec:5555) / dmesg

[141319.682908] usb 1-1.4: New USB device found, idVendor=18ec, idProduct=5555, bcdDevice= 1.00
[141319.682941] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[141319.682955] usb 1-1.4: Product: USB2.0 PC CAMERA
[141319.682966] usb 1-1.4: Manufacturer: ARKMICRO
[141319.685776] usb 1-1.4: Found UVC 1.00 device USB2.0 PC CAMERA (18ec:5555)

TODO: Fix device permissions

chmod 0666 /dev/video0
 
# cat /etc/udev/rules.d/99-camera.rules
# DEVNAME="/dev/video0",MODE="0666"

Create container
https://hub.docker.com/r/mkuf/ustreamer

docker run -d \
  --name ustreamer \
  --restart always \
  -p 8080:8080 \
  --device /dev/video0:/dev/video0 \
  mkuf/ustreamer:latest

Stream
http://ha:8080/?action=stream

Debug

docker run -ti -p 8080:8080 --device /dev/video0:/dev/video0 --entrypoint=sh mkuf/ustreamer:latest
./ustreamer --device=/dev/video0 --host=0.0.0.0 --port=8080

Links
https://github.com/pikvm/ustreamer