libx264 vs libopenh264 Dataset¶
Compare the libx264 and the libopenh264 encoders.
Name |
Value |
Description (link) |
Total |
|---|---|---|---|
video |
|
\(42\) |
|
profile |
|
\(2\) |
|
encoder |
|
\(2\) |
|
quality |
\(\left\{\frac{k}{17} \mid k \in [1,16] \right\}\) |
\(16\) |
|
effort |
|
\(3\) |
|
mode |
|
\(2\) |
|
thread |
\(\left\{ 8 \right\}\) |
\(1\) |
|
repeat |
\(2\) times |
total repetitions |
\(2\) |
ramdisk |
|
shm in enc_cmd |
\(1\) |
host |
|
\(1\) |
|
metrics |
|
||
total |
\(\prod\) |
total number of points |
\(32256\) |
Download¶
mendevi download x264_vs_openh264.db.xz.torrent
x264_vs_openh264.json.xz (18.3 Mo).
x264_vs_openh264.db.xz.torrent (7.0 Go).
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
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'"
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'
Compression efficiency for rate=2Mb/s¶
mendevi plot x264_vs_openh264.db -x psnr -y energy -c '(encoder, profile)' -m category -f '1.8e6<rate<2.2e6'
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"
Conclusion¶
The main consumption factor is the resolution, not the encoder.
At equal resolution and quality,
libopenh264consumes less energy thanlibx264.libx264has a large variance in energy consumption depending on the preset and the video content. It is therefore much less predictable thanlibopenh264.
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*