Home > FFMPEG, Video Conversion > Video Conversion using FFMPEG

Video Conversion using FFMPEG

September 11, 2011 Leave a comment Go to comments

“FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video. It includes libavcodec – the leading audio/video codec library.” as in the ffmpeg official website http://ffmpeg.org/

FFMPEG is really a great tool for video conversion. It is a command line tools and you can download from http://ffmpeg.org/download.html. It supports almost all video, audio format conversion.

You can also extract video and audio separately from a video file using ffmpeg.
What you need to know is some command to convert a video using FFMPEG.

Here is a command to convert input.mpg to oupput.3gp

ffmpeg -i input.mpg -y -vcodec h263 -acodec aac -strict experimental -b 192k -ab 64k -ar 44100 -ac 0 -f 3gp output.3gp

The description of the commands are as follows

-i input.mpg Input file name

-y Overwrite output files.

-vcodec h263 Force video codec to h263. Use the copy special value to tell that the raw codec data must be copied as is.

-acodec aac Force audio codec to aac. Use the copy special value to specify that the raw codec data must be copied as is.

-b 192k Set Video Bit Rate to 192k

-ab 64k Set Audio Bit Rate to 64k

-ar 44100 Set the audio sampling frequency to 44100.

-ac 0 Set the number of audio channels.

-f 3gp Force the conversion to 3gp.

Convert input.mpg to output.mp3

-i -y input.mpg -y -vn -acodec libmp3lame -b 192k -ab 64k -ar 44100 -ac 0 -f mp3 output.mp3

Here –vn will tell FFMPEG to remove video and keep only audio.

Advertisements
Categories: FFMPEG, Video Conversion
  1. December 10, 2011 at 9:27 pm

    Thanks for the overview and links about FFMPEG. I hope to look into this tool in the near future.

  1. No trackbacks yet.

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: