Camera resolution stuck at 640 x 480

Hello there,

It appears octoprint does not receive the MJPG settings in docker compose and the camera resolution is stuck at 640 x 480. A related post I have found on this topic indicates changing octopi.txt but I do not think this applies to the docker setup (post).

Model : Raspberry Pi 4 Model B Rev 1.1
Camera : Raspberry Pi Camera V2.1
OS : Raspbian GNU/Linux 11 (bullseye)

docker-compose.yaml file is setup as follows :

version: '3.8'

    image: octoprint/octoprint:latest
    privileged: true
    restart: unless-stopped
      - 80:80
    # use `python -m` to see what the name is of the printer, this requires pyserial
      - /dev/ttyACM0:/dev/ttyACM0
      - /dev/video0:/dev/video0
      - octoprint:/octoprint
      - /usr/bin/vcgencmd:/usr/bin/vcgencmd
      - /usr/lib/arm-linux-gnueabihf/
      - /usr/lib/arm-linux-gnueabihf/
    # uncomment the lines below to ensure camera streaming is enabled when
    # you add a video device
      - MJPG_SREAMER_INPUT=-n -r 1640x1232 -f 30
      - CAMERA_DEV=/dev/video0


However, when octoprint loads up I see the following (Desired resolution: 640 x 480, FPS : -1):

Starting octoprint_octoprint_1 ... done
Attaching to octoprint_octoprint_1
octoprint_1  | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
octoprint_1  | [s6-init] ensuring user provided files have correct perms...exited 0.
octoprint_1  | [fix-attrs.d] applying ownership & permissions fixes...
octoprint_1  | [fix-attrs.d] done.
octoprint_1  | [cont-init.d] executing container initialization scripts...
octoprint_1  | [cont-init.d] 01-mjpg-streamer-config: executing... 
octoprint_1  | [cont-init.d] 01-mjpg-streamer-config: exited 0.
octoprint_1  | [cont-init.d] v3-dir-structure-check: executing... 
octoprint_1  | [cont-init.d] v3-dir-structure-check: exited 0.
octoprint_1  | [cont-init.d] done.
octoprint_1  | [services.d] starting services
octoprint_1  | [services.d] done.
octoprint_1  | MJPG Streamer Version.: 2.0
octoprint_1  |  i: Using V4L2 device.: /dev/video0
octoprint_1  |  i: Desired Resolution: 640 x 480
octoprint_1  |  i: Frames Per Second.: -1
octoprint_1  |  i: Format............: JPEG
octoprint_1  |  i: TV-Norm...........: DEFAULT
octoprint_1  |  o: www-folder-path......: /usr/local/share/mjpg-streamer/www/
octoprint_1  |  o: HTTP TCP port........: 8080
octoprint_1  |  o: HTTP Listen Address..: (null)
octoprint_1  |  o: username:password....: disabled
octoprint_1  |  o: commands.............: enabled

I have tried changing the resolution (in docker-compose.yaml) to 1920 x 1080 but no change when octoprint starts (still 640 x 480). Any advice appreciated!!

Kind regards,

Just a simple typo here

- MJPG_SREAMER_INPUT=-n -r 1640x1232 -f 30
+ MJPG_STREAMER_INPUT=-n -r 1640x1232 -f 30

Missing a 'T' in 'STREAMER'.

1 Like

Thanks for that. I am the worlds biggest dummy.

1 Like