Terminal based Audio/Video Converter - ffmpeg

ffmpeg -Terminal based Audio/Video Converter
 Linux


ffmpeg

I was looking for a way for flv to mp3 format conversion in my linux machine so that I can use them in my ipod and my search ended with this powerful tool “ ffmpeg “.

ffmpeg is one my favorite terminal based tool for various video and audio conversion,it is very small ,fast and easy to perform the audio / video format conversions , cutting trimming and compressing very fast.It is good enough to handle almost all kind of audio and video formats.

 

ffmpeg after installation comes with two more tools ffplay and ffserver. ffplay can play a file right through from the terminal and ffserver has live streaming capability for your local video live. ffmpeg is very small about 1.7 mb in size and performs various Audio/Video conversion very fast. You can browse through vide range of option to perform trimming and cutting your video and audio files. With some extra options command you can control the frame rate , bitrate and much more.You can even extract images from your Video.It is very fast audio and video conversion tool.

 

Installation

You need to be the root user to install ffmpeg video converter.Launch your terminal

#su root
#password:
#apt-get install ffmpeg

 

- After you are done with installation u can check for manual for ffmpeg by running man command

 

#man ffmpeg

 

ffmpeg Music and video Conversions and Editing Commands

 

To convert a FLV to mp3

# ffmpeg -i video.flv -f -an -acodec copy output.mp3

 

 

To convert flv to mpg

# ffmpeg -i video.flv -f output.mpg
# ffmpeg -i video.flv -f output.avi

 

To set the video bitrate of the output file to 64kbit/s:

# ffmpeg -i input.avi -b 64k output.avi

 

For extracting images from a video:

# ffmpeg -i foo.avi -r 1 -s WxH -f image2 foo-%03d.jpeg

 

 

For creating a video from many images:

# ffmpeg -f image2 -i foo-%03d.jpeg -r 12 -s WxH foo.avi

 

To force the frame rate of the output file to 24 fps:

# ffmpeg -i input.avi -r 24 output.avi

 

 

To force the frame rate of the input file (valid for raw formats only)to 1 fps and the frame rate of the output file to 24 fps:

# ffmpeg -r 1 -i input.m2v -r 24 output.avi

 

 

You can input from a raw YUV420P file:

# ffmpeg -i /tmp/test.yuv /tmp/out.avi

 

 

You can output to a raw YUV420P file:

# ffmpeg -i mydivx.avi hugefile.yuv

 

 

Audio and video conversions at the same time:

# ffmpeg -i /tmp/a.wav -ar 22050 /tmp/a.mp2

 

 

Encode to several formats at the same time and define a mapping from input stream to output streams:

# ffmpeg -i /tmp/a.wav -ab 64k /tmp/a.mp2 -ab 128k /tmp/b.mp2 -map 0:0 -map 0:0

 

 

You can transcode decrypted VOBs:

# ffmpeg -i snatch_1.vob -f avi -vcodec mpeg4 -b 800k -g 300 -bf 2 -acodec libmp3lame -ab 128k snatch.avi

 

Screen shot

ffmpeg Installation on Ubuntu 11.04

Linux , ffmpeg audio and video conversion, terminal based converter

 

 

 

 

 

 

Linux , ffmpeg Installation

 

Linux , ffmpeg audio and video conversion, ffmpeg live video streaming

 

 

 

 

 

 

Linux , ffmpeg live video streaming

 

 

 

Thanks for reading
Rakesh Mondal
ron