Log in

View Full Version : hq lossless


vrpatilisl
29th October 2011, 07:05
hi
I read on mewiki that crf of 18 is best for dvd for transparent quality, but when the output size is same then 2pass vbr is better than crf 18. Is there any way of crf with 2pass or 3pass.how to know crf 18 output size without encoding or i have to encode with crf 18 then check the size and then again use vbr 2 pass to that size. please any shortcut for this. what is best bitrate to get transperent dvd backup in mkv format.
:stupid:

nurbs
29th October 2011, 07:43
when the output size is same then 2pass vbr is better than crf 18.
IIRC only when you use slow first pass and then it's only marginally better.

Is there any way of crf with 2pass or 3pass.
You can run a CRF encode with --pass 1. That will give you a stats file and you can use that and the resulting bitrate for the other passes. It will take about twice (2 pass) or three times (3 pass) as long as a straight CRF encode for almost no quality gain. Especially the third pass is a huge waste of time.

what is best bitrate to get transperent dvd backup in mkv format.
MKV is a container and has nothing to do with your bitrate choice in your case. The bitrate needed to get a transparent result depends on resolution, framerate and the source itself. Even with the same resolution and framerate a clean source like a cartoon will be easier to encode than something noisy/grainy like 300. That's what CRF encoding is for.

hello_hello
30th October 2011, 10:05
According to one of the x264 developers, for a given file size CRF and 2 pass encoding give you identical quality. In fact I think he said CRF encoding was slightly better but the difference is so tiny you'd have to have OCD to care. So if you're not fussed about the file sizes then there's not really much point using 2 pass encoding.

I've wondered myself why x264 doesn't report the final quality after running a 2 pass encode (at least I don't think it does). Maybe there's a reason it doesn't, but it'd be useful if it could.

vrpatilisl
30th October 2011, 16:56
if
i want best possible dvd rips to mkv which option is best crf 18 or 2 pass output size is not matter.

J_Darnley
30th October 2011, 19:41
crf and 2 pass at the same bitrate are the same quality. Since crf 18 will give you a good quality, just use that.

nibus
31st October 2011, 01:33
IMO CRF encoding is a much better option. The reason is that x264 knows how much bitrate a given video needs much better than you do, and in 2 pass encoding you have to specify a bitrate. Just trust x264 to choose the correct bitrate.

Find a suitable quality that is transparent to your eyes and use it. 18 is good, but I often go lower than that.

creamyhorror
31st October 2011, 04:49
I've wondered myself why x264 doesn't report the final quality after running a 2 pass encode (at least I don't think it does). Maybe there's a reason it doesn't, but it'd be useful if it could.
You can use --ssim to report the SSIM (a measure of quality). It's not entirely accurate since x264 doesn't optimise for SSIM unless you tell it to (e.g. psy-optimisations can pull SSIM down), but it's about all you can do for a calculated quality score. I use it on all of my encodes.

IIRC x264 also used to (?) display the final ratefactor for 2-pass encodes, but I don't remember when exactly this happens or if it still does. Anyone know?

akupenguin
31st October 2011, 16:17
IIRC x264 also used to (?) display the final ratefactor for 2-pass encodes, but I don't remember when exactly this happens or if it still does. Anyone know?
Never did. Because 2pass measures ratefactor in different units than CRF does, and there's no reliable way to translate between them. (Not saying it's hard to implement, just not as simple as printing the value of a variable.)

fields_g
2nd November 2011, 03:00
if i want best possible dvd rips to mkv which option is best crf 18 or 2 pass output size is not matter.

I am going to over simplify things a bit, but just want to make sure you are understanding this...

2nd pass VBR: You pick the file size, computer calculates visual quality and applies it uniformly to the entire clip that will achieve that requested size.

1 pass CRF: You pick the visual quality, computer varies the bitrate throughout the clip to achieve requested appearance, without care of final file size.

Since it seems you have time to kill and no file size requirements, choose CRF. If your goal is to make every bit count, you may look into more intense encoding parameters (a slower preset). If you are trying to obtain a closer to lossless encode and size is not a concern, reduce your CRF (no guarantee you will notice the effects though as you burn more bits)

Remember the actual CRF to achieve transparency is based on the person watching, the playback equipment, and the source content. 18 is a suggestion. Start with 18, adjust if desired.

ChiDragon
2nd November 2011, 06:31
crf and 2 pass at the same bitrate are the same quality.

Is this MeGUI FAQ (http://mewiki.project357.com/wiki/MeGUI/FAQ#What.27s_the_difference_between_Constant_Quantizer_and_Constant_Quality.3F) wrong or outdated? I ask because it's on the first page of Google results for "x264 constant rate factor."

Note that a 1pass constant quality/quantizer encode will not look as good as a 2pass encode to the same filesize.

nurbs
2nd November 2011, 08:50
It's wrong. See here (http://forum.doom9.org/showthread.php?p=1373437#post1373437) for example.

Given the same amount of encoding time, CRF is superior to 2-pass at the same bitrate. Given the same settings rather than the same time, they're effectively identical within margin of error. My recent tests show that CRF generally has a very slight edge, albeit the difference is so small that you'd have to have OCD to care.

hello_hello
2nd November 2011, 12:51
IIRC x264 also used to (?) display the final ratefactor for 2-pass encodes, but I don't remember when exactly this happens or if it still does. Anyone know?

Despite my praising of CRF encoding I actually performed a 2 pass encode the other day (for file size reasons which normally don't apply) so I went back to the MeGUI log. This in one line from the log:

---[NoImage] x264 [info]: final ratefactor: 16.53

Now I always assumed the final ratefactor would be the same thing as an equivalent CRF encode, so in the above example a CRF value of 16.53 should give me an encode of the same file size and quality as the 2 pass encode. Only a while back I mentioned it in a thread somewhere and someone (I think one of the x264 developers) replied that x264 doesn't report the CRF value after running a 2 pass encode, and unfortunately I never received clarification as to what the final ratefactor actually was.

Whatever it is, obviously x264 still reports it, but I've no idea if or how it relates to a CRF value.
Anyone know?

ChiDragon
2nd November 2011, 20:46
It's wrong. See here (http://forum.doom9.org/showthread.php?p=1373437#post1373437) for example.

Thanks. I've gone ahead and removed the sentence from the Wiki, though I don't know if it will stay gone.

akupenguin
3rd November 2011, 02:47
@hello_hello
Your final ratefactor was printed by the 1st pass, not the 2nd. 1st pass is normally ABR, and thus does all the same things that 1pass ABR does.
"final ratefactor" is an estimate of what CRF value would give the same filesize as you requested of your ABR encode.
However, x264 defaults to fast-first-pass, so 1st pass ratefactor is an estimate for fast CRF, not whatever preset you actually selected.