Created
April 12, 2022 00:39
-
-
Save discarn8/c6fe0b855d49db04d8df21b3000d9ad8 to your computer and use it in GitHub Desktop.
webm_convert_to_mp3
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 | |
# Convert your directory of webm files to mp3 automatically | |
D="/your_folder_here" | |
echo $D | |
while IFS= read -r -d '' file; do | |
echo "Processing $file" >> "$D/converted.txt" | |
sleep 1 | |
ffmpeg -nostdin -i "$file" -vn -ab 320k -ar 48000 -y "${file%.*}.mp3" | |
rm "$file" | |
done < <(find $D -maxdepth 5 -type f -name "*.webm" -print0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment