Log in

View Full Version : Very Fast vs Slow, CRF & Tune Settings Questions


Rontero
11th June 2013, 05:07
So I'm trying get the most quality but I'm also trying to keep size down.

I'm using CRF between 18 and 23 depending.

What has me a bit baffled is the preset Very Fast setting while using the --tune film switch results in smaller files than the same at preset Slow. I assume the much lower bitrate of Very Fast means the quality is suffering quite a bit. The problem I have is when I set the --tune to psnr or ssim to try to quantify it, I get a much larger file on Very Fast and now it is larger than on Slow as expected.

What gives? How do I benchmark the quality lost by using Very Fast when the bit rate drops like that? Should I assume the 10% decrease in bit rate is (and resultant smaller file) is causing a double hit to the video quality? That the larger file size on Slow is means much improved quality due to the fact that the bit rate went up AND the encoding settings are turned up to give more quality per bit?

Second question... I figured out a good setting for 1080p action video. (preset Slow, CRF 20, Tune Film) but that combo gives me too big of a file for slower paced video. Would I be better off taking the resolution down from 1080p to 720p or upping the CRF to 23 or so? How many notches of CRF does it take to degrade video to the point that lower resolution will give better results at a higher CRF?

Thanks for any help with this...

Blue_MiSfit
11th June 2013, 07:31
You just have to look at the quality. At the same CRF, a faster preset might create a smaller file than a slower preset - as you've witnessed. However, that file is likely to be of somewhat lower quality. x264 is really good, even on faster speed settings, but do be aware of the issue. Faster presets might warrant a slightly lower CRF.

When comparing speed presets (or any settings affecting quality), you need to compare at the same bitrate. The best way to do this is with a 2 pass VBR encode.

Regarding your second question, I basically always suggest going down to 720p, unless you've got bitrate to burn. Very little of the 1080p content out there is noticeably degraded by being stored in 720p. However, you need to make your own decision. As to "how many notches of crf does it take...", only you can decide.

Asmodian
11th June 2013, 21:00
For myself, I would resize to 720 before going above crf 21 but that is just a rule of thumb, everything is source dependent after all. ;)

And, as Blue_MiSfit already said, if you want an objective measurement of the quality difference between "slow" and "very fast" do two two pass encodes targeting the same bitrate with --tune SSIM.

benwaggoner
11th June 2013, 23:28
Regarding your second question, I basically always suggest going down to 720p, unless you've got bitrate to burn. Very little of the 1080p content out there is noticeably degraded by being stored in 720p. However, you need to make your own decision. As to "how many notches of crf does it take...", only you can decide.
Maybe if reencoding from already significantly compressed sources. But I can easily see the difference between 720p and 1080p encodes even on my 8.9" Kindle Fire HD.

You can generally get away with a slightly higher CRF at higher frame sizes, though.

Asmodian
12th June 2013, 05:15
I agree, I do notice the difference between 720p and 1080p but I don't like compression artifacts which I usually start to notice around crf 21. However, I don't mind larger files so I might be too picky for some. 21 is pretty high already. I think it depends on the source is also a matter of taste; weather or not you like the increase in resolution more than the lack of any visible artifacts.

Rontero
12th June 2013, 20:41
Thanks for the replies. It doesn't look like objective quality benchmarks are going to work to compare CRF.

I was really stumped why using --tune film gave a drop in bit rate on Very Fast compared to Slow. Obviously a lower bit rate means you are losing quality or improving compression while preserving quality. Using most other --tune settings, VF would just result in a higher bit rate and quality appears dependent upon CRF.

I just know there's no such thing as a free lunch. When the bitrate drops and yet the encode time is 4-5X faster, then I know there is a loss in quality even if I cant really notice it.

I think I had a case of wishful thinking that "CRF" affects quality and "preset" affects speed but the fact is they are intertwined.

The truth is I really cant see much of a difference at all between any of the settings I use as long as I use --tune film, CRF 18 to 22 and Any preset "speed" setting between VF and VS. I can see the quality difference between my source and the final file but it is extremely minor. I can also see slight differences between 22 and 18 but not anything that drives me nuts.


The problem I have with "quality" issues is that I may not notice it now but once its pointed out or I do see it, it drives me nuts. I am perfectly happy living in the bubble until it bursts. :)


What do you guys mean by "artifacts"? The only artifacts I see are a slight loss of detail in a certain areas of a scene. I do not see macro-blocking, or gross banding problems or that flickering between grey and black that you would see in dark, low contrast areas.

Asmodian
12th June 2013, 20:55
By "artifacts" I do mean those patches of loss of detail. The reason I think of it as an "artifact" is because it is non-uniform, i.e. a patch of low detail texture on an otherwise high-detail face, hair, fabric, etc. If you aren't watching for it they probably don't jump out at you. But once you start looking... you cannot un-pop the bubble. ;)

benwaggoner
12th June 2013, 22:16
Thanks for the replies. It doesn't look like objective quality benchmarks are going to work to compare CRF.
Well, there is some correlation, although not a perfect one. But the correlation to subjective video quality will certainly be better than PSNR, SSIM, and QP.

I think I had a case of wishful thinking that "CRF" affects quality and "preset" affects speed but the fact is they are intertwined.
To some degree. But you're not going to see a huge swing in perceptual quality at the same CRF with different --presets, particularly not within the reasonable range (Default to Veryslow).

Rontero
13th June 2013, 03:48
If you aren't watching for it they probably don't jump out at you. But once you start looking... you cannot un-pop the bubble. ;)

Funny story... When I first got DirecTV back in the 90s I was raving about how good it looked and then a friend came over and commented about how you can really see the compression artifacts. {Pop!} My TV experience was never the same after that. :(