libx264 vs libopenh264 Dataset

Compare the libx264 and the libopenh264 encoders.

Download

mendevi download x264_vs_openh264.db.xz.torrent

Plots

Distortion and Consumption as a function of bitrate

Overall trend for all measures:

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

Result for a single video, including energy:

mendevi plot x264_vs_openh264.db -x rate -x energy -y psnr -c encoder -m effort -wy profile -f "ref_stem=='park_joy'"
Link between distortion and energy for each encoder

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'
Consumption 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'
Consumption 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.58<energy/nbr_frames<0.62 or 3.95<energy/nbr_frames<4.05"
Consumption 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.

Ressources

this paper (Performance comparison among popular implementations of H.264 encoders) compare the distortion of that codecs.

Reproduce

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