Files
com.xaymar.www/_posts/2022/2022-01-10-h264-encoder-showdown.html
T
Michael Fabian 'Xaymar' Dirks 8e948bf018 Add "Review" to H264 encoder showdown
2022-03-06 06:40:59 +01:00

117 lines
8.5 KiB
HTML

---
title: "H264 Encoder Showdown: Which one is the best?"
category: [Blog, Review]
tags: [Video, Encoding, H264, NVIDIA, AMD, x264]
videos:
videos:
- id: "arma3_altis-driving_2560x1440_50fps_YUV444-PC-sRGB"
name: "ARMA 3: Altis - Driving"
poster: "https://cdn.xaymar.com/blog/2022/01/hes/arma3_altis-driving_2560x1440_50fps_YUV444-PC-sRGB.jpg"
- id: "arma3_altis-walk-through-foliage_2560x1440_50fps_YUV444-PC-sRGB"
name: "ARMA 3: Altis - Walk Through Foliage"
poster: "https://cdn.xaymar.com/blog/2022/01/hes/arma3_altis-walk-through-foliage_2560x1440_50fps_YUV444-PC-sRGB.jpg"
- id: "grip_combat_racing-001"
name: "GRIP Combat Racing #001"
poster: "https://cdn.xaymar.com/blog/2022/01/hes/grip_combat_racing-001.jpg"
- id: "grip_combat_racing-002"
name: "GRIP Combat Racing #002"
poster: "https://cdn.xaymar.com/blog/2022/01/hes/grip_combat_racing-002.jpg"
resolutions:
- "2560x1440"
- "2240x1260"
- "1920x1080"
- "1600x900"
- "1280x720"
- "960x540"
- "640x360"
bitrates: [10000, 8500, 6000, 3500]
encoders:
- name: "x264 veryfast"
url: "https://cdn.xaymar.com/blog/2022/01/hes/x264/veryfast/:video-:res-:ratek-x264.mp4"
- name: "x264 medium"
url: "https://cdn.xaymar.com/blog/2022/01/hes/x264/medium/:video-:res-:ratek-x264.mp4"
- name: "AMD Vega H.264"
url: "https://cdn.xaymar.com/blog/2022/01/hes/amd-vega/:video-:res-:ratek-amf264.mp4"
- name: "AMD Vega H.264 (HQ)"
url: "https://cdn.xaymar.com/blog/2022/01/hes/amd-vega-hq/:video-:res-:ratek-amf264.mp4"
- name: "AMD Vega H.264 (HQ+MB)"
url: "https://cdn.xaymar.com/blog/2022/01/hes/amd-vega-hq+mb/:video-:res-:ratek-amf264.mp4"
- name: "AMD RDNA2 H.264"
url: "https://cdn.xaymar.com/blog/2022/01/hes/amd-rdna2/:video-:res-:ratek-amf264.mp4"
- name: "AMD RDNA2 H.264 (HQ)"
url: "https://cdn.xaymar.com/blog/2022/01/hes/amd-rdna2-hq/:video-:res-:ratek-amf264.mp4"
- name: "AMD RDNA2 H.264 (HQ+MB)"
url: "https://cdn.xaymar.com/blog/2022/01/hes/amd-rdna2-hq+mb/:video-:res-:ratek-amf264.mp4"
- name: "NVIDIA Ampere H.264"
url: "https://cdn.xaymar.com/blog/2022/01/hes/nvidia-ampere/:video-:res-:ratek-nv264.mp4"
# - name: "AMD Vega H.265"
# url: "https://cdn.xaymar.com/blog/2022/01/hes/amd-vega/:video-:res-:ratek-amf265.mp4"
# - name: "AMD RDNA2 H.265"
# url: "https://cdn.xaymar.com/blog/2022/01/hes/amd-rdna2/:video-:res-:ratek-amf265.mp4"
# - name: "NVIDIA Ampere H.265"
# url: "https://cdn.xaymar.com/blog/2022/01/hes/nvidia-ampere/:video-:res-:ratek-nv265.mp4"
---
{% capture content %}Almost three years have passed since I did my original full hardware encoder showdown, and the field has changed drastically since then. NVIDIA brought out the Turing and Ampere architecture, AMD finally designed a useful GPU architecture, and even Intel is entering the market now. Finally no longer a Red vs Green battle, but a Red vs Green vs Blue - the full RGB experience! But also due to that, my data is now well beyond outdated, and its time to refresh.{% endcapture %}{% include blocks/paragraph.liquid content=content %}
{% capture content %}Unfortunately for me, sourcing hardware for testing purposes right now is near impossible at reasonable prices, so I had to opt for unusual methods to acquire it. Instead of buying a dedicated AMD GPU - which would have been very expensive - I instead opted for a Laptop with Dual-AMD Graphics and an AMD CPU. The latter to fulfill my daily usage needs (compiling software), the former to fulfill testing conditions for video encoding. In any case, it was two flies with one stone - or however that saying goes - and I had what I needed.{% endcapture %}{% include blocks/paragraph.liquid content=content %}
{% capture content %}So, as it is usual, I drank my coffee as my automated script did what I told it to do. Then I fixed the automated script to actually do what I thought it did, and repeated this charade twice more because it's obviously fun, and I definitely did not forget to put an "s" at the end of a variable reference - twice. Without any further interruptions, here are a few hundred video examples for your watching pleasure.{% endcapture %}{% include blocks/paragraph.liquid content=content %}
{% capture content %}<b>Update 2022-01-11:</b> Added x264 veryfast files and newly discovered AMF settings that drastically improve quality.{% endcapture %}{% include blocks/paragraph.liquid content=content %}
{% for video in page.videos.videos %}
{% capture capture_video %}
{% for bitrate in page.videos.bitrates %}
{% assign title_bitrate=bitrate | append: "kbit" %}
{% capture capture_bitrate %}
{% for resolution in page.videos.resolutions %}
{% capture capture_resolution %}
{% capture columns %}
{% for encoder in page.videos.encoders %}
{% capture column %}
{% assign caption=encoder.name %}
{% assign real_url=encoder.url | replace: ":video", video.id | replace: ":res", resolution | replace: ":rate", bitrate | absolute_url %}
{% include blocks/media.liquid type="video" url=real_url caption=caption poster=video.poster muted=true preload="none" lazyload=true %}
{% endcapture %}{% include blocks/column.liquid content=column %}
{% endfor %}
{% endcapture %}{% include blocks/columns.liquid content=columns %}
{% endcapture %}{% include blocks/details.liquid title=resolution content=capture_resolution level=3 %}
{% endfor %}
{% endcapture %}{% include blocks/details.liquid title=title_bitrate content=capture_bitrate level=2 %}
{% endfor %}
{% endcapture %}{% include blocks/details.liquid title=video.name content=capture_video level=1 open=true %}
{% endfor %}
{% include blocks/heading.liquid content="Results" level=1 %}
{% capture content %}I'm glad I switched to a useful Software for making websites, otherwise adding this many videos would have taken more than a week to do. I've ran every video through VMAF, SSIM and PSNR - which took a long while, but that's why I have multiple computers - and then combined all the data. While SSIM was usually an outlier, overall it did not deviate much from PSNR or VMAF.{% endcapture %}{% include blocks/paragraph.liquid content=content %}
{% capture content %}Unfortunately I no longer have all the hardware available, so some of the results are based on extrapolated data - which might paint it in a much nicer light than it really is, or a much worse light. Additionally, I have not uploaded a few files in order to save on space on the CDN machine. Space is expensive, and sadly I can't yet just grow money - no matter how much the Cryptocurrency people believe it is possible to do that. In any case, here is the placement for each H264 encoder, rated by PSNR, SSIM and VMAF: {% endcapture %}{% include blocks/paragraph.liquid content=content %}
{% capture content %}
<li>x264 placebo <sub>(Hidden)</sub><br>
x264 veryslow <sub>(Hidden)</sub></li>
<li>x264 slower <sub>(Hidden)</sub></li>
<li>x264 slow <sub>(Hidden)</sub></li>
<li>NVIDIA NVENC Turing/Ampere</li>
<li>x264 medium</li>
<li>x264 fast <sub>(Hidden)</sub><br>
x264 faster <sub>(Hidden)</sub></li>
<li>x264 veryfast<br>
NVIDIA NVENC Pascal <sub>(Estimated from previous Test Run)</sub><br>
AMD AMF RDNA2 (HQ)</li>
<li>AMD AMF RDNA2 (HQ+MB)</li>
<li>AMD AMF GCN3 and GCN3 <sub>(Estimated from previous Test Run)</sub></li>
<li>x264 superfast <sub>(Hidden)</sub></li>
<li>AMD AMF RDNA2</li>
<li>AMD AMF GCN5 (Vega)</li>
<li>AMD AMF GCN3.4 and GCN4 (Polaris) <sub>(Estimated from previous Test Run)</sub></li>
<li>AMD AMF GCN2 <sub>(Estimated from previous Test Run)</sub></li>
<li>AMD AMF GCN1 <sub>(Estimated from previous Test Run)</sub></li>
<li>x264 ultrafast <sub>(Hidden)</sub></li>
{% endcapture %}{% include blocks/list.liquid content=content ordered=true %}
{% capture content %}As expected, x264's presets are all a quality step higher than the next faster one - except for placebo, which had no room to shine here. The "new" NVIDIA Turing/Ampere NVENC also proves its place by winning just enough comparisons to sit between slow and medium. AMD also appears to finally have moved some heads around and improved their encoder. Perhaps over the next year, AMD, NVIDIA and Intel will invade the hardware encoder scene with new and exciting things.{% endcapture %}{% include blocks/paragraph.liquid content=content %}
{% capture content %}Anyway, with my piece said, and tons of videos here, I will say goodbye and leave you with this wall of videos to scout through.{% endcapture %}{% include blocks/paragraph.liquid content=content %}