Octoprint Camera


On a Pi3 running a Raspberry camera under octoprint, is there any way of changing zoom or resolution dynamically?
I have figured out how to change the resolution during bootup with the configuration file.
The problem I run into is that I have set up a higher resolution (closer picture) during the start of the print but after a while the print gets too big. I would like to zoom out or change resolution in order to see what the printhead is doing.

  • Search the forum here for "rasp cam resolution"
  • Read foosel's post on the subject
  • Try the OctoPrint wiki looking for "The Raspberry Pi Camera" at the end as well as the -r 640x480 arguments seen throughout that page

Since OctoPrint doesn't technically control the camera (it's an add-on, like you might find in the bundling which OctoPi does), it won't appear in the documentation, proper.


Thank you for your reply Outsourced ... the references you give only seem to address the resolution in the configuration file which, as I mentioned, I am somewhat familiar with. I am trying to change things while octoprint is actually printing stuff and not in an idle state when I can reboot the raspberry to reload new configuration settings (ie dynamically)
Am I missing something here ?


You can just restart the "webcamd" service to reload the configuration file, you don't have to reboot the entire pi.

You should be able to SSH in, chance the resolution, and restart the service. Unfortunately that might break any sort of timelapse you have configured since octoprint can't fetch the images. As long as mjpeg streamer restarts quick enough, you might only lose a frame or two before octoprint just gives up. It's something you'd have to test.


Thanks, I will give that a try ! Timelapse is not something I use.


Yes restarting webcamd is possible but it won't be able to bind to http server so nothing will change on the screen.