Alejandro R. Mosteo

website

  • Increase font size
  • Default font size
  • Decrease font size

ffmpeg

Ever been asked to submit a video in some particular format and under some too limited size? And you only have a strange source format or still snapshots? And you have tried the hell that is getting mencoder options right? And when you think you have it, it does not play in windows? Sounds familiar?
 
ffmpeg is bliss. Just use:
 
ffmpeg [source options] -i <source> [target options] target.fmt
 
and it will do everything quickly. Now, things get interesting because you can specify
  • numbered snapshots as source with "prefix-%03d.png" (for a series of prefix-000.png, prefix-001.png, etc).
  • a frame rate with -r
  • a bit rate with -b
  • resizing with -s <width>x<height>
  • two pass encoding to fine tune bit allocation with -pass [1|2]
  • the final format you like simply by using the right target extension (.fmt above), be it .avi, .mp4, whatever.