Friday, 23 January 2009

Convert Youtube Videos Into MPG Format

To begin with, you will need to download the Youtube video that you want. There are a number of ways in which you can do this. The most popular ones are to use the online service Vixy. there are also a number of diffrwent Firefox addons that you can use to download the video of your choice. a few of my favriout addons to do this are either Fast Video Downloader", or VidoDownloader

If you are not a fan of Firefox, then you can always use this handy little program called Youtube-dl. To install this, run the following command:
sudo apt-get install youtube-dl

Then to download the video that you need:
youtube-dl http://YOUTUBE_VIDEO-URL

Now that you have your Youtube video downloaded, you can now convert it.
To do this, you will need the ffmpeg package installed:
sudo apt-get install ffmpeg

To convert your flash file, you will need to do something like this:
ffmpeg -i FlashVideo.flv -ab 56 -ar 22050 -b 500 -s 320x240 FlashVideo.mpg

So what does all this mean?
The FlashVideo.flv is the name of your flash file.
-b : video bit rate. The default bit rate is 200. So you will only need to include this if you want a different bit rate
-ab : audio bit rate. the default is 64
-ar : sample rate. This default for this is 44100 Hz
-s : Frame Size. the format of this is Width x Height. The default is set to 160x128

This can be used for Youtube, Google Videos, and many of the other popular video hosting sites (as long as the format is .flv)


  1. Love chrome.

    Linux clothes!

  2. Hi,

    Where are these downloaded flv files stored by default and can you change that if needed?

  3. Excellent addons! I will try to check if it'll work on my end.

  4. Nice post. yes, i use ffmpeg program to convert videos. but i always using videodownloadhelper on firefox to download youtube videos.
    mpg to mov: