diff --git a/convert-to-mp3.py b/convert-to-mp3.py index 3363b92..1cf70ba 100755 --- a/convert-to-mp3.py +++ b/convert-to-mp3.py @@ -6,7 +6,7 @@ import getopt from subprocess import * def main(argv): - bitrate = 128 + bitrate = 256 try: opts, args = getopt.getopt(argv[1:], "b:") except getopt.GetoptError: diff --git a/wav-to-mp3.sh b/wav-to-mp3.sh new file mode 100755 index 0000000..49f2e50 --- /dev/null +++ b/wav-to-mp3.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +# Loop through all .wav files in the current directory +for file in *.wav; do + # Skip if no .wav files exist (prevents literal "*.wav" execution) + [ -e "$file" ] || continue + + # Replace .wav extension with .mp3 + output="${file%.wav}.mp3" + + echo "Converting: $file -> $output" + lame -v -b 256 "$file" "$output" +done + +echo "Conversion complete!"