Why is my webcam streaming in "compatibility mode"?

Most likely, it is because you have a webcam that is not compatible with the "advanced mode".

The "advanced mode" is efficient in CPU usage, and hence able to stream at full speed - 25 frames per second. However, not all webcams are compatible with this mode.

By default, TSD plugin tries to stream in advanced mode first. When it fails because of an incompatible webcam, it'll switch to "compatibility mode". This streaming mode is compatible with virtually any webcam. The main downside of the compatibility mode is it uses significantly more CPU than the advanced mode.

Are there situations when I want to "always stream in compatibility mode"?

99% of the times you can leave the decision to The Detective and she will figure out if the compatibility mode is right for you.

There are some rare situations when your webcam is compatible with the advanced mode, but the compatibility mode will work better for you. In these cases, you can tell The Detective to "always stream in compatibility mode".

These situations include:

  • When you want to have full control on webcam settings, such as resolution, frame rate, white balance, etc.
  • When premium webcam stream doesn't work in Chrome, but you don't want to switch to Firefox.
  • When your webcam stream is laggy and you have gone through all the steps to no avail.
  • When the webcam is not connected to the Pi running OctoPrint. Examples include:
    • It is an IP camera.
    • It is a smartphone running an IP camera app.
    • The webcam is connected to another Pi.
    • Any other situations that require you to change the Snapshot URL settings in OctoPrint to be different than the default value of http://localhost:8080/?action=snapshot.

Are there situations when I should "never stream in compatibility mode"?

The only situation where you may want to tell The Detective to "never stream in compatibility mode" is when it results in excessive CPU usage and impacts the print quality.

Adjust webcam resolution, frame rate, and other settings in the compatibility mode

The compatibility mode use mjpg-streamer to interact with your webcam. Therefore, you can adjust any settings mjpg-streamer allows you to adjust, including resolution, frame rate, auto focus, etc.

Check this guide if you want to know about adjusting these settings.

Caution: raising resolution and/or frame rate above the default values may result in an excessive amount of CPU usage and potentially print quality issues.

More about CPU usage in compatibility mode

The main downside of compatibility mode is it puts heavier loads on the CPU than advanced mode does.

Whether or not this is a problem depends on what Pi you have, the resolution/frame rate configured for your webcam, and what kind of 3D models you are printing.

Continue reading below to learn more about CPU usage in compatibility mode:  

Check if compatibility mode is using too much CPU

If after switching to compatibility mode, your printer starts to stutter (brief pauses), and/or you start to have bumps on the print surface, high CPU usage may be the culprit.

To confirm, disable compatibility mode. If the problem goes away right after the compatibility mode is disabled, we know it is causing the problem.

Excessive CPU usage warning

Because of the potential problem caused by high CPU usage in compatibility mode, The Spaghetti Detective plugin monitors CPU usage and warns you when the streaming is using too much CPU. If that happens, take the following steps:

  1. Lower the webcam resolution and frame rate in octopi.txt.
  2. Restart the Raspberry Pi.
  3. Wait for 3 minutes.
  4. If the warning shows up again, you should consider choosing "Never stream in compatibility mode" in OctoPrint Settings -> The Spaghetti Detective -> Advanced Settings.

Compatibility mode vs advanced mode

This chart provides a comprehensive comparison between compatibility mode and advanced modes.