Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
16th March 2007, 06:14 | #1 | Link |
Registered User
Join Date: Mar 2007
Location: Russia
Posts: 9
|
x264: Constant quality vs constant file size
What case would be better for best quality of the resulting video if I want to encode 2-hour average dynamic 720x384 film into 700-1000 Mb file? Is there difference in quality of two equal sized files which are encoded whith CQ and CFS?
PS: all quality options are setted to maximum. CFS method works with 2-passes of course. |
16th March 2007, 08:22 | #3 | Link |
Contemporary Anachronism
Join Date: Mar 2005
Posts: 11
|
If you are storing it on the hard drive (or any other medium with high transfer speeds) and don't need predictable file size, CQ is what most people prefer.
CQ doesn't choke on high-motion, high-detail sequences (it just increases the bitrate for that sequence), so nitpickers can't complain that the fast-motion scenes are very blocky (or blurry). On the whole, CQ provides a consistent level of quality across the video, which many people find more natural-looking. The main drawback to CQ is that both the overall file size and the maximum bitrate are unpredictable, so it doesn't work well on any storage medium slower than about 30% of the uncompressed bitrate (because, depending on settings the bitrate could get that high (it could be higher, but it would not be worth it)) @check: that's only true if you are using average bit rate (abr) CQ is different entirely. Last edited by TechMage89; 16th March 2007 at 08:27. |
16th March 2007, 10:03 | #5 | Link |
ангел смерти
Join Date: Nov 2004
Location: Lost
Posts: 9,558
|
"Better" is too ambiguous to ask for proof of. But based on the human psychovisual system, average brightness still scenes are by far the most important, and fast-moving scenes can suffer quite a bit of damage before it becomes obvious. All two-pass systems exploit this, as does x264's crf mode. Single-pass bitrate can only approximate it with its imperfect information. That's why crf is generally superior to cq unless you really need superb high-motion quality (screenshots, huge hdtv, whatever).
Better considering psnr and ssim, usually not, unless you also weight them for motion/brightness/etc. But it's also usually small enough that it's not statistically significant; psnr differences aren't usually visually reliable unless they're more than 2dB. Last edited by foxyshadis; 16th March 2007 at 10:05. |
16th March 2007, 10:56 | #6 | Link | |
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
Quote:
Since complex scenes tends to hide artifacts better than simple scenes, the side effect is that visually the quality does seem to be somehow constant with CRF. CRF is more efficient than CQP only if you consider the final size.
__________________
|
|
16th March 2007, 11:50 | #8 | Link | |
ангел смерти
Join Date: Nov 2004
Location: Lost
Posts: 9,558
|
Quote:
I only mentioned brightness because I was talking about human vision, even though it's AQ that exploits that (among other things) and not the svn x264. Or rather, it's mostly xvid's AQ and kopernicus's patch. =p Last edited by foxyshadis; 16th March 2007 at 11:52. |
|
17th March 2007, 07:55 | #10 | Link |
Registered User
Join Date: Mar 2007
Location: Russia
Posts: 9
|
Yes, 2-pass better than constant quality. I tested two files PSNR and was surprised: 2-pass gives better quality (slightly larger PSNR and slightly more details on screen with 4x zoom). But it advantage is very small with quality=25 and nearly insignificant with quality=21. Also SSIM test shows identical values for both method. So if file size doesn't matter, constant quality is quite usable.
Last edited by ArtDen; 17th March 2007 at 08:16. |
23rd March 2007, 17:37 | #11 | Link | |
Emperor building empire
Join Date: Mar 2007
Location: ZAR
Posts: 674
|
How does Constant Quality 'really' work ???
I've been using AutoMKV with the H264 (=> MKV container) ConstantQuality-CRF profile.
I used AVInaptic on an episode of 'Band of Brothers' with the following Results ... which would indicate that although I used Q23... the Average Quantizer was 25.5 with a swing between Q10 and Q34... how wierd is that ??? Quote:
What gives... I want a real quantizer... all the profiles (Sharktooth, etc... seam to support Variable Quantizer settings). Pascal |
|
23rd March 2007, 21:11 | #13 | Link |
Registered User
Join Date: Jun 2005
Posts: 925
|
The problem with two-pass with a set filesize is that you have to set the filesize. You are much more likely to pick a filesize that is too small or too big. For example you might have a movie that 1hr 30 minutes long so you decide 900k might be the right value (0.21 bits per pixel). Well half the time that will be OK and half the time it will be not good enough. But if you pick a constant quality value and then encode you don't need to guess.
I guess you could encode once in CQ to get a filesize and then do a two pass encode to the same filesize and then if you look really, really, really hard you might see a difference between the two pass and single pass. So IMHO you are much more likely to get a "poor quality" movie by picking a filesize on your own than running CQ. Last edited by weaver4; 23rd March 2007 at 21:36. |
23rd March 2007, 21:46 | #14 | Link | |
Registered User
Join Date: Jun 2005
Posts: 925
|
Quote:
|
|
24th March 2007, 05:17 | #17 | Link |
x264 developer
Join Date: Sep 2004
Posts: 2,392
|
You don't want constant PSNR. I can't think of any application where it would be desirable.
Ratecontrol targets can be order on a scale of constant bitrate to constant PSNR, as follows. The visually optimal mode is somewhere in the middle, and is definitely not below CQP. Of course, these are not the only possible modes, there's a whole continuum of others in between, as well as different algorithms to implement these targets. CBR ABR CRF/2pass CQP CPSNR (CRF and 2pass are at the same point on the CBR-to-CPSNR continuum, because they have the same target bitrate distribution. 2pass just ends up slightly closer to that target.) Last edited by akupenguin; 24th March 2007 at 05:28. |
25th March 2007, 13:34 | #19 | Link |
Emperor building empire
Join Date: Mar 2007
Location: ZAR
Posts: 674
|
@nurbs
I guess you're right... eventhough check gives a beautifull description with the advantages of CRF on megui/x264 ABR question.
However, I think there are very real concerns about CQ-CRF as pointed out by weaver4 above and omion x264 constant quality first pass back in 2005. I suppose, like all encoding... there is no single solution and only by becoming more expert will we get closer to the Holy Grail of Encoding. Pascal |
25th March 2007, 19:18 | #20 | Link | |
x264 developer
Join Date: Sep 2004
Posts: 2,392
|
Quote:
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|