Skip to content

Instantly share code, notes, and snippets.

@olistik
Created May 12, 2011 08:15
Show Gist options
  • Select an option

  • Save olistik/968149 to your computer and use it in GitHub Desktop.

Select an option

Save olistik/968149 to your computer and use it in GitHub Desktop.
convert all the .flv contained in the current directory to .mp4 and to .webm
#!/bin/bash
ipad_preset_path="/Applications/Miro Video Converter.app/Contents/Resources/ffmpeg_presets/libx264-ipod640.ffpreset"
for filename in *.flv
do
echo "Converting video: $filename ... "
echo "Converting to mp4 ..."
ffmpeg -i "$filename" -threads 0 -strict experimental -f mp4 -vcodec libx264 -vpre slow -fpre "$ipad_preset_path" -b 1200k -acodec aac -ab 160000 -ac 2 "${filename%.*}.mp4"
echo "Done."
echo "Converting to webm ..."
ffmpeg -i "$filename" -f webm -vcodec libvpx -acodec libvorbis -ab 160000 -crf 22 "${filename%.*}.webm"
echo "Done."
done
@olistik
Copy link
Author

olistik commented May 12, 2011

see https://gist.github.com/968153 for the content of the ipad preset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment