Thursday, June 17, 2010

ffmpeg: A simple command line tool for converting video formats

Simple to use:
ffmpeg -i input_file output_file.extension_of_new_format

like so, to convert a mpeg to swf (Adobe flash format)

bash$ ffmpeg -i video.mpeg output.swf

You can tweak the defaults by adding more parameters. Some that are useful are, bitrate(-b), framerate(-r) and output video size(-s). The last one would scale your video.

So the following:

bash$ ffmpeg -i video.mpeg -b 700k -r 25 -s 580x200 output.swf

would generate a swf that would have a birate of 700kbps, framerate of 25 and a size of 580 into 200 pixels.

If you are targeting a standard, like say dvd video. You can skip typing individual parameters and can use "-target dvd" instead. Check the man pages for more options.

Sunday, June 6, 2010

xvidcap: Make a video of your linux desktop.

Xvidcap is a nice tool to make movies of your linux desktop. It installs from the repos "sudo apt-get install xvidcap" and works great.