howtutorials linux

Posts Tagged ‘ffmpeg on ubuntu’

HOWTO: convert .flv to .mpg using ffmpeg

Posted by geekubuntu on December 12, 2008

First, you have to make sure you have ffmpeg installed, if you don’t, then install it from the repositories.

1. Save a .flv file to a folder (your home folder is fine). I’m going to assume you know how to do this.
2. Open a terminal window and navigate to the folder where you saved the .flv.
3. Type this in the terminal window and hit enter:

 ffmpeg -i myvideo.flv -ab 56 -ar 22050 -b 500  -s 320x240 myvideo.mpg

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

Here’s an explanation of the options used here:
-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 )

If you need help, type man ffmpeg.

Posted in Tutorials | Tagged: , | Leave a Comment »