How to Use FFMPEG

?The general syntax for FFMPEG is

ffmpeg [input options] -i [input file] [output options] [output file]

Some useful Commands:

Getting info from a video file

ffmpeg -i video.avi

Turn a video to X images

ffmpeg -i video.mpg image%d.jpgThis command will generate the files named image1.jpg, image2.jpg, ...

Turn X images to a video sequence

ffmpeg -f image2 -i image%d.jpg video.mpg

This command will transform all the images from the current directory (named

image1.jpg, image2.jpg, etc...) to a video file named video.mpg.

Convert a wav file to Mp3

ffmpeg -i source_song.wav -vn -ar 44100 -ac 2 -ab 192 -f mp3 final_song.mp3

Convert .avi video to .mpg

ffmpeg -i source_video.avi final_video.mpg

Convert .mpg to .avi

ffmpeg -i source_video.mpg final_video.avi

Convert .avi to animated gif (uncompressed)

ffmpeg -i source_video.avi animated_gif.gif

Mix a video with a sound file

ffmpeg -i song.wav -i source_video.avi final_video.mpg

Convert .avi to .flv

ffmpeg -i source_video.avi -ab 56 -ar 44100 -b 200 -r 15 -s 320x240 -f flv final_video.flv

Convert .avi to dv

ffmpeg -i source_video.avi -s pal -r pal -aspect 4:3 -ar 48000 -ac 2 final_video.dv

Or:

ffmpeg -i source_video.avi -target pal-dv final_video.dv

Next Recommended Reading Access DB using Javascript