The answer is one that most of us probably can't afford, and even if we could afford it, probably would not buy because I'm guessing most of us are in not in the business of commercial video production and frankly the legally free, open source versions will do the job just fine.
What I wanted to test was the claims about hevc and av1 quality compared to h264. As some of you may recall, the claim was that hevc could offer the same quality as h264 at 50% less bit rate and that av1 could do the same compared to hevc at 30% lower bit rate.
I don't think I have ever see any review that tested that claim, and I know i haven't put it to the test, so here we are.
For test source, I wanted to use a professional grade source, that meant nearly all off the stuff from Xiph was out. The stuff on Black Magic's site is pretty interesting, and they do offer the raw camera files for many of their videos and i have tested them before, but I wanted something different.
In my opinion, the best source one can use is Tears of Steel; they offer 4tb of movie assets, an uncompressed y4m variant and a 4k DCI version, including a small 300mb version, for testing digital cinema servers. This is the type of file used when you go to a movie theater and watch a movie that is not on film and this was the test source i used.
Here is the media info for the source file:
Format : JPEG 2000
Format profile : D-Cinema 4k
Format settings, wrapping mode : Frame
Codec ID : 0D010301020C0100-0401020203010104
Duration : 20 s 833 ms
Bit rate : 124 Mb/s
Width : 4 096 pixels
Height : 1 716 pixels
Display aspect ratio : 2.40:1
Frame rate : 24.000 FPS
Color space : XYZ
Chroma subsampling : 4:4:4
Bit depth : 12 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.737
Stream size : 309 MiB (100%)
Title : Picture Track
Color range : Full
For testing I used the latest nightly build of handbrake and I will admit i cheated, heavily in favor of x264.
I have seen the claim made that x264 + very slow preset is "mastering" quality, and recently I saw the claim, from a reputable source, that at the very slow preset x264 achieves "maximum quality", meaning that at any given bit rate it is not possible to get better quality.
I personally find this claim hard to believe, but for the sake of this test, I took it as sacrosanct.
I encoded a 10 bit x264, crf 22, tune film, baseline. The result was a 13.4 mb/s file.
The claim is hevc is 50% better, I encoded a 10 and a 12 bit x265, 1 pass, I set a bit rate of 6700 kb/s but both encodes ended up at about 7000 kb/s, with the fast preset.
The claim is av1 is 30% better than hevc, I encoded a 10 bit svt-av1, 1 pass, set the bit rate at 5154 kb/s, the encoder match the target for all practical purposes, encoder preset 6.
Testing notes, the source file needed to be cropped to 4096x1712 in order to be mod 8.
The x265 and svt-av1 encodes could be much higher quality, both of them support 16 bit internal processing, svt-av1 supports 12 bit output and the x265 and the svt-av1 encodes were much faster than the x264 encode.
For quality comparison I used MSU Video Quality Measurement Tool, free version and I used YUV PSNR, YUV SSIM superfast preset, MSE and Netflix VMAF. In PSNR and SSIM, x265 12 bit and svt-av1 10 bit trade punches.
I do not really understand how to interpret the results of the other 2 metrics, and this site does not allow the uploading of Excel files, but the table is below.
You can download the test source here:
https://mango.blender.org/production/4k-dcp-available-for-testing/
+ Reply to Thread
Results 1 to 14 of 14
-
Last edited by sophisticles; 26th Nov 2022 at 15:52.
-
Btw, just in case anyone wants to say what I think someone will say, please read this first.
https://handbrake.fr/docs/en/1.5.0/technical/video-bit-depth.html -
The x265 and svt-av1 encodes could be much higher quality, both of them support 16 bit internal processing, svt-av1 supports 12 bit output and the x265 and the svt-av1 encodes were much faster than the x264 encode.
For quality comparison I used MSU Video Quality Measurement Tool, free version and I used YUV PSNR, YUV SSIM superfast preset, MSE and Netflix VMAF. In PSNR and SSIM, x265 12 bit and svt-av1 10 bit trade punches.
a. x264 is good if you use really slow and (afaik) hardware decoder incompatible settings. (H.264 10bit)
b. x265, svt-av1 even when smaller and faster in encoding are not far away from the 'master x264 version'. So at the same speed or size they might 'win' over x264, if they scale linear int those regards.
c. comparing encoding speed or file size, x264 is dated.
What I wanted to test was the claims about hevc and av1 quality compared to h264. As some of you may recall, the claim was that hevc could offer the same quality as h264 at 50% less bit rate and that av1 could do the same compared to hevc at 30% lower bit rate.
I have seen the claim made that x264 + very slow preset is "mastering" quality,
For amusement:- Hacking VMAF and VMAF NEG: vulnerability to different preprocessing methods
- Hacking VMAF with Video Color and Contrast Distortion
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
Stuff like "but psnr = ..." always strikes me as measurbating. Numbers for bragging, marketing, but it's not always as useful as some seem to think.
Use you eyes, not a blind algorithm. This is a visual medium, not an academic math equation.
Video is more than math.
And math is art, not simple science. (And anybody that disagrees truly does NOT understand math.)Want my help? Ask here! (not via PM!)
FAQs: Best Blank Discs • Best TBCs • Best VCRs for capture • Restore VHS -
And math is art, not simple science. (And anybody that disagrees truly does NOT understand math.)
-
Thanks for the tests. I'm certain this sequence has been tested before (maybe not recently with the most current SVT-AV1 build)
Yes, something wrong with the numbers. Too low for all of them. There are some black frames at the end of the sequence, and the "max" values should be much higher too (it's difficult to get a black frame wrong). A max PSNR 35-36 when you have a black frame in the test sequence? Something is wrong
Maybe comparing mismatched frames ? Frame accuracy issue when parsing?
Maybe some pixel format issues ? e.g. if the 12bit 444 XYZ DCP version is the "original", how is up/down sampling for the conversion and comparison to 10bit 4:2:0 version being done ?
Maybe wrong source ? e.g. encode was cropped , was "original" cropped for the metrics ?
I'll take a closer look later when I have more time, but AV1 is pretty amazing at those bitrates. Much of the grain and detail is gone compared to the original, but it's still watchable. To put it another way , if you use x264 at those bitrates, it would look like mush. (AVC pretty much fails at UHD resolutions compared to the alternatives, although many broadasters in Europe still use AVC for UHD ... go figure that out...)
But there are the some known issues with SVT-AV1 and it's not quite mature yet. Temporal filter/scene change issue is the most common problem. People that use SVT-AV1 know to disable (-svtav1-params enable-tf=0) for actual usage. An typical example is frame 32, before the camera view scene change, there is a moderate degradation in quality - you can see macroblocks. If you increase the bitrate, even 3x, 4x - that frame will always be a lot lower quality than the others, because it's a fundamental problem for the current TF implementation. The developers know about it -
To address some of the points above:
In the past I have been accused of using "too much" bit rate, so I allowed x264 10-bit to decide how much bit rate to use and I chose crf 22 as a good setting that I think most would use for 4k content.
The "marketing claims", in this test turned out to be true, using PSNR and SSIM, both x265 10/12 bit and svt-av1 10 bit were able to beat x264 10 bit very slow using significantly less bit rate and much faster encoding speeds.
The objective metrics are only for comparison sake, to my eyes I see little difference between the various encodes.
At 13.4 mb/s it's not possible to achieve "mastering" quality, for comparison the ToS people have this gorgeous encode available, using x264, that has been cropped to 3840x1714 with a bit rate of 73 mb/s, cbr, and I am not sure that would be "mastering" quality.
For me the take away is that no one should be using any h264 encoder for anything, unless they are targeting a specific hardware device, for instance they wish to create a Blu-ray disk. Other than that, h264 is now where mpeg-2 was when h264 matured old outdated, and of little relevance other than some niche uses.
HEVC is still going strong and probably will for a few more years to come, but based on what I have seen from svt-av1, it's making less and less sense to not use that for most of one's encoding needs. -
Before you claim those marketing claims for PSNR/ SSIM are "validated", there are definitely problems with those posted numbers. A black frame should not get a max psnr of 36 ? Common sense should tell you something is wrong
"beating" x264 has always been true for the metrics (not necessarily the speed, depending on what settings you are using) and especially at UHD resolutions. The questions were always by how much, and how useful those metrics were. A 15 year old codec vs. modern ones ? If you don't get higher quality with modern codec, something is wrong. Common sense should tell you as much
The objective metrics are only for comparison sake, to my eyes I see little difference between the various encodes.
As good as AV1 is, you can't use less than 1/2 the bitrate and expect to keep grain and details. TOS has added grain on purpose, and it's smoothed away at lower bitrates by all codecs. ( AV1 has film grain synthesis option that is a promising feature, but still some issues with it. There are times where it can work well)
For me the take away is that no one should be using any h264 encoder for anything, unless they are targeting a specific hardware device, for instance they wish to create a Blu-ray disk. Other than that, h264 is now where mpeg-2 was when h264 matured old outdated, and of little relevance other than some niche uses.
It should be that way, AVC should be gone, but (unfortunately) AVC still is more common for usage cases today. Mobile, internet, phones, cameras. Currently 8bit AVC is faster to encode/decode for distribution - it's still the "common currency" in 2022. Many devices have HW support but not for HEVC, AV1, VP9, despite the licensing fees
HEVC is still going strong and probably will for a few more years to come, but based on what I have seen from svt-av1, it's making less and less sense to not use that for most of one's encoding needs.
Same story with HEVC - it was positioned to dominate early on, but never caught on. It was fraught with infighting and licensing fiascos and slowed development. The licensing bodies shot themselves in the foot and as much admitted that. They vowed not to make the same mistake with VVC.. we'll see. People are greedy -
Again, math is art. Numbers are easy to fudge, but often (at first) hard to find. (A good recent example is cryptocurrency, and entities like FTX.)
One of my favorite movie lines of all time, 1991 JFK movie, Jim Garrison line:
"The FBI says they can prove it through physics in a nuclear laboratory. Of course they can prove it. Theoretical physics can also prove that an elephant can hang off a cliff with its tail tied to a daisy! But use your eyes, your common sense. "
Again, use your eyes, use common sense. Not a fancy graph/chart based on fuzzy numbers (and usually by shysters trying to sell you snake oil).Want my help? Ask here! (not via PM!)
FAQs: Best Blank Discs • Best TBCs • Best VCRs for capture • Restore VHS -
I think people are getting way to hung up on whether or not objective metrics align with what one's eyes see.
My goal was to test the marketing claims that in objective metrics, namely psnr and ssim, hevc was able to match h264 at 50% less bit rate and that av1 was able to match hevc at 30% less bit rate.
I have shown that using this professional grade test source, and using open source, legally free implementations of these encoding standards, the claims are accurate.
I don't think anyone can argue, that regardless of what you may think of the metrics, or the quality of the encodes, both x265 and svt-av1 had impressive showings considering how much less bit rate was used for those encodes and the less than ideal encoder settings used for each.
The reality is that all of these encodes where done at much lower bit rates than i would use for my own work.
Consider, Netflix's 4k content is streamed at 15mb/s (I think) and people complain about the quality all the time.
BD, which is 1080p, uses 25 mb/s avc (usually), 4k BD uses about 100 mb/s, ToS own 4k release uses 70 mb/s; these encodes were done well below this.
I guess my underlying point, what I hope to convey to anyone thinking about "backing" up content, if they do plan on re-encoding, they should skip the 8-bit encoders all together, skip h264, use x265 12-bit or svt-av1 10-bit (12-bit, when it becomes widely available) and if you have the cpu horsepower, enable the 16-bit internal processing features of x265, which I am almost certain svt-av1 also supports.
I would also skip the hardware encoders available from AMD/Nvidia/Intel, from what I have seen, Intel's hardware AV1 encoder is equal to x264+veryslow using VMAF and Nvidia's AV1 is equal to Nvidia's HEVC. -
-
enable the 16-bit internal processing features of x265,
Doesn't x265 always use 16 bit for internal calculations when Main10 (or another high bit depth profile) is used? (last I checked, this was the case, and thanks to using 16bit for the more precise predictions you get a 'free' 5-10% compression boost)
=> would be nice if you can share which features you speak of and where the info comes from that with them 16bit internal precision is used and otherwise not.
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini
Similar Threads
-
Best h264 encoder
By spon901 in forum Video ConversionReplies: 77Last Post: 10th May 2020, 19:55 -
Best free encoder but also....
By AlexRisk in forum Newbie / General discussionsReplies: 8Last Post: 25th Apr 2020, 14:36 -
MP4 encoder
By akkers in forum Video ConversionReplies: 0Last Post: 18th Jan 2020, 05:52 -
About encoder profile
By BlurayHD in forum Video ConversionReplies: 1Last Post: 5th Jul 2019, 04:42 -
encoder h.265
By H265 in forum Video ConversionReplies: 4Last Post: 19th Jan 2018, 16:20