Created
March 12, 2024 03:06
-
-
Save Moanrisy/f07bc667a41303d9de60061b906ac0a6 to your computer and use it in GitHub Desktop.
Convert m4b audiobook into 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 | |
# Loop through all .m4b files in the current directory | |
for file in *.m4b; do | |
# Get the filename without extension | |
filename=$(basename -- "$file") | |
filename="${filename%.*}" | |
# Run ffmpeg command to convert .m4b to .mp3 | |
ffmpeg -i "$file" -acodec libmp3lame -ar 22050 "${filename}.mp3" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment