Server Side

Server related posts

Converting an mp4 file to an avi file using ffmpeg

Written by: Peter Fisher on December 16, 2012
Tagged under:
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

 

This post is mostly for my own reference as I keep forgetting the correct parameters. To convert an MP4 file to an AVI file use ffmpeg and supply the codecs like so:

ffmpeg -i input.mp4 -vcodec mpeg4 -acodec ac3 -ar 48000 -ab 192k output.avi

Linux penguin TuxWhere -i is the input file

-vcodec is the video codec

-acodec is the audio codec

-ar is the audio sampling frequency

-ab is the bit stream

Running the command above will create output.avi.

This requires ffmepeg to be installed.  In Ubuntu do the following:

sudo apt-get install ffmpeg

 

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Peter Fisher is a web developer working in Gloucester UK. Founder of the digital agency Websomatic, author of this blog and the HowToCodeWell Youtube channel. Peter has over ten years of web development experience under his belt

Read all about Peter Fisher

Leave a Reply

Your email address will not be published. Required fields are marked *