Created
May 19, 2013 22:58
-
-
Save igrigorik/5609408 to your computer and use it in GitHub Desktop.
Convert video to iPod friendly format, and speed up playback.
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
| #! /bin/bash | |
| SAVEIFS=$IFS | |
| IFS=$(echo -en "\n\b") | |
| outformat=mp4 | |
| indir=$1 | |
| cd "$indir" | |
| for file in * | |
| do | |
| echo "\n\nStarting conversion: $file \n" | |
| /git/ffmpeg/build/bin/ffmpeg -i "$file" \ | |
| -f $outformat \ | |
| -filter_complex '[0:v]setpts=0.588*PTS,scale=640:-1[v];[0:a]atempo=1.70[a]' \ | |
| -map '[v]' -map '[a]' \ | |
| -vb 533K \ | |
| -vcodec libx264 \ | |
| -vprofile baseline \ | |
| -maxrate 10000000 \ | |
| -bufsize 10000000 \ | |
| -threads 0 \ | |
| -strict -2 processed-"$file".$outformat | |
| done | |
| echo ALL Processed! | |
| IFS=$SAVEIFS |
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
| $> git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg | |
| $> ./configure --prefix=/git/ffmpeg/build --enable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-libfreetype --cc=/usr/bin/clang --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libvpx --enable-libxvid --enable-filters --enable-avfilter --arch=x86_64 --enable-runtime-cpudetect | |
| $> make && make build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment