Managing Video Encoding Trade-offs: Latency, Quality and Bandwidth
by Puneet Gupta (Senior Manager, System Solutions)
Achieving low latency video streaming over a network with constrained bandwidth while maintaining high video quality involves multiple challenges. It can however be accomplished by understanding the end application requirements and making the right trade-offs accordingly. Let us understand how!
For a network with limited bandwidth (ex: wireless networks), Constant Bit Rate (CBR) transmission at a data rate below the available bandwidth is often a critical requirement. Video encoders with a CBR output can help ensure that video streaming does not cause bandwidth spikes on the network. However, trying to generate a CBR encoded bit stream can impact the achievable video quality.
This brings us to Variable Bit Rate (VBR) encoding where the under-utilized bits from low-complexity portions can be allocated for encoding high complexity portions in the video. This would achieve an overall better quality across all video frames since the allocation of bits is proportional to the complexity of video frames.
Network traffic shaping is used to eliminate such spikes in the bit rate from VBR streaming. What this means is that the multiple data packets for a typical compressed video frame are spread out temporally for transmission (rather than bursting them all to the network instantly).
To do so, additional queueing of packets is required before transmission which leads to increased latency in delivering video.
In summary, achieving a low video streaming latency while aiming for high video quality at a given bandwidth is not straight forward. One option to achieve this is to implement Constrained Variable Bit Rate (CVBR) encoding as a good trade-off between latency and quality. This is similar to VBR encoding, except that the peak encoded bit rate for any portion of video is constrained within an upperbound (based on available network bandwidth), therefore keeping the spikes in data rate under check (ex: a peak to average data rate ratio of ~2). So, the encoder can vary its bit rate to accommodate the change in video complexity while still maintaining the data rate.
Other than data rate control, some encoding features/parameters can enhance the user experience:
Ittiam’s adroitSDK Media SDKs implement these schemes for multiple video networking use cases (Encoder/Server, Transcoder, etc.), achieving the best trade-offs across a wide range of industrial, surveillance, enterprise, medical & defense applications.