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.
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 in the Premium Streaming.
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 25fps (frames-per-second).
In the Premium Streaming (advanced mode), the webcam resolution depends on if you have a Pi Camera or a USB 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 "Access Anywhere - The Spaghetti Detective" tab.
- Click the "Settings" button.
Pi Camera's current resolution level is in the "Premium Webcam 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
There are all kinds of USB camera. For instance, Logitech USB cameras are quite popular among OctoPrint users.
When you have a USB camera and its streaming mode is "Premium (25fps)", the resolution is fixed at 640x480.
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).
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".