Some more ffmpeg commands

June 5, 2010

I used ffmpeg a lot lately, and you could already read about that in my previous posts about capturing your screen and converting aiff to mp3 using ffmpeg.

When creating a DVD for a school project I needed to do some movie work, and i of course did use ffmpeg for that. Here are some handy commands that i used:

extract the part of the movie starting from 01:46
ffmpeg -i filename.mp4 -ss 00:01:46 -sameq outfile.mp4

extract the part of the movie until 05:30
ffmpeg -i filename.mp4 -t 00:05:30 -sameq outfile.mp4

take an image and an audio file and put them together as a movie file
ffmpeg -f image2 -i input.jpg -i input.mp3 -ab 128k outfile.mp4

take a huge mov file and create a web-compatible mp4 file out if it, with lower bitrate.
ffmpeg -i -ab 128k -b 800k outfile.mp4

transform a flash movie to mp4, keep the quality/bitrate equal to the original
ffmpeg -i filename.flv -f mp4 -vcodec mpeg4 -sameq outfile.mp4

capture your favourite online radio stream, and save it in mp3 format on your hard disk, time limited to 2 hours (7200 sec)
ffmpeg -i -f mp3 -acodec libmp3lame -ab 128k -ar 44100 -t 7200 outfile.mp3

convert a movie to a gif (apply -ss and -t if needed, see above)
ffmpeg -i filename.mp4 outfile.gif
Read more about high quality gif converts using ffmpeg

that's it :)



One Response to “Some more ffmpeg commands”

  1. avi to mp4 Says:

    Resources this kind of as the one you mentioned here will be extremely useful to myself! I’ll publish a hyperlink to this page on my private blog. I’m certain my site site visitors will uncover that fairly beneficial.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s