Created
October 6, 2022 04:43
-
-
Save tytydraco/a69d7c707c0d7ff9792416ccc1ead8c3 to your computer and use it in GitHub Desktop.
A bash script to degrade audio from a container.
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
#!/usr/bin/env bash | |
trap 'echo Ignoring' INT | |
filename="$(basename -- "$1")" | |
ext="${filename##*.}" | |
filenameNoExt="${filename%.*}" | |
dir="$(dirname "$1")" | |
new="$dir/degraded_$filenameNoExt.$ext" | |
echo "Degrading audio for $1" | |
ffmpeg -hide_banner -v error -nostats -nostdin -i "$1" -b:a 16k "$new" || exit 1 | |
mv "$new" "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Designed to be used in https://github.com/tytydraco/meow_dart. Pass in like this:
meow_dart ... -c ./degrade_audio