Last active
October 30, 2023 13:37
-
-
Save rileyjshaw/ece29a93b09d6d1d1f6ab787b86d5812 to your computer and use it in GitHub Desktop.
I have a folder with every Fabriclive set split into individual files. This creates a merged track for each set, with the title spoken at the start of the track.
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 | |
for d in */; do | |
cd "$d" | |
title=$(echo "$d" | sed 's/\./ /' | sed 's/ \[.*//g') | |
echo "$title" | sed 's/FABRICLIVE/Fabric lyve/' | sed -r 's/\(([0-9]+)\)/in \1/g' | sed -r 's/ 0+([1-9][0-9]*)/ \1/g' | say -v Serena -o "00. Title.aiff" | |
ffmpeg -i "00. Title.aiff" -acodec libmp3lame -ab 192000 -ar 44100 -ac 2 "00. Title.mp3" | |
command ls -1 *.mp3 | sed s/\'/\'\\\\\'\'/g | awk '$0="file \047"$0"\047"' >> tracklist.txt | |
ffmpeg -f concat -safe 0 -i tracklist.txt -c copy "../../Merged with titles/$title.mp3" | |
rm "00. Title.aiff" | |
rm "00. Title.mp3" | |
rm tracklist.txt | |
cd .. | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A quick modification to add spoken titles to a flat folder of MP3s in-place: