Here’s a script to convert a batch of avi files to mpg. I’ve commented out a version of the command which specifies the bitrate, and am using sameq (same quality); you can experiment with the commented out one if that suits your needs better.
#!/bin/sh
for file in *.AVI *.avi
do
echo "Transcoding $file to MPG..."
# ffmpeg -r 30 -b 1600 -i $file $file.mpg
ffmpeg -sameq -i $file $file.mpg
done
Related Comments (4)
This is not working for me?
It simply spits out the help text for ffmpeg.
Something changed maybe?
thanks
Something is wrong with the CSS of this page. Please delete the above comment
Thanks. Actually I enabled wiki formatting, so the #’s were being converted to bullets. It’s working now tho.
Interesting, but unable to get to work, same results as first commenter. Just prints the help file, along with a statement that the avi file is corrupt or truncated. Any Ideas???
ONe other thing I noticed once the script finished; created new empty file *.avi.mpg Anyway to get rid of the .avi between the file and .mpg?