There are two kinds of webcam streaming in TSD.
- 25 fps (frames per seconds), real video streaming. It is H.264 over WebRTC, similar to how YouTube videos are streamed. This video streaming is only available to Pro users.
- Frame by frame, JPEG-based streaming. This streaming is up to 1 frame per 10 seconds. It is streaming only when the printer is printing. And it is available to both Free and Pro users. If you are seeing very laggy and jerky webcam streaming, chances are you are only getting this kind of streaming. Check this help doc to see why this is the case.
25 fps streaming is cool. But wouldn't it cost too much data usage?
The 25 fps 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 25 fps 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. That's why when 25 fps webcam streaming is activated and you try to watch the feed in the OctoPrint Control tab, we have to convert the video streaming into JPEG format and send the feed there. 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.
Webcam streaming causing issues?
Streaming real video on Raspberry Pi's flimsy CPU is a tricky balancing art. It is possible in some situations The Detective tries too hard at her effort to send the best quality video streams to you. In the past, we have received user's reports that the streaming uses too much CPU and causes the printer to stutter. If you run into any issues like that, there is an option to switch off video streaming:
- Open OctoPrint page (not The Spaghetti Detective page). Open "Settings" by clicking the wrench icon.
- Scroll the sidebar to the bottom and click "The Spaghetti Detective (Beta)".
- Click "Advanced".
- Check "Disable webcam streaming".
- Click "Save".
- Restart OctoPrint.