FFMPEG Tricks

FFMPEG is a commandline video processing tool  available on many platforms. That's quite a mouthfull , but think of it as a swiis army knife for videofiles. Want to get the mpeg you downloaded of EbumsWorld in 1998 over to your Samsung Omnia, but in a filesize that won't use up half your memorycard? Or convert it to a Flash video file to publish it in a flash video playeron your blog? FFMPEG helps you do it.

 


Converting a video file from on format to another using FFMPEG

 


Converting a mpeg video file to flv using FFMPEG

/usr/bin/ffmpeg -i “/home/me/film.flv” -target ntsc-dvd -r 29.97 -s 720×480 -aspect 4:3 -b 8000k -mbd rd -flags +trell -mv0 -cmp -subcmp 2 “/home/me/film.mpg”

..or..

/usr/bin/ffmpeg -i “/home/me/film.flv” -target ntsc-dvd -r 29.97 -s 720×480 -aspect 16:9 -b 8000k -g 12 -mbd rd -flags +trell -mv0 -cmp -subcmp 2 “/home/me/film.mpg”


convert .flv to .mpg using ffmpeg

First you need to download your .flv file to a folder and you need to Open a terminal window and go in to the .flv file folder and type the following command

ffmpeg -i jokes.flv -ab 56 -ar 22050 -b 500 -s 320×240 jokes.mpg

jokes.flv is the file you want to convert, so the name must be the same as the source file.You can name jokes.mpg whatever you want as long as it has the .mpg extension.

-b bitrate: set the video bitrate in kbit/s (default = 200 kb/s)

-ab bitrate: set the audio bitrate in kbit/s (default = 64)

-ar sample rate: set the audio samplerate in Hz (default = 44100 Hz)

-s size: set frame size. The format is WxH (default 160×128 )