Most of the time you can leave The Spaghetti Detective plugin to pick the appropriate webcam streaming resolution and frame rate. You don't have to worry about them.
If you are using a Raspberry Pi, please keep in mind that it has a weak CPU. If the resolution and/or frame rate is set to high, it may overwhelm the Pi's CPU and hence cause print quality issues.
Find out your webcam's streaming mode.
The resolution and frame rate depends on the webcam's streaming mode.
Follow this guide to find out the webcam streaming mode.
Learn more about Premium Streaming vs Basic Streaming.
Learn more about advanced mode and compatibility mode.
If the streaming mode is "premium (advanced)":
This means the webcam is in the Premium Streaming (advanced mode). In this mode, there are only limited options for resolutions and frame rates.
If you want to set your own resolution and frame rate, you will need to change the compatibility mode to "always", then follow the instructions for Premium Streaming (compatibility mode).
The Premium Streaming (advanced mode) has to take total control of the webcam, such as the resolution, frame rate, auto-focus, etc., so that the stream can be encoded in highly-efficient H.264.
If you have changed webcam settings in "octopi.txt", you may be surprised to see these settings are no longer effective in the Premium Streaming (advanced mode).
In the Premium Streaming (advanced mode), the frame rate is always 25 FPS (frames-per-second).
In the Premium Streaming (advanced mode), the webcam resolution depends on if you have a Pi Camera or a USB camera.
If you have a Pi Camera:
Learn more about the Pi Camera.
If you have a Pi Camera, you can find or change its current resolution on the plugin's settings page.
- Open OctoPrint settings page by clicking the wrench icon (🔧).
- Scroll down the navigation bar on the left side.
- Click "Obico for OctoPrint" tab.
- Click the "Settings" button.
Pi Camera's current resolution level is in the "Premium Streaming" section.
If the webcam aspect ratio setting in OctoPrint is 4:3 (default):
- Low: 320x240
- Medium: 640x480
- High: 1296x972
- Ultra high: 1640x1232
If you have changed the webcam aspect ratio setting in OctoPrint to 16:9:
- Low: 480x270
- Medium: 960x540
- High: 1640x922
- Ultra high: 1920x1080
If you have a USB camera:
When you have a USB camera and its streaming mode is "Premium (advanced)", the resolution is fixed at 640x480. This is due to some technical limitations on how the Premium streaming works in advanced mode. Your best option is to leave it as is.
However, if you really want to change the resolution and/or the frame rate, follow these 2 steps:
Change the resolution and/or frame rate as instructed in this section.
There are simply too many USB camera models. 640x480 is the only resolution that all of them support. This is why the resolution is fixed at 640x480 in Premium Streaming (advanced mode).
If the streaming mode is "Premium (compatibility)" or "Basic":
When the webcam streaming is in "Basic" mode, or "Premium (compatibility)" mode, The Spaghetti Detective plugin won't change the resolution or the frame rate. Instead, they are set by the OctoPrint's original streaming process before The Spaghetti Detective plugin was installed.
If you have set up OctoPrint using the official OctoPi image, head to this OctoPrint help document to learn about how you can change the resolution and/or frame rate.
If you have replaced the original OctoPrint streaming process with a custom one, such as an IP Camera, you need to refer to the user manual of your custom streaming process to find out how you can adjust the settings.
Raising resolution and/or frame rate above the default values may result in an excessive amount of CPU usage and potentially print quality issues.
If you are running OctoPrint on a Raspberry Pi, the OctoPrint's built-in streaming program is called "mjpeg-streamer".