Video Compression

Video Frame Sizes Visualization

Video Frame Sizes Visualization

Visualize Compressed Video

In this tutorial, we’ll walk through how to use Python and Bokeh to visualize video frame sizes (H.264/AVC, H.265/HEVC, etc.) and calculate moving average bitrate values from an MPEG TS file. We’ll use ffprobe to extract frame information and pandas for data manipulation. Finally, we’ll create interactive plots with Bokeh.

Bjontegaard Delta-Rate Metric

Bjontegaard Delta-Rate Metric

Comparing video compression efficiency

A video encoder can be configured in many ways: different GOP (Group of Pictures) structure, different quantization parameters (QP) or target bitrate, motion compensation range, etc. Furthermore, different encoders likely produce different compressed streams. Depending on the encoder and the configuration the same source video is compressed differently, each having its own bitrate and distortion value. Bjontegaard Delta-Rate (BD Rate) metric can be used to compare and choose the encoder or configuration, that provides the best compression results.