Skip to content

Instantly share code, notes, and snippets.

@morgangiraud
Last active October 23, 2017 13:07
Show Gist options
  • Save morgangiraud/e36675281bf515751637a6f6506b6a42 to your computer and use it in GitHub Desktop.
Save morgangiraud/e36675281bf515751637a6f6506b6a42 to your computer and use it in GitHub Desktop.
Clean audio files coming from aws
mkdir -p tmp/out && cd tmp
aws s3 sync --profile myprofile s3://my-bucket/my-folder .
for f in *; do ffmpeg -i "$f" -vn -ar 44100 -ac 2 -ab 192k -f mp3 "out/tmp-$f"; done;
cd out && rename 's/tmp-//' *
# Beware, this line erase the original files
# aws s3 sync --profile myprofile . s3://my-bucket/my-folder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment