How to Convert FLV (YouTube/Flash Videos) to MPEG in Linux: Not long ago, we've shown you how to download YouTube videos from the Linux terminal, and then shared with you an easy way to download and convert YouTube videos to MP4. Today, we will be showing you a very simple way to convert .flv (YouTube/Flash videos) to .mpg via the Linux terminal. This would be very helpful for those of you wanted to view those downloaded videos through your home DVD players since most of these players couldn’t read Flash videos.
The software that we will use to convert FLV to MPEG in Linux is FFmpeg. This program is not just an audio/video converter, but it can also be utilized to stream and record audio and video files. FFmpeg supports a wide range of formats such as ASF, AVI, BFI, IFF, RL2, FLV, MXF, Matroska, Maxis XA, MSN Webcam stream, MPEG, TXD, OMA, and GXF. It's also rich in features through its several components like:
* ffserver - an HTTP and RTSP multimedia streaming server for live broadcasts. It can also time shift live broadcast.
* ffplay - a simple media player based on SDL and on the FFmpeg libraries.
* ffprobe - a command line tool to show media information.
* libavcodec - a library containing all the FFmpeg audio/video encoders and decoders. Most codecs were developed from scratch to ensure best performance and high code reusability.
* libavformat - a library containing demuxers and muxers for audio/video container formats.
* libavutil - a helper library containing routines common to different parts of FFmpeg.
* libpostproc - a library containing video postprocessing routines.
* libswscale - a library containing video image scaling and colorspace/pixelformat conversion routines.
* libavfilter - the substitute for vhook which allows the video to be modified or examined between the decoder and the encoder.
Now let's get down to business and show you how to convert FLV to MPEG in Linux using FFmpeg. But first, make sure you have already downloaded and installed FFmpeg through your package manager, or you can get it from HERE.
To convert .flv to .mpg from the Linux terminal, navigate to where you saved your video, and then use this command:
$ ffmpeg -i ironman.flv ironman.mpg
* ironman.flv is the Flash video (input) that I have converted to ironman.mpg (output). The converted video will be saved to your input directory by default.
You can also set the video bitrate, audio bitrate, audio sample rate, and the frame size of the output file:
$ ffmpeg -i ironman.flv -b 300800 -ab 70000 -ar 30000 -s 320×240 ironman.mpg
-b = set the video bitrate in b/s (default = 204800)
-ab = set the audio bitrate in b/s (default = 65536)
-ar = set the audio samplerate in Hz (default = 44100)
-s = set the frame size WxH (default 160×128)
There you have it. That's how easy it is to convert FLV to MPEG from the Linux terminal.
If you have a multicore processor you can increase the convertion process. For exemplo to dual core.
ReplyDeleteffmpg -threads 2 -i ironman.flv -b 300800 -ab 70000 -ar 30000 -s 320×240 ironman.mpg
You can also use a graphical front-end to ffmpeg called WinFF
ReplyDeletehttp://linuxph.wordpress.com/2010/10/06/download-and-convert-youtube-videos/