mythrobin.com

Where myth becomes real

Convert Videos in Linux

People like us who uses linux and wants to stay with it are also wants every single thing to be done. For example converting videos from one format to another. It’s true that there are no real GUI based tool for it in linux. But there is an easy way for it. I’d rather say it a geeky way. If you are a novice Please don’t get confused. It’s really an easy and best possible way to convert videos.

So how do you convert videos in linux? First let’s start with some packages you required for this experiment. Open your software center and search for ‘ffmpeg’. From the result select ‘Multimedia player, server, encoder & transcoder’ and click on install.

After that open your terminal and point to the directory where your video file at. Suppose you have a video file named ‘input.avi’ on desktop inside a folder named ‘videos’. Then to point this directory in the terminal type:

cd Desktop/videos

Now you are inside the videos directory. If you want to see the contents of this directory just type ‘ls’ in terminal. Anyway, lets get started the real business.

So you have a video file named ‘input.avi’ inside the videos directory and you want it to be converted into mp4. Thing you have to do now is to type a conversion command in the terminal. See the following command:

ffmpeg -i input.avi -b 350 output.mp4

Before applying it you would like to know what actually is happening. Here ffmpeg is the package you just downloaded a little while ago. ‘input.avi’ is the existing video and ‘output.mp4′ is your desired video with mp4 extension. ‘-b 350′ is for your desired video bit rate. You can change it to any figure & ofcourese without specifying the bitrate you’ll able to do the conversion which will have the same quality. But if you want small sized video you have to specify video bit rates. Even you can set audio bit rate by adding ‘-ab 128′ or ‘-ab 320′ etc. before ‘output.mp4′. Now apply the command and see what happens.

Now if you want to remove audio from your video then use command like the following:

ffmpeg -i input.avi -an -b 1200 output.avi

If you want to remove video components and save the audio then use command like this:

ffmpeg -i input.avi -vn -ab 320 output.mp3

There are still other things you can do with it. FFMPEG provides wide range of options. If you want to try then please refer to the ffmpeg’s project website.
Total Hits: 358

Comments

comments

Ubuntu