Last active
October 10, 2016 14:31
-
-
Save oozoofrog/eb22181d0cd10b1b8434ee9269cd1184 to your computer and use it in GitHub Desktop.
multiple codecs and formats convert script with ffmpeg
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 | |
abort() | |
{ | |
echo >&2 ' ABORTED ' | |
exit 1 | |
} | |
trap 'abort' 0 | |
set -e | |
args=( "$@" ) | |
formats=("avi" "ogg" "wmv" "webm" "vob" "mov" "asf" "amv") | |
for a in "${args[@]}"; do | |
for f in "${formats[@]}"; do | |
filename="${a%.*}" | |
output="$filename.$f" | |
echo "ffmpeg -y -i $a $output" | |
ffmpeg -y -i $a $output | |
done | |
done | |
echo >&2 ' DONE ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment