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. |
15th June 2009, 23:06 | #3 | Link |
Registered User
Join Date: May 2006
Posts: 957
|
The advantage is that you pick a quality then use the resulting bitrate in the second pass, but this does mean that you should use "slow" settings on the first pass. "Fast" settings alter the resulting bitrate by a fair amount.
If you are targeting a specific bitrate, I don't know if/why you should use crf for the first pass. [EDIT] Do the common "fast" settings use subme 1 or 2?
__________________
x264 log explained || x264 deblocking how-to preset -> tune -> user set options -> fast first pass -> profile -> level Doom10 - Of course it's better, it's one more. Last edited by J_Darnley; 15th June 2009 at 23:13. |
15th June 2009, 23:27 | #4 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
A 2-Pass encode with CRF in the first pass makes only sense if you want to use CRF plus VBV.
Unless VBV is involved, CRF works perfectly fine with a single pass. And if you are targeting for a specific filesize (or average bitrate), you will need to do a "classical" ABR 2-Pass encode anyway...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
15th June 2009, 23:47 | #5 | Link |
Hardware Aspirin
Join Date: Jul 2007
Posts: 461
|
I have never really used anything besides automatic 2 pass encode average bitrate encoding in MeGUI. But I am looking to expand my knowledge to different ways to encode.
So bear with me. I understand from here that CRF is a parameter to set the output quality and it selects bitrate by itself. Is it a 2 pass encode or just one pass ? Is it better than 2-pass average bitrate encode ?
__________________
Stream video on web in your quality |
15th June 2009, 23:49 | #6 | Link |
Registered User
Join Date: May 2006
Posts: 957
|
Plain CRF is one pass, it is equivalent to 2-pass at the same bitrate.
__________________
x264 log explained || x264 deblocking how-to preset -> tune -> user set options -> fast first pass -> profile -> level Doom10 - Of course it's better, it's one more. |
16th June 2009, 00:02 | #8 | Link | |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
It's also possible to run the first pass of a 2-Pass encode with CRF mode (instead of ABR mode), but the second pass will be ABR again (with the target bitrate that resulted from the first CBR pass). But I say it again: This kind of "2-Pass CRF" makes only sense, if you want to use CRF mode with VBV (because VBV doesn't perform well with a single pass). However if you are not using VBV, then CRF will work perfectly fine with a single pass! And if you want to do a "classical" 2-Pass encode to hit a desired filesize (or target betirate), then you can not run the first pass in CRF mode for obvious reasons... (BTW: ABR mode is used via "--bitrate x", CRF mode is used via "--crf x". These two parameters are not used at the same time!)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 16th June 2009 at 00:19. |
|
16th June 2009, 00:18 | #9 | Link | |
Hardware Aspirin
Join Date: Jul 2007
Posts: 461
|
Quote:
So is CRF faster than 2-pass encode but almost the same quality if they are the same bitrate ? Is it possible to judge than a certain CRF value like 18 would always have certain bitrate ?
__________________
Stream video on web in your quality |
|
16th June 2009, 00:22 | #10 | Link | ||
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
And as said before: A 2-Pass encode and a CRF encode of the same bitrate are equivalent. You probably couldn't tell the difference Quote:
(Try encoding a clean CGI source and a grainy "real life" source of the same length/resolution/framerate, both at the very same CRF value. They'll come out at completely different sizes)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 16th June 2009 at 00:41. |
||
16th June 2009, 01:45 | #11 | Link |
Hardware Aspirin
Join Date: Jul 2007
Posts: 461
|
What about two game videos with the same CRF setting ?
__________________
Stream video on web in your quality |
16th June 2009, 01:49 | #12 | Link | |
Registered User
Join Date: Apr 2009
Posts: 122
|
Quote:
now more questions: is crf more similar to 3pass or 2pass? (yes, i know that 3pass is only 1% or so better than 2pass). ignore vbv here. how exactly does using fast settings on the first pass influence the quality of the second pass? well here are my two guesses: 1. the .stats file is less accurate cus of the fast settings' intrinsic inaccuracy 2. when using fast settings, the final bitrate of the first pass varies more greatly from the specified bitrate than when using slow settings. also, by how much does a fast first pass influence the second pass's quality? i would guess that the decrease is along the lines of using 2pass over 3pass or using umh over tesa, but idk. @st devious they should come out at about the same size, depending on the quality of the video. a crysis video and a super mario video at the same resolution and crf would NOT have the save filesize |
|
16th June 2009, 12:51 | #13 | Link | |||
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Probably it would result in a more similar bitarte than sources of different type, but you still won't get the same bitrate and you still won't be able to predict the size in advance.
If you care about the resulting bitrate (or filesize), then simply don't use CRF Quote:
Quote:
Quote:
2) 2-Pass will always hit the desired target bitrate, even when using "fast" settings. Using faster settings (in the final pass) will only lower the "quality per bit". BTW: You can even use a bitrate for the second pass that differs from the bitrate that was used for the first pass. x264 will still hit the target bitrate! But be aware: The bigger the bitrate difference (first pass vs. second pass), the more quality will suffer. Ideally use the same bitrate for both passes.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 16th June 2009 at 17:53. |
|||
16th June 2009, 19:03 | #14 | Link | |
Registered User
Join Date: Apr 2009
Posts: 122
|
Quote:
or... is 3pass COMPLETELY useless. i mean even more useless than me-tesa Last edited by 10L23r; 16th June 2009 at 19:05. |
|
16th June 2009, 19:37 | #15 | Link |
Registered User
Join Date: May 2006
Posts: 957
|
x264 is very unlikely to do that and if it does there are probably other problems that you should fix before doing a third pass.
__________________
x264 log explained || x264 deblocking how-to preset -> tune -> user set options -> fast first pass -> profile -> level Doom10 - Of course it's better, it's one more. Last edited by J_Darnley; 16th June 2009 at 19:41. |
16th June 2009, 19:52 | #16 | Link | |
AviSynth/x264 user
Join Date: Jan 2009
Posts: 149
|
Quote:
If there is a specific bitrate you need to stay below, at the expense of quality, don't use CRF. Otherwise, use CRF.
__________________
archlinux |
|
16th June 2009, 20:13 | #17 | Link | ||
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
So if you specify 500 kbps for the first pass, then you will get a 500 kbps file after that first pass. And of course you still get a 500 kbps file after the second pass, unless you changed the target bitrate between the passes (which generally is NOT recommended). We don't need 2-Pass to hit a specific (average) bitrate or filesize! 1-Pass ABR can do that just fine! The one and only purpose of 2-Pass encoding is to improve the bitrate distribution within the file - under the given target bitrate restriction. So a 2-Pass encode gives significant better quality than a 1-Pass ABR encode of the same size (bitrate). But a thrid pass won't improve the quality any further! And yes, I'd consider three passes more "useless" than ME TESA. Anyway, I wouldn't use ME TESA, unless I had a lot of time to waste Quote:
2-Pass alone (without VBV) will hit the target average bitrate exactly, not just stay below it. But there may be bitrate spikes MUCH higher than the target (average) bitrate!
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 16th June 2009 at 20:29. |
||
16th June 2009, 20:52 | #18 | Link | |
Compiling Encoder
Join Date: Jan 2007
Posts: 1,348
|
Quote:
1pass ABR is allowed to fluctuate from the given bitrate based on the value of ratetol. if you throw ratetol up to something beyond the default value of 1, you allow it to diverge even farther away from the given bitrate. |
|
16th June 2009, 20:54 | #19 | Link | |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
The default value allows a divergence of 1%. So if you specify 500 kbps, you will end up with 505 kbps in worst case...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 16th June 2009 at 20:59. |
|
17th June 2009, 00:29 | #20 | Link |
Registered User
Join Date: Apr 2009
Posts: 122
|
uhm... ya 1%... how about 10%??
using r1165 from x264.nl: Code:
x264.exe --bitrate 500 --pass 1 --ref 4 --mixed-refs --bframes 6 -- b-adapt 2 --b-pyramid --weightb --direct auto --deblock -1:-1 --subme 7 --trelli s 2 --psy-rd 1.0:0.1 --8x8dct --me umh --threads 1 --thread-input --progress -- no-psnr --no-ssim --partitions all --output "huh.264" "bbb.avs" avis [info]: 640x352 @ 24.00 fps (241 frames) x264 [info]: using cpu capabilities: MMX2 Cache64 x264 [info]: profile High, level 3.0 x264 [info]: slice I:7 Avg QP:27.10 size: 15493 x264 [info]: slice P:100 Avg QP:30.12 size: 4086 x264 [info]: slice B:134 Avg QP:31.63 size: 1257 x264 [info]: consecutive B-frames: 7.7% 37.6% 38.5% 5.1% 8.5% 2.6% 0.0% x264 [info]: mb I I16..4: 15.7% 70.9% 13.4% x264 [info]: mb P I16..4: 2.0% 5.7% 0.4% P16..4: 44.1% 12.8% 9.4% 0.2% 0 .3% skip:25.0% x264 [info]: mb B I16..4: 0.3% 0.4% 0.0% B16..8: 39.5% 1.1% 1.6% direct: 2.8% skip:54.3% L0:37.1% L1:58.6% BI: 4.3% x264 [info]: final ratefactor: 27.47 x264 [info]: 8x8 transform intra:69.3% inter:64.1% x264 [info]: direct mvs spatial:94.8% temporal:5.2% x264 [info]: coded y,uvDC,uvAC intra:47.5% 71.2% 40.4% inter:12.7% 16.2% 2.5% x264 [info]: ref P L0 76.3% 12.6% 7.2% 3.9% x264 [info]: ref B L0 86.5% 9.6% 3.9% x264 [info]: ref B L1 93.6% 6.4% x264 [info]: kb/s:546.2 encoded 241 frames, 6.05 fps, 546.77 kb/s Last edited by 10L23r; 17th June 2009 at 00:35. |
Thread Tools | Search this Thread |
Display Modes | |
|
|