Created
April 29, 2011 21:29
-
-
Save oc/949076 to your computer and use it in GitHub Desktop.
Source this
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FFMPEG=/opt/ffmpeg/bin/ffmpeg | |
| function avi2ipad() { | |
| for file in $*; do | |
| title=$(basename ${file} .avi) | |
| outfile=${title}.mp4 | |
| timestamp=$(date "+%Y-%m-%d %H:%M:%S") | |
| if [[ -f ${file} ]]; then | |
| echo "[${timestamp}] Converting ${file} to ${outfile}" | |
| time ${FFMPEG} -y -i ${file} -f mp4 -metadata title=${title} \ | |
| -timestamp ${timestamp} -vcodec libxvid -s 480x270 -b 1024k \ | |
| -bufsize 2M -maxrate 1.5M -g 250 -flags +aic+cbp+mv0+mv4 \ | |
| -trellis 1 -mbd 2 -cmp 2 -subcmp 2 -threads 0 -acodec aac \ | |
| -ac 2 -ab 128k ${outfile} | |
| fi | |
| done | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
H264 + AAC (just as slow...)