Skip to content

Instantly share code, notes, and snippets.

@eddydu44 eddydu44/audio-convert.sh
Last active May 16, 2018

Embed
What would you like to do?
Convert every audio files inside the current directory to mp3
#!/bin/bash
find . -regex ".*\.\(opus\|ogg\|m4a\)" -print0 |
while IFS= read -r -d $'\0' filename; do
echo $filename
name="${filename%.*}"
< /dev/null ffmpeg -nostats -loglevel 0 -n -i "$filename" -b:a 0 -codec:a libmp3lame -vn "./$name.mp3"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.