Search This Blog

Loading...

Tuesday, 9 October 2012

Ffmpeg Command Tutorial

1) To get information about Video and audio file

     ffmpeg -i audio.mp3
     ffmpeg -i video.mp3


2) Convert wav file into mp3
 
    ffmpeg -i audio.wav -acodec mp3 -ab 320k audio.mp3

     -i                      : tell ffmpeg to process audio.wav file
     -acodec mp3    : tell to use mp3 codec
     -ab 320k          : tell to convert to 320 kb bitrate

3) Convert avi to mp4

      ffmpeg -i video.avi -r 24 video.mp4

     -r 24 : convert output file to 24bit frame rate

4) To convert all images in current folder to video format

      ffmpeg -i *.jpg video.mpg

5) Convert video to images
     
      ffmpeg -i video.mpg image*.jpg 
   
      Extracted image will be in name like image1.jpg,image2.jpg

6) Extrac Audio from Video File

    ffmpeg -i video.avi -vn -ar 44100 -ac 2 -ab 320 -f mp3 sound.mp3

7)Combine Audio and Video file in to one Video file

    ffmpeg -shortest -i video.avi -i audio.wav -map 0:0 -map 1:0 Video.avi

No comments:

Post a Comment