Ubuntutorial

howtutorials linux

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.

Then:
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:
Code:

 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.

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

 
%d bloggers like this: