Mendevi 1.3.5

Measures of Encoding and Decoding of Videos.

[license GPL] [linting: ruff] [versions] [downloads] [documentation]

Useful links: Binary Installers | Source Repository | Online Documentation |

Description

This Python module performs energy consumption and video metrics measurements for both video encoding and decoding workflows. It includes comprehensive ready-to-use datasets, available as exhaustive SQL databases and lightweight JSON representations, as well as pretrained predictive models for energy and quality estimation. The framework provides advanced visualization tools for generating complex matplotlib figures, executable from a single command-line interface.

It manages the following parameters:

  1. It supports the libx264, libopenh264, libx265, libvpx-vp9, libaom-av1, libsvtav1, librav1e and vvc cpu encoders.

  2. It supports the h264_nvenc, hevc_nvenc, av1_nvenc and *_vaapi gpu encoders.

  3. Distortions are measured using the lpips, psnr, ssim, vif and vmaf metrics.

  4. Complexity are measured using the rms_sobel, rms_time_diff, spatial_dct and temporal_dct metrics.

  5. Encoding efforts are fast, medium and slow.

  6. It takes care about the colorspaces (range, transfer and primaries).

  7. Iterate over different effort, encoder, mode, quality, threads, fps, resolution and pix_fmt.

  8. Energy measurements are catched with RAPL and an external wattmeter on grid'5000.

  9. Get the cpu, gpu, ram and temperature activity.

  10. Get a full environment context, including hardware and software version.

  11. It support the mode (constant bitrate) cbr and (constant quality) vbr.

  12. Ability to modify ffmpeg commands on the fly to perform specific tests, ginving your own defined callback function.

  13. It take care to transfer files to RAM if possible to avoid biases related to storage space access.

  14. Provides a guide to compile ffmpeg with all optimizations in order to compare encoders/decoders at their limits.

Caution

The entire code was written by hand, without the use of AI!

Pipeline

This is the pipeline used for measurements:

Pipeline diagram

Example of result

Download and merge two datasets with this simple command:

mendevi merge svtav1_vs_rav1e_vs_aom.db x264_vs_openh264.db -o /tmp/av1_h264.db

Example of energy and rate distortion video encoding, on a single video for several profiles:

mendevi plot /tmp/av1_h264.db -x rate -x energy -y vmaf -c encoder -m effort -wy profile -f "ref_stem=='park_joy'"
Example plot

Alternatives

  1. The GREEM video encoding measurement tool.

  2. The MVCD database also includes video encoding and decoding energy measurements.

  3. The COCONUT database also includes video decoding measurements.

  4. The SEED and VEED dataset offers a comprehensive LCA and GPU measurements.

  5. The CTC videos and Big Buck Bunny are used for the tests. The videos are downloadable for these torrents.

Getting started

Dataset

Developer guide

API documentation

Reference

The documentation was generated on 2026-06-05 09H32.