[FFmpeg-user] web videos with flv

Lou lou at lrcd.com
Fri Feb 17 20:19:48 CET 2012

On Fri, 17 Feb 2012 18:46:52 +0100
Reindl Harald <h.reindl at thelounge.net> wrote:

> Am 17.02.2012 18:41, schrieb Reindl Harald:
> > 
> > 
> > Am 17.02.2012 18:34, schrieb Fernanda Rebelatto:
> >> hi.
> >>
> >>  I appreciate the tips, but do not discuss this way.
> >>
> >> I am using ffmpeg for the first ever.
> >>
> >> Anything already helps me a lot.
> >>
> >> In my program being developed in flex, and play streaming video after
> >> being converted. I believe that only Flv works well, but not sure.
> >>
> >> I'm learning to work with videos.
> >>
> >> On youtube flv is used.
> > 
> > not really
> > 
> > these days most things are converted to H264 there and
> > currently most are going to WEBM (VP8)
> > 
> >> When I change the resolution of the video, it gets smaller. But if I
> >> do not change? if I use the original size, the file is common to get
> >> bigger? I thought that would turn my flv video to a minor.
> > 
> > the bitrate and used codec does affect the size much more than
> > the resolution - mostly the bitrate, remind wthat KILOBIT PER SECOND
> > does mean :-)
> this is as exmaple one of my since years used commandlines
> to generate H264-videos playing nearly everyhwere with a
> proved good quality by as small as possible files
> most of the params are replacing "-vprofile baseline"
> but however, i played around many days and nights with all sorts of
> input files convert them for Flash-Player/HTML5-<video> and this
> was the most perfect combination built in our php-ffmpeg-wrapper
> ffmpeg -i 'infile.avi' -y -vb '448k' -ab '96k' -bt '32k' -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'
> -timestamp 'now' 'outfile.mp4'

Declaring each x264 option is not recommended. That's what the presets
are for (example: "-preset medium", see "x264 --help" for a full list o'
presets). Using presets is easier and allows you to keep up with any
changes if you update FFmpeg/x264, and ffmpeg probably ignores some of
these old options (but not if they are implemented via -preset). The
presets save you time because they were designed by the x264 developers,
who know what they are doing, so you no longer have to monkey with
dozens of settings and end up with options that make no sense. The
closest preset equivalent for your example would be "slow" or "medium"
followed by "-profile:v baseline".

If you feel like the presets are not adequate for your purposes they
are still useful as you can overwrite preset options with x264opts or
several libx264 private options (listed in "ffmpeg -h"), but I don't
recommend changing preset settings unless you know what you are doing.

Also, I believe libx264 ignores "-bt". Why not "-threads "0" (auto
choose appropriate thread value)? "mv4" is used with the "mpeg4"
encoder, not libx264, IIRC.

More information about the ffmpeg-user mailing list