FFMPEG Commands tips and tricks.
Getting Information from a file :
ffmpeg -i filename.ext
Turn images to a video sequence:
ffmpeg -f image2 -i image%d.jpg video.mpg ( converts images labeled 1,2,3 into a video)
Turn video to images:
ffmpeg -i video.mpg image%d.jpg
Reduce the volume of an audio / video : ( 256 is the max volume, so 128 would make it half )
ffmpeg –i video.mp4 –vol 128 output.mp4
Encode video for I-family (iphone or ipod)
ffmpeg -i source_video.avi -b 300 -s 320x240 -vcodec xvid -ab 32 -ar 24000 -acodec aac final_video.mp4
Extract Sound from audio and save as mp3
ffmpeg -i source_video.avi -vn -ar 44100 -ac 2 -ab 192 -f mp3 sound.mp3
convert wav to mp3:
ffmpeg -i son_origine.avi -vn -ar 44100 -ac 2 -ab 192 -f mp3 son_final.mp3
Mix video with a sound file:
ffmpeg -i son.wav -i video_origine.avi video_finale.mpg
Convert Avi to flv
ffmpeg -i video_origine.avi -ab 56 -ar 44100 -b 200 -r 15 -s 320x240 -f flv video_finale.flv
Convert avi to mpeg for dvd players:
ffmpeg -i source_video.avi -target pal-dvd -ps 2000000000 -aspect 16:9 finale_video.mpeg
compress avi to divx:
ffmpeg -i video_origine.avi -s 320x240 -vcodec msmpeg4v2 video_finale.avi
Combine Multiple video files ( In Windows )
- If the files are in flv format convert them into mpg
ffmpeg -i video1.flv -sameq 1.mpg
- Once all files are converted to flv files then run this command :
copy /b 1.mpg+2.mpg+3.mpg bigfile.mpg