Log in

View Full Version : x264 Blu-ray 1st pass settings?


rack04
16th July 2009, 01:05
Which of the following settings are not needed for the 1st pass?

--profile high --tune film --pass 1 --bitrate %DESIRED_BITRATE% --stats "%WORKING_DIRECTORY%\%SOURCE_FILENAME%.stats" --level 4.1 --keyint 24 --min-keyint 1 --b-adapt 2
--b-pyramid --direct auto --vbv-bufsize 30000 --vbv-maxrate 24000 --thread-input --sar 1:1 --aud --output NUL "%INPUT_VIDEO%" --mvrange 511 --nal-hrd

LoRd_MuldeR
16th July 2009, 01:16
Since r1177 x264 will automatically lower all options that aren't required for a first pass, when "--pass 1" is set (unless "--slow-firstpass" is set at the same time).

So you don't need to worry too much. Basically you can use the same options for both passes now. Except for "--pass 1" vs. "--pass 2", of course :p

/* Set faster options in case of turbo firstpass. */
if( b_turbo && b_pass1 )
{
param->i_frame_reference = 1;
param->analyse.b_transform_8x8 = 0;
param->analyse.inter = 0;
param->analyse.i_me_method = X264_ME_DIA;
param->analyse.i_subpel_refine = X264_MIN( 2, param->analyse.i_subpel_refine );
param->analyse.i_trellis = 0;
}

Anyway, at least "--profile high" is superfluous, as that's simply the default. And "--sar" doesn't matter, if you write the output to NUL ;)

rack04
16th July 2009, 01:36
Since r1177 x264 will automatically lower all options that aren't required for a first pass, when "--pass 1" is set (unless "--slow-firstpass" is set at the same time).

So you don't need to worry too much. Basically you can use the same options for both passes now. Except for "--pass 1" vs. "--pass 2", of course :p

/* Set faster options in case of turbo firstpass. */
if( b_turbo && b_pass1 )
{
param->i_frame_reference = 1;
param->analyse.b_transform_8x8 = 0;
param->analyse.inter = 0;
param->analyse.i_me_method = X264_ME_DIA;
param->analyse.i_subpel_refine = X264_MIN( 2, param->analyse.i_subpel_refine );
param->analyse.i_trellis = 0;
}

Anyway, at least "--profile high" is superfluous, as that's simply the default. And "--sar" doesn't matter, if you write the output to NUL ;)

Thanks. I assume --aud isn't needed since output is NUL? Also, where does it say that --profile high is default?

nurbs
16th July 2009, 07:45
The --profile command restricts which settings you can use. Default are no restrictions (--profile high) since the default output of x264 is high profile (8x8dct is on by default). If you would use --profile main you wouldn't be able to use CQMs or 8x8dct.
--aud isn't needed, but I don't think it makes a difference speed-wise if it's there.

rack04
9th August 2009, 17:09
For Blu-ray encodes is --nal-hrd required in the first pass?

Fishman0919
9th August 2009, 18:07
For Blu-ray encodes is --nal-hrd required in the first pass?

--nal-hrd is not needed for BulRay if you are using tsMuxeR to convert your mkv to AVCHD Disc, tsMuxeR does it for you.

SmartLabs tsMuxeR. Version 1.10.6 http://www.smlabs.net
Decoding H264 stream (track 1): Profile: High@4.0 Resolution: 1920:1080p Frame rate: 23.976
H.264 stream does not contain fps field. Muxing fps=23.976
H264 bitstream changed: insert nal unit delimiters
H264 bitstream changed: insert pict timing and buffering period SEI units
Decoding AC3 stream (track 2): Bitrate: 640Kbps Sample Rate: 48KHz Channels: 6

rack04
9th August 2009, 18:13
What about --sar 1:1? Is that required for a blu-ray encode?

shon3i
9th August 2009, 18:35
--nal-hrd is not needed for BulRay if you are using tsMuxeR to convert your mkv to AVCHD Disc, tsMuxeR does it for you.

SmartLabs tsMuxeR. Version 1.10.6 http://www.smlabs.net
Decoding H264 stream (track 1): Profile: High@4.0 Resolution: 1920:1080p Frame rate: 23.976
H.264 stream does not contain fps field. Muxing fps=23.976
H264 bitstream changed: insert nal unit delimiters
H264 bitstream changed: insert pict timing and buffering period SEI units
Decoding AC3 stream (track 2): Bitrate: 640Kbps Sample Rate: 48KHz Channels: 6
I do not know how much is smart because tsmuxer always assume vbv-buffersize 30000 and vbv-maxrate 30000 and create HRD model, which means that if a user specify different VBV stream is get new HRD model, effect can be seen by comparing the Elecard Stream Eye, stream get un/overflows.

LoRd_MuldeR
9th August 2009, 18:40
What about --sar 1:1? Is that required for a blu-ray encode?

You never need so set "--sar 1:1" (aka "square pixels") because that's the default value of x264 :p

Use the "--sar" switch when encoding anamorphic material...

kemuri-_9
9th August 2009, 19:10
You never need so set "--sar 1:1" (aka "square pixels") because that's the default value of x264 :p

actually that's not true either.
if sar is not set, then x264 does not set the sar flag for the generated stream.
last i remember, according to the spec, if it's not set then you can assume 1:1.