Created
August 5, 2019 07:35
-
-
Save ptheofan/93334c4da9d086f850b2c1fae641644b to your computer and use it in GitHub Desktop.
Batch (parallel) Process mp3 files in a folder with #1 ffmpeg (rebuild mp3), mp3gain (normalize), lame (set to cbr)
This file contains hidden or 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
```bash | |
# Rebuild mp3 file | |
find . -name '*.mp3' | parallel 'ffmpeg -y -i {} -c:a libmp3lame -b:a 128k {.}.temp.mp3 && mv {.}.temp.mp3 {}' | |
# normalize | |
find . -name '*.mp3' | parallel 'mp3gain -a -k {}' | |
# cbr (or find the equivalent flags for ffmpeg and do it in one step) | |
find . -name '*.mp3' | parallel 'lame -m j -b 128 --cbr -q 0 {} {.}.temp.mp3 && mv {.}.temp.mp3 {}' | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment