[x264-devel] Generating H264 for iPad?

Robert Reinhardt [theMAKERS] lists at themakers.com
Thu Feb 23 18:21:56 CET 2012


As a computer book author, I agree that there are many bad tutorials online on using FFmpeg with x264. (This trend is hardly new, and applies to just about any topic that requires learning.) Jason, have you considered publishing a book on x264? I'm sure O'Reilly's approached you for doing a definitive guide for x264. 

-Robert


-----Original Message-----
From: x264-devel-bounces at videolan.org [mailto:x264-devel-bounces at videolan.org] On Behalf Of Reindl Harald
Sent: Thursday, February 23, 2012 8:56 AM
To: x264-devel at videolan.org
Subject: Re: [x264-devel] Generating H264 for iPad?



Am 23.02.2012 17:24, schrieb Jason Garrett-Glaser:
>>> Use the -preset, -profile, etc options, not a huge pile of cargo-cult options.
>>
>> the damned -preset / -profile parameters including their x264-values 
>> are changing permanently - this way you can NEVER make a useful 
>> wrapper without maintain hughe code-switches and ways control them by 
>> a specific ffmpeg-version
> 
> I have no idea what you're even saying here.  The -preset/-profile 
> names have never changed since their introduction many years ago.
> ffmpeg has had per-codec option support for ages now too, so there 
> really isn't any excuse to continue this mess.

this is simply not true

ffmpeg -i demo.mp4 -vcodec 'libx264' -acodec 'libfaac' -vpre 'baseline' -vpre '-vpre fastfirstpass'  xxx.mp4 File for preset '-vpre fastfirstpass' not found

this worked 1-5 years ago and was renamed multiple times and yes i do two-pass-ecoding and with throw away the presets it is no more randomly broken after ffmpeg updates

> Please stop spreading bad advice on the mailing list.
> 
> For specifics:
> 
>>>> ffmpeg -i 'inputfile.mp4' -y -vb '448k' -ab '96k' -ar '44100' -ac '2' -r '25' -async '1' -maxrate '544k' -f 'ipod'
>>>> -vcodec 'libx264' -acodec 'libfaac' -flags '+loop+mv4' -cmp '256' 
>>>> -partitions '+parti4x4+parti8x8+partp4x4+partp8x8+partb8x8' 
>>>> -me_method 'hex' -me_range '16' -subq '7' -trellis '1' -refs '5' -g 
>>>> '250' -keyint_min '25' -sc_threshold '40' -i_qfactor '0.71' -qcomp '0.6' -qmin '0' -qmax '69' -qdiff '4' -bufsize '2M' -directpred '3' -rc_lookahead '50' -threads '2' -coder '0' -bf '0' -flags2 '-wpred-dct8x8' -wpredp '0'
>>>> 'outputfile.mp4'
> 
> 1.  You're using ABR mode, which is strongly discouraged

as you above i have no idea what you are saying here

> 2.  async 1 is set for absolutely no reason.  Does that option even 
> exist anymore?

[harry at rh:/data/autotest/parts/ffmpeg]$ ffmpeg --help | grep async
-async              audio sync method

> 3.  +mv4 doesn't even do anything

well, maybe there are too much bad tutorials out there

> 4.  At least half of those options do nothing, because they are the 
> defaults

and that is one MORE reason to set them because if someone changes the defaults it is NOT my intention to get changed any behavior in my wrapper

> 5.  You are crippling x264's speed by reducing the number of threads

do not make assumptions without knowing the context

this was a LOG-SNIPPET from a webserver with some encoding apps running

x264 has NOT to use more than 50% of CPU especially because we are speaking about a VMware-Cluster so even the machine has it's hardware not alone

> 6.  Your bufsize is chosen without any apparent reason.  It doesn't 
> match any typical number of seconds either.

as long it does not hurt....
the machine has ( GB memory

> 7.  You have some options enabled that are pointless except at very 
> insane speed settings (e.g. p4x4).
> 
> Seriously, why?

because after many hours of testing and optimizing this were the best defaults with minimum file size, maximum converting speed and best quality compared a hughe amount of input/output files and this until know has worked for each convert with expected good result and without touching the ffmpeg-php-wrapper for more than 1.5 years so it is currently useable with older ffmpeg versions as also with the newest one

respect the fact that i have other work beside changing permanently working things by making any software-updates as i had to do for 'vpre'-profiles in the past



More information about the x264-devel mailing list