[FFmpeg-user] libx264 options through FFmpeg

Tim Nicholson tim.nicholson at bbc.co.uk
Thu Jun 30 17:19:11 CEST 2011


On 30/06/11 15:30, Thomas Worth wrote:
> On Thu, Jun 30, 2011 at 3:22 AM, Tim Nicholson<tim.nicholson at bbc.co.uk>  wrote:
>> On 30/06/11 11:08, Tim Nicholson wrote:
>>>
>>> On 28/06/11 17:51, Thomas Worth wrote:
>>>>
>>>> On Tue, Jun 28, 2011 at 8:31 AM, Tim
>>>> Nicholson<tim.nicholson at bbc.co.uk>  wrote:
>>>>>
>>>>> On 22/06/11 06:43, Thomas Worth wrote:
>>>>>>
>>>>>> While I've historically used a standalone x264 binary to do encoding
>>>>>> by piping yuv420p from FFmpeg, I thought I'd try libx264 through
>>>>>> FFmpeg since it's certainly more convenient.
>>>>>>
>>>>>> [....]
>>>>>>
>>>>>> If I can safely pass all my options via -x264opts then I'll just use
>>>>>> that from now on and disregard FFmpeg's x264 interface.
>>>>>
>>>>> But what about options that require colon delimited parameters
>>>>> themselves
>>>>> such as "--sar 1:1"?
>>>>
>>>> If I use a forward slash (sar=16/9), libx264 doesn't complain but it
>>>> also doesn't use the supplied ratio. It seems to default to "1/1"
>>>> every time.
>>>
>>> I have tried sar="1:1" and it hasn't complained about that.
>>>
>>> Howver it doesn't want to accept a profile specification. Using:-
>>>
>>> ffmpeg -i $in_file -vcodec libx264 -pix_fmt yuv420p -s 1920x1080 -an \
>>> -x264opts bitrate=35000:preset=veryslow:tune=$tune:\
>>> [...]
>>>
>>> I get a:-
>>> "[libx264 @ 0x12e0960] bad value for 'preset': 'veryslow'"
>>>
>>> error. replace "veryslow" with whatever you like from the legal list.
>>>
>>
>> Actually its worse than that, it also doesn't accept any of the --tune
>> parameters, or seem to handle options that don't have values, e.g --tff
>
> Yes, I had the same problems. What I found is that libx264 seems to
> take all parameters through x264opts except the following:
>
> preset
> profile
> tune
>
> For some reason, it says "bad value for preset..." etc. But, and check
> this out, if you supply any random value, you get the same error: "bad
> value for 'giggity': 'goo'". So, it doesn't look like it even
> recognizes it.
>
> I do this:
>
> ffmpeg -i file.mov -an -vcodec libx264 -preset medium -profile
> baseline -tune film -x264opts $OPTS out.mp4
>
> That seems to be working.
>

Well so it does.... Thanks

> I just saw your email about parameters that don't take values, and
> you're correct. tff=1 or aud=1 or 8x8dct=0 is the way you turn them on
> or off.
>

Or not quite as it happens.

if you set :fake-interlaced=1: the x264 header showing the set 
parameters reports "interlaced=fake".

However if you set tff=1 or bff=1 you get "interlaced=0" suggesting that 
these are not working.

btw I see there is now a "bluray-compat" switch that saves having to 
explicitly specify a number of others, such as nal_hrd and b_pyramid.


-- 
Tim

http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					


More information about the ffmpeg-user mailing list