Premium streaming is cool. But wouldn't it cost too much data usage?
The premium video streaming is activated only when you open the browser to watch it. The streaming will automatically stop to save network data usage when you put the browser tab to the background, close the browser window, switch to a different app on your phone, or lock your phone screen. In short, if you are not watching the webcam feed, it won't cost any data usage on your phone or your home network (for your Raspberry Pi) for video streaming.
Now I have the awesome 25 fps streaming. But the webcam feed in OctoPrint becomes slower. Why?
The premium streaming is based on H.264, which is much more efficient than the original OctoPrint webcam feed (based on JPEG). However, these 2 streaming mechanisms are not compatible with each other so they can't co-exist.
When you try to watch the webcam stream in OctoPrint, the H.264 video stream has to be converted into JPEG format, since OctoPrint can only stream JPEG. This process takes significant amount of CPU power, so we can't do it at a frame rate as high as the original OctoPrint webcam feed without using too much Raspberry Pi CPU and negatively affect the print quality.
I configured webcam aspect ratio to be 16:9 in OctoPrint settings. But it has become 4:3 now that I have the premium webcam streaming. Why?
We currently only support very limited customization for webcam streaming, because of the complexity in doing so. Specifically,
For Pi Camera, we support 16:9 and 4:3 aspect ratios, and only 4 resolutions. You can change them in " OctoPrint Settings -> The Spaghetti Detective -> Advanced -> Webcam Streaming".
For USB camera, we currently only support 4:3 aspect ratio and 1 fixed resolution (640x480). If you want higher resolution, you can choose to stream in compatibility mode. Warning: streaming in compatibility mode with very high resolution or very high frame rate may result in excessive CPU usage and negative impact on print quality.
I configured a high resolution, and other things like auto-focus in
octopi.txt. But the premium webcam streaming doesn't take them.
That is because your webcam is not streaming in compatibility mode.
By default, premium webcam streaming is in the "advanced mode", which is more CPU-efficient and streams at the full 25 fps speed. However, this "advanced mode" is not compatible with
octopi.txt. Hence the settings you have in
octopi.txt are ignored.
If you want to adjust webcam settings using
octopi.txt, you can choose to always stream in compatibility mode.