Skip to content

Instantly share code, notes, and snippets.

@huuhoa
Last active May 12, 2018 04:39
Show Gist options
  • Save huuhoa/17935d8b9a9e920a20a99cb88bd022e2 to your computer and use it in GitHub Desktop.
Save huuhoa/17935d8b9a9e920a20a99cb88bd022e2 to your computer and use it in GitHub Desktop.
#!/bin/bash
for f in "$@"
do
path=${f%/*}
leaf=${f##*/}
if [[ "$path" == "$leaf" ]]
# f is basename only
then path=""
else path="${path}/"
fi
body=${leaf%.*}
f1="${path}${body}.mp4"
/usr/local/bin/ffmpeg -i "$f" -af "volume=15.0" -vcodec copy "$f1"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment