ffmpeg is a wonderful multimedia conversion tool. It supports most of the multmedia file formats.
to convert a mp3 file to ogg format
ffmpeg -i song.mp3 song.ogg
This command itself take care of the conversion.
Mostly, I use ffmpeg to convert all the AVI files from my Digital Camera to MPEG format so that I can play all the videos in VCD or DVD player.
ffmpeg -i video.avi -target ntsc-vcd video.mpg
This command converts the video.avi to video.mpg in NTSC VCD format.
other targets are pal-vcd,pal-dvd,ntsc-vcd,ntsc-dvd.
I think NTSC is for India.
Eventhough, ffmpeg works on a single file at a time, I neede to convert all the AVI files in a folder into MPG.
Here is a scipt to do mass bulk conversion using ffmpeg.
$for f in `ls *.AVI`; do FILE=$(basename $f .AVI) ;ffmpeg -i $FILE.AVI -target ntsc-dvd $FILE.mpg; done
f the filenames contains space, then
$IFS=$’\n’ ;for f in `ls *.AVI`; do FILE=$(basename $f .AVI) ;ffmpeg -i $FILE.AVI -target ntsc-dvd $FILE.mpg; done
Thats all. Now all the files in a directory are converted into another file format.
Thanks for Fabrice Bellard for his wonderful tool
Powered by ScribeFire.