Docker Compose:
version: '3'
services:
octoprint:
container_name: octoprint
image: octoprint/octoprint
restart: unless-stopped
ports:
- 6790:80
devices:
- /dev/video0:/dev/video0
volumes:
- /mnt/docker/octoprint:/octoprint
environment:
- ENABLE_MJPG_STREAMER=true
Camera model
https://www.amazon.com/gp/product/B088NNQMVQ/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
What is the problem?
Can't get the mjpg streamer to start showing any video from my camera
What did you already try to solve it?
Tried a third party mjpg streamer but it threw an error that the device wasn't there, but I am able to see it in CLI:
sudo v4l2-ctl --device=/dev/video0 --all
[sudo] password for b:
Driver Info (not using libv4l2):
Driver name : uvcvideo
Card type : USB Color Camera: USB Color Cam
Bus info : usb-0000:02:01.0-1
Driver version: 4.15.18
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
Width/Height : 640/480
Pixel Format : 'MJPG'
Field : None
Bytes per Line : 0
Size Image : 614989
Colorspace : Default
Transfer Function : Default (maps to Rec. 709)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
Crop Capability Video Capture:
Bounds : Left 0, Top 0, Width 640, Height 480
Default : Left 0, Top 0, Width 640, Height 480
Pixel Aspect: 1/1
Selection: crop_default, Left 0, Top 0, Width 640, Height 480
Selection: crop_bounds, Left 0, Top 0, Width 640, Height 480
Streaming Parameters Video Capture:
Capabilities : timeperframe
Frames per second: 30.000 (30/1)
Read buffers : 0
brightness 0x00980900 (int) : min=-64 max=64 step=1 default=0 value=0
contrast 0x00980901 (int) : min=0 max=64 step=1 default=32 value=32
saturation 0x00980902 (int) : min=0 max=128 step=1 default=64 value=64
hue 0x00980903 (int) : min=-40 max=40 step=1 default=0 value=0
white_balance_temperature_auto 0x0098090c (bool) : default=1 value=1
gamma 0x00980910 (int) : min=72 max=500 step=1 default=100 value=100
gain 0x00980913 (int) : min=0 max=100 step=1 default=0 value=0
power_line_frequency 0x00980918 (menu) : min=0 max=2 default=1 value=1
white_balance_temperature 0x0098091a (int) : min=2800 max=6500 step=1 default=4600 value=4600 flags=inactive
sharpness 0x0098091b (int) : min=0 max=6 step=1 default=1 value=1
backlight_compensation 0x0098091c (int) : min=0 max=2 step=1 default=1 value=1
exposure_auto 0x009a0901 (menu) : min=0 max=3 default=3 value=3
exposure_absolute 0x009a0902 (int) : min=1 max=5000 step=1 default=157 value=157 flags=inactive
exposure_auto_priority 0x009a0903 (bool) : default=0 value=1
URL
This didn't seem to be intuitive from the compose file, but I put
http://10.168.3.59:6790/webcam/?action=stream
Logs (/var/log/webcamd.log
, syslog, dmesg, ... no logs, no support)
b@fh-ast-docker-01:/mnt$ dmesg | grep USB
[601253.134942] uhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 1
[601253.138808] usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
[601253.138816] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[601253.154194] hub 1-0:1.0: USB hub found
[601253.176171] ehci-pci 0000:02:01.0: new USB bus registered, assigned bus number 2
[601253.193188] ehci-pci 0000:02:01.0: USB 2.0 started, EHCI 1.00
[601253.194229] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[601253.194233] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[601253.196939] hub 2-0:1.0: USB hub found
[601253.849019] usb 1-1: new full-speed USB device number 2 using uhci_hcd
[601253.921065] usb 2-1: new high-speed USB device number 2 using ehci-pci
[601254.415873] usb 1-1: New USB device found, idVendor=0e0f, idProduct=0003
[601254.415878] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[601254.415880] usb 1-1: Product: VMware Virtual USB Mouse
[601254.552881] usb 1-2: new full-speed USB device number 3 using uhci_hcd
[601254.571100] usb 2-1: New USB device found, idVendor=0c45, idProduct=6366
[601254.571104] usb 2-1: New USB device strings: Mfr=2, Product=1, SerialNumber=3
[601254.571106] usb 2-1: Product: USB Color Camera
[601254.571107] usb 2-1: Manufacturer: USB Color Camera
[601254.571109] usb 2-1: SerialNumber: USB Color Camera
[601254.960483] usb 1-2: New USB device found, idVendor=0e0f, idProduct=0002
[601254.960488] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[601254.960491] usb 1-2: Product: VMware Virtual USB Hub
[601254.971098] hub 1-2:1.0: USB hub found
[601274.859357] uvcvideo: Found UVC 1.00 device USB Color Camera (0c45:6366)
[601274.870619] usbhid: USB HID core driver
[601274.881774] input: USB Color Camera: USB Color Cam as /devices/pci0000:00/0000:00:11.0/0000:02:01.0/usb2/2-1/2-1:1.0/input/input5
[601274.882415] USB Video Class driver (1.1.1)
[601275.002660] input: VMware VMware Virtual USB Mouse as /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb1/1-1/1-1:1.0/0003:0E0F:0003.0001/input/input6
[601275.062527] hid-generic 0003:0E0F:0003.0001: input,hidraw0: USB HID v1.10 Mouse [VMware VMware Virtual USB Mouse] on usb-0000:02:00.0-1/input0
Additional information about your setup (OctoPrint version, OctoPi version, ...)