Created
February 3, 2013 21:49
-
-
Save mkayala/4703819 to your computer and use it in GitHub Desktop.
Script to convert video to mp4 in a way that is playable on the Kindle Fire. Prereqs: Compile the latest ffmpeg and x264 encoder. On Ubuntu, this worked well: https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
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 | |
## Convert input files $name.* into $name.mp4, suitable for playing | |
## in Kindle Fire. | |
usage="$0 file1 [file2 ...]" | |
if [ -z "$1" ] | |
then | |
echo $usage | |
exit 1 | |
fi | |
audio="libmp3lame" | |
for ifile in "$@" | |
do | |
ofile="${ifile/.*/.mp4}" | |
echo "Convert from $ifile to $ofile" | |
echo ffmpeg -i $ifile -acodec $audio -ab 96k -vcodec libx264 -f mp4 $ofile | |
ffmpeg -i $ifile -acodec $audio -ab 96k -vcodec libx264 -f mp4 $ofile | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment