Skip to content

Instantly share code, notes, and snippets.

@tondol
Created December 27, 2014 17:25
Show Gist options
  • Save tondol/5a781325f82ef1fa4d44 to your computer and use it in GitHub Desktop.
Save tondol/5a781325f82ef1fa4d44 to your computer and use it in GitHub Desktop.
ffmpegを使ってオーディオデータを抽出するalias
# exaudio hoge.mp4 hoge.m4a
function exaudio() {
~/Documents/00scripts/ffmpeg -i $1 -vn -acodec copy $2
}
# exm4a *.mp4
# *.mp4.m4aが出力される
function exm4a() {
while [ "$1" != "" ]
do
exaudio $1 $1.m4a
shift
done
}
# exmp3 *.flv
# *.flv.mp3が出力される
function exmp3() {
while [ "$1" != "" ]
do
exaudio $1 $1.mp3
shift
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment