Webcam not working?

Hello,
I've installed Octoprint via docker but i can't get working the webcam. I've followed the official guide with no luck.

This is my docker-compose.yml file:

File
version: '2.4'

services:
  octoprint:
    image: octoprint/octoprint
    restart: unless-stopped
    ports:
      - 80:80
    devices:
     - /dev/ttyUSB0:/dev/ttyUSB0
     - /dev/video0:/dev/video0
    volumes:
     - octoprint:/octoprint
    # uncomment the lines below to ensure camera streaming is enabled when
    # you add a video device
    #environment:
     - ENABLE_MJPG_STREAMER=true
  
  ####
  # uncomment if you wish to edit the configuration files of octoprint
  # refer to docs on configuration editing for more information
  ####

  #config-editor:
  #  image: linuxserver/code-server
  #  ports:
  #    - 8443:8443
  #  depends_on:
  #    - octoprint
  #  restart: unless-stopped
  #  environment:
  #    - PUID=0
  #    - GUID=0
  #    - TZ=America/Chicago
  #  volumes:
  #    - octoprint:/octoprint

volumes:
  octoprint:

Can anyone help me?

Thanks.

Looks like you might need to uncomment environment above the enable mjpg streamer line.

3 Likes

Yes, it was the problem. What a dumb thing.

Thank you for your help.

1 Like