libx264 vs libopenh264 Dataset

Compare the libx264 and the libopenh264 encoders.

Download

mendevi download x264_vs_openh264.db.xz.torrent

Plots

Distortion as a function of bitrate

mendevi plot '<x264_vs_openh264.db>' -x rate -y psnr -y vmaf -wx category -c '(encoder, profile)' -m effort
Distortion as a function of bitrate

Consomation as a function of bitrate

mendevi plot '<x264_vs_openh264.db>' -x rate -y energy -wx category -wy profile -c encoder -m effort -f "category in {'4K-TV', 'Gaming'}"
Consomation as a function of bitrate

Compression efficiency for PSNR=35dB

mendevi plot '<x264_vs_openh264.db>' -x rate -y energy -c '(encoder, profile)' -m category -f '34.5<psnr<35.5'
Consomation as a function of bitrate for a psnr of 35dB

Compression efficiency for rate=2Mb/s

mendevi plot '<x264_vs_openh264.db>' -x rate -y energy -c '(encoder, profile)' -m category -f '1.8e6<rate<2.2e6'
Consomation as a function of bitrate for a bitrate of 2Mb/s

Compression efficiency for fixed energy

mendevi plot '<x264_vs_openh264.db>' -x rate -y psnr -wx 'round(energy/nbr_frames, 1)' -c encoder -m '(profile, effort)' -f "0.29<energy/nbr_frames<0.31 or 2.45<energy/nbr_frames<2.55"
Consomation as a function of bitrate for a fixed energy

Conclusion

  • The main consumption factor is the resolution, not the encoder.

  • At equal resolution and quality, libopenh264 consumes less energy than libx264.

  • libx264 has a large variance in energy consumption depending on the preset and the video content. It is therefore much less predictable than libopenh264.

Reproduce

for video in ctc/*.mkv; do
    mendevi prepare $video -p sd
    mendevi prepare $video -p fhd
done
mendevi encode reference* -e fast -e medium -e slow -m cbr -m vbr -c libx264 -c libopenh264
mendevi probe sample_* --psnr --ssim --vif --vmaf