Last active
October 20, 2023 04:34
-
-
Save nikosavola/15dd799d737386f08e223e417f9236af to your computer and use it in GitHub Desktop.
Speed up mp3 files in a folder (for example, an audiobook)
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 | |
# Run in a folder with desired mp3s | |
mkdir sped_up | |
mkdir sped_up_louder | |
find . -name "*.mp3" -exec bash -c 'ffmpeg -i "$0" -filter:a "atempo=1.12, dynaudnorm" -vn "sped_up/${0%.mp3}_sped_up.mp3"' {} ; | |
cd sped_up || exit | |
find . -name "*_sped_up.mp3" -exec bash -c 'ffmpeg -i "$0" -filter_complex "compand=attacks=0:points=-80/-900|-45/-15|-27/-9|0/-7|20/-7:gain=6" -vn "../sped_up_louder/${0%.mp3}_louder.mp3"' {} \; | |
cd .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment