Streaming bandwidth

Hi,

Right now with default settings, a 1080 stream takes somewhere around 3.5 Mbps of sustained network bandwidth even with an absolutely static screen, which seems to be too much. I tried switching video modes from WebRTC H.264 to Direct H.264, to Legacy MJPEG – the last one appears the most economical most of the time, but with very uneven bitrate varying between 1.5 and 10+ Mbps. Direct is about 2.5 Mbps sustained.

Is it possible to reduce streaming network traffic?

You can lower the quality for MJPEG to reduce it slightly, and for any streaming method by lowering the target device resolution. You could try increasing the GOP for H.264 and lowering the bandwidth setting, but you can liken this to security cameras, they are constantly streaming either to the cloud for storage or to somebody viewing/recording the feed. If you aren’t viewing the feed it shouldn’t be sending out data, but as soon as you open the feed it will give you a stream, even if it is of blank pixels. There isn’t much more to do because it is using the hardware encoder for the H.264, so it can’t really pre-optimize and figure out if nothing has changed, because it is just sending a video stream compressed as best it can, you could try the VNC implementation if you want the “damage tracking” but I’m not sure if that saves much bandwidth or is just streaming the video directly as well.

AFAIK, there is not such thing as a “hardware encoder”. It’s just some software running on the GPU. Parts of it might be incorporated into firmware loadable at boot, but it’s still software. It is GPU-accelerated software.

Would it be possible to use more effective codecs: HEVC/H.265 or AV1? There are open source implementations for both.

PiKVM with CSI capture device (models V2 V3 V4) use H.264 hardware encoder build in GPU of SoC made by Broadcom. We don’t use any software compression, MJPG is compressed with jpeg encoder (build in SoC GPU).

You can try to implement more effective software encoders on RPi5, but as we know already there is a lack of CPU performance for real-time applications.