# install parallel if you don't have one
brew install parallel
chmod +x convert.sh
./convert.sh
# delete opus files
find . -type f -name '*.opus' -delete
Last active
December 6, 2021 11:00
-
-
Save caiguanhao/b32bc005b172de8f98daed15a39be233 to your computer and use it in GitHub Desktop.
ffmpeg parallel batch/bulk convert opus to mp3 with meta data
This file contains 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
#!/bin/bash | |
my_func() { | |
file=$1 | |
ffmpeg -i "$file" -map_metadata 0:s:a:0 "${file%.opus}.mp3" >/dev/null 2>&1 | |
} | |
export -f my_func | |
find . -type f -name '*.opus' -print0 | parallel -j 8 -0 my_func {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment