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. |
4th September 2018, 09:01 | #6322 | Link |
Registered User
Join Date: May 2009
Posts: 184
|
Thanks LigH. Well, that's kind of what I'm asking... Will a 1-pass ABR encode using the existing stats file produce the same result as if it were a 2nd pass?
Basically I'm using staxrip as the GUI and the encode options are 2-pass, Bitrate (1-pass ABR) and Quality (CRF). If I select 2-pass again then it will just start again and run another 1st pass creating a new stats file. But if I select Bitrate ABR mode and add --pass 2 and --stats as custom encode options, when I set it going it takes a few seconds to read the stats file and then states --stats read once it starts. So its definitely using the stats file but my concern is is it using the 'proper' 2nd pass algorithm and not the poorer 1-pass ABR algorithm which I believe is internally different to the other modes... Thanks. |
4th September 2018, 09:08 | #6323 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,782
|
I don't know which GUI you are using (x265 is a CLI encoder). If you can't select "2-pass, 1st pass" and "2-pass, 2nd pass" separately, but only "2-pass" as a bundle, then it may not be very helpful for your case.
The workaround you describe may work, but I didn't think much about it. After you tell us which GUI you are using, we might know a better solution, with or without this GUI. By the way, the 1st pass may have been so quick, it could have been ran in the meantime... Last edited by LigH; 4th September 2018 at 09:11. |
4th September 2018, 09:29 | #6324 | Link | |
Registered User
Join Date: May 2009
Posts: 184
|
Quote:
Well, the reason I didn't necessarily want to re-run the 1st pass is that I use custom 1st pass settings which are almost the same as the 2nd pass settings with a few changes to speed it up a bit. So it this instance the 1st pass took aalmost 6 hours... so if I can re-use it's stats file then it would save me 6 hours at least anyway! Would also like to know for future reference really, in case it happens again. Thanks. |
|
4th September 2018, 09:41 | #6325 | Link |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,347
|
So just run the 2nd pass again using the stats file? Thats part of what makes the separate passes so nice, you can just run the 2nd pass again. Ordinarily one might use it to tune settings or whatnot, but if it failed you can also just start over.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders |
4th September 2018, 10:22 | #6326 | Link | |
Registered User
Join Date: May 2009
Posts: 184
|
Quote:
But I was just unsure whether I'd be unwittingly running an encode using ABR rate control mode as that's the option I'm having to select in Staxrip even though it's using a stats file already created from a successful 1st pass. I believe ABR rate control mode is not recommended under any circumstances unless you must hit a certain bitrate/size and simply dont have the time for a 1st pass as it uses a different interal algorithm to CRF or 2pass encodes... |
|
4th September 2018, 11:26 | #6327 | Link |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,347
|
You should probably ask the authors of that GUI how to run only a 2nd pass again. With the x265 CLI interface its pretty straight forward.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders |
4th September 2018, 11:40 | #6329 | Link |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,347
|
Basically yes, together with all other encoding options.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders |
4th September 2018, 11:54 | #6330 | Link |
Registered User
Join Date: May 2009
Posts: 184
|
Thanks. Yeah, that's what I've done in the Staxrip custom command line options section.
I set it going before I headed off to work this morning and it definitely read/loaded the stats file before starting the encode and stated "stats-read" on the GUI output display anyway. Which it always does on a 2nd pass and states "stats-write" on a 1st pass. |
4th September 2018, 14:27 | #6331 | Link |
Registered User
Join Date: Jun 2018
Posts: 56
|
Hey guys, you might overlook the three pass encode for a fine result. The 1-pass ABR encode have two meaning, the --pass 1 activated first pass ABR encode and the initial ABR encode without --pass 1 activated. Once the --pass 1 is not included in the first pass ABR encode, add the --pass 1 and the --pass 2 for the following second and third pass encode. Else you could add --pass 3 and --pass 2 for the following three pass encode.
|
4th September 2018, 20:04 | #6332 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
|
Quote:
|
|
4th September 2018, 22:24 | #6333 | Link | |
Registered User
Join Date: Aug 2016
Posts: 60
|
Quote:
There was only ever the most microscopic detail improvements in low-contrast/high motion over a 2-pass, but these were easily homogenised out by the video processors in my TV's. |
|
4th September 2018, 23:39 | #6334 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
|
Quote:
|
|
5th September 2018, 09:18 | #6335 | Link | ||
Registered User
Join Date: May 2009
Posts: 184
|
On the subject of multi-pass encodes, has anyone done much testing of the multi-pass-opt options --multi-pass-opt-analysis and --multi-pass-opt-distortion?
Quote:
Quote:
And opt-distortion refines and re-balances QP distribution during subsequent passes based on info gathered in the 1st pass. Which sounds like a no brainer to use as long as it performs as it should... And perhaps even provides a genuine quality advantage to multi-pass encodes over CRF. |
||
5th September 2018, 12:39 | #6336 | Link |
Registered User
Join Date: Jun 2018
Posts: 56
|
The three pass encode is a refine of two pass encode where the original second pass encode is put at the end and an additional pass of slice-type / bit distribution encode inserted after the first pass. It is often to see that x265 places b-frame on some arbitrary location (not sub-optimal at all) even when the Quantization Parameter is not fluctuating everywhere. For the first pass encode, it get worse when x265 has to guess the target Rate Factor and the slice-type decision would be interfered by those Quantization Parameter fluctuation. The second pass in the two pass encode simply read the slice-type distribution from the first pass without any enhancement. The b-frame distribution is much consistent in the three pass encode. The three pass encode would place those b-frame like a specific case of two pass encode that utilize Constant Rate Factor encode for the first pass and Average Bit Rate encode for the second pass. That's why I prefer three pass encode.
For the --multi-pass-opt-analysis and the --multi-pass-opt-distortion, x265 prefers the Psycho-visual Rate Distortion measure to bias the Quantization Parameter in advance. I'm not a fan of those stuff. The compression efficiency based on non Psycho-visual metrics, for example the PSNR per bit, should still be a fundamental parts of encoder development. I'm aware that some encoder could trick on PSNR, but it doesn't sway my decision making. |
5th September 2018, 19:25 | #6337 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
|
Quote:
|
|
6th September 2018, 08:55 | #6338 | Link | |
Registered User
Join Date: May 2009
Posts: 184
|
Quote:
1st pass runs ok and creates the usual stats file plus a huge (11.5gb!) analysis file. Then crashes when it tries to run the 2nd pass if --multi-pass-opt-distortion has been set. Are the developers aware of this? Thanks. |
|
7th September 2018, 08:18 | #6339 | Link | |
Registered User
Join Date: May 2009
Posts: 184
|
Here's my Staxrip log for the error when trying to start the 2nd pass when --multi-pass-opt-distortion is set.
Quote:
|
|
|
|