News:

--

Main Menu

x264 Blu Ray Settings

Started by TimW, March 25, 2014, 07:34:51 PM

Previous topic - Next topic

TimW

Great result from a couple of longer tests (over 3 hrs of video combined).  I used MediaInfo to check the metadata on the output, recoded with  2.6.10 (150723_efbeb572fce):

Summary
Streams are now playing with no problems on a hardware player (Samsung) with appropriate settings.  There are some blu-ray relevant settings that canââ,¬â,,¢t be altered, but the defaults seem to be working fine with the exception of ââ,¬Å"slicesââ,¬Â (the stream is still playing though ââ,¬â€œ perhaps it wouldnââ,¬â,,¢t in an older player - I don't know why this setting is important, but plenty of sites seem to agree it should be '4' for blu ray).  All in all, a great result, many thanks.  If you want to go for completeness it might be worth looking at the ââ,¬Å"--slices" comments below.

Parameters which worked fine, no issues
ââ,¬Å"--vbv-maxrateââ,¬Â  :  This worked.

ââ,¬Å"--vbv-bufsizeââ,¬Â : This worked.

ââ,¬Å"--bluray-compatââ,¬Â  :  This can now be set on the ââ,¬Å"output 1 tabââ,¬Â and has been set correctly per MediaInfo.

ââ,¬Å"--nal-hrdââ,¬Â  :  I donââ,¬â,,¢t seem to be able to set this explicitly, but according to MediaInfo it was set to ââ,¬Ëœvbrââ,¬â,,¢, which is correct for the recode I did.  Perhaps it is being set correctly anyway by Avidemux in the background, but whatever the reason, there doesnââ,¬â,,¢t seem to be a problem there either.

ââ,¬Å"--fillerââ,¬Â  :  This was also set correctly to ââ,¬Ëœ0ââ,¬â,,¢, but without me actually setting it.  Magic!

Slices
ââ,¬Å"--slices"  : This can now be set on the ââ,¬Å"Advanced 1ââ,¬Â tab, but if you change the setting it doesnââ,¬â,,¢t get saved, and doesnââ,¬â,,¢t appear in the output according to MediaInfo.  That said, my player didnââ,¬â,,¢t complain.  However, the blu ray spec definitely requires this to be set to ââ,¬Ëœ4ââ,¬â,,¢, and bdrebuilder does set it to ââ,¬Ëœ4ââ,¬â,,¢.   In this case the blu ray spec  also requires that  ââ,¬Å"--slice-max-sizeââ,¬Â and ââ,¬Å"--slice-max-mbsââ,¬Â (ââ,¬Ëœmaximum size per sliceââ,¬â,,¢ and ââ,¬Ëœmaximum macroblocks per sliceââ,¬â,,¢ in Avidemux notation) should not be set at all, since they override ââ,¬Å"--slices".  Perhaps the bluray compat flag helped and set it to 4 anyway?  (I am just guessing.)   Though this doesnââ,¬â,,¢t appear to be behaving quite as it should, my player didnââ,¬â,,¢t complain. 

Others, for info only
ââ,¬Å"--pic-structââ,¬Â  :  I couldnââ,¬â,,¢t turn this ââ,¬Ëœonââ,¬â,,¢ (I was using fake interlaced) and there was no sign of it in MediaInfo.  Whether it was actually on or off I donââ,¬â,,¢t really know ââ,¬â€œ according to what I have read it should be ââ,¬Ëœonââ,¬â,,¢ for fake interlaced but again my player didnââ,¬â,,¢t complain.  I have noticed that bdrebuilder doesnââ,¬â,,¢t explicitly set it either as far as I can tell, so perhaps we can just forget that one.

ââ,¬Å"--sarââ,¬Â : I doubt this is needed unless youââ,¬â,,¢re changing the aspect ratio between input and output.  There were certainly no aspect ratio problems with the playback.

ââ,¬Å"--fpsââ,¬Â, and   Ã¢â,¬Å"--timebaseââ,¬Â.  Again not explicitly set, but there was no problem with playback and I doubt theyââ,¬â,,¢d be needed unless there is something funny about the input file or youââ,¬â,,¢re meddling with framerates (AQUAR ââ,¬â€œ thanks for the tip on the FPS filter, it worked just as you said it would).

ââ,¬Å"--open-gopââ,¬Â :  This is optional, I doubt Iââ,¬â,,¢d ever use it in any case.  Though there is a setting for open GOPs specially designed for blu rays, they also work fine with a limited GOP size, and that is more usual anyway.

ââ,¬Å"--qcompââ,¬Â : the default of 0.60 canââ,¬â,,¢t be changed, but seems to work fine, and the highest quality setting of bdrebuilder also uses this value, so there seems little point in changing it.

--no-psyââ,¬Â : canââ,¬â,,¢t be set, but the default setting (ââ,¬Ëœnot setââ,¬â,,¢) is fine. (The only point in being able to control it would be to make sure it's not set anyway.)

ââ,¬Å"--fake-interlacedââ,¬Â  :  this is working fine, but for completeness I thought I should mention that there now seem to be two distinct places where it can be set, first on the ââ,¬Å"Frameââ,¬Â tab, and then again on the ââ,¬Å"Output 1ââ,¬Â tab.  The latter is called ââ,¬Å"generate fake interlacedââ,¬Â while the former is called ââ,¬Å"Interlacedââ,¬Â with a dropdown for the three possible settings.  Perhaps they are doing different things?  It's probably just cosmetic but I thought I should mention it.

I canââ,¬â,,¢t thank you enough for looking at this.  It will save an age in time as all the work can now be done in Avidemux, rather than having to recode in one application then edit in another.  I have scoured the internet, and if there's any serious competition for Avidemux out there, I certainly can't find it.

Jan Gruuthuse

TimW

Can you post (attachment) of your favourite settings?
- load sample video where you would apply these settings. Make your settings. When all settings are made, then from Avidemux Menu: File: Tinypy Project: Save As Project. Could you post his .py file?

And what would be the source type video you apply these settings on?

thanks, Jan

TimW

Jan

Hi, see file attached. 

I don't claim these settings are the "best" in any way.  What I did was to try to replicate the settings that I know work with bdrebuilder (as far as I could figure out what they were), and factor in what I could pick up about compulsory blu-ray settings on the web.  Many of the settings on the attached file could be changed and still produce a compliant stream.

What I can say for definite is that the attached settings are producing a stream that will play in my Samsung player with no issues whatsoever.  NeroVideo also thinks the output stream is blu-ray compliant as it will process it without trying to recode it.

Things maybe worth mentioning: 
1. I can't set slices to '4' (Advanced 1 tab allows the the setting but does not seem to save it or use it).  This is the only non-compliant setting as far as I can tell (discounting those that seem to be compliant by default), but as I say it doesn't seem to be affecting playback in any case.  (I suspect that modern will players will play non-strictly compliant streams in many cases anyway so perhaps that's got something to do with it.) 
2. I set "Interlaced" to "Fake Interlaced" and also set the "Generate Fake Interlaced" flag.  Not sure whether both are required.  I was de-interlacing using decomb telecide with no strategy.

The source material was a FTA broadcast transport stream with the following properties:

Format                                   : AVC
Format/Info                            : Advanced Video Codec
Format profile                         : Main@L4
Format settings, CABAC         : Yes
Format settings, ReFrames     : 4 frames
Format settings, GOP              : M=4, N=32
Codec ID                                 : 27
Duration                                 : 2h 2mn
Bit rate                                 : 9 176 Kbps
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                  : 16:9
Frame rate                               : 25.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan order                               : Top Field First
Bits/(Pixel*Frame)                    : 0.177
Stream size                              : 7.86 GiB (91%)
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics              : BT.709
Matrix coefficients                      : BT.709

(The source stream will 'nearly' play in a blu ray player - but you get nasty frame skipping and juddering.  The output plays fine.)

Hope this helps.  Thanks again.

Jan Gruuthuse

Thanks for your settings, see others have interest to ;)