Skip to content

How to setup your camera in OctoPrint

Camera Configuration

It is highly recommended to use a camera with the minimum resolution of 720p HD (1280 x 720 pixels). Most Raspberry Pi cameras and webcams will meet this minimum resolution. Below is a list of recommended cameras to use with your Raspberry Pi:

Configuring USB Camera Quality

OctoPrint defaults the camera resolution to 640 x 480 pixels regardless of the actual quality on the camera. In order to properly setup the camera in OctoPrint, insert the SD card containing the OctoPi image into your computer. Open and edit the octopi.txt file on the SD card. Click here for a reference to working with the SD card for OctoPrint. If you are using a USB camera, edit the lines shown below:

image

Uncomment the camera option on line 16 and set the value to usb, as shown above. Uncomment the USB camera options on line 24 and set the resolution according to your camera’s specification. A 1080p camera running at 10 frames per second is configured above.

Configuring Raspberry Pi Camera

In order to properly setup the camera in OctoPrint, insert the SD card containing the OctoPi image into your computer. Open and edit the octopi.txt file on the SD card. Click here for a reference to working with the SD card for OctoPrint. If you are using a Raspberry Pi camera, edit the lines shown below:

image

Uncomment and set the camera option to “raspi” on line 16. This indicates that the Raspberry Pi camera should be used. On line 63, uncomment and add “-x” and “-y” followed by that dimension’s resolution. In the example above, a resolution of 1920 x 1080 pixels running at 10 frames per second is specified.