Sunday, February 6, 2011

better mp4 conversion

Since I am using a Mac, it is sometimes good to convert videos that the stock player can not play into a format that it can play, for instance wmv to mp4, since wmv files can not be played by quicktime or the finder preview, VLC plays them instead.

Today I was looking at quality settings and found a tip on setting the output quality in ffmpeg.

My new script that converts all the files given on the command line to mp4 format is
#!/bin/bash
[ "$1" ] || {
  echo use: $0 file...
  exit 0
}

for file in "$@"; do
  ffmpeg -i "$file" -acodec libfaac -vcodec mpeg4 -qmax 8 "$file.mp4"
done

Lower numbers for -qmax are higher quality and larger file sizes.

No comments:

Post a Comment