Created
July 31, 2022 09:18
-
-
Save zemlanin/b0faf59d05f3e9bd8bed7de15a68fd0a to your computer and use it in GitHub Desktop.
Concatenate libro.fm files
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
# depends on eyeD3, ffmpeg, and jq (`brew install eye-d3 ffmpeg jq`) | |
# run when in the directory with unarchived tracks | |
ffmpeg \ | |
-f concat \ | |
-safe 0 \ | |
-i (find (pwd) -name '*.mp3' | sed -e "s/\(.*\)/file '\1'/" | sort | psub) \ | |
-c copy \ | |
(basename -s " - Track 001.mp3" (find . -iname '* - Track 001.mp3'))".mp3" | |
eyeD3 --write-images . (find . -iname '* - Track 001.mp3') | |
eyeD3 --add-image FRONT_COVER.jpg:FRONT_COVER \ | |
(basename -s " - Track 001.mp3" (find . -iname '* - Track 001.mp3'))".mp3" | |
eyeD3 \ | |
-a (eyeD3 --plugin json (find . -iname '* - Track 001.mp3') 2> /dev/null | jq -r ".artist") \ | |
-A (eyeD3 --plugin json (find . -iname '* - Track 001.mp3') 2> /dev/null | jq -r ".album") \ | |
-t (eyeD3 --plugin json (find . -iname '* - Track 001.mp3') 2> /dev/null | jq -r ".album") \ | |
(basename -s " - Track 001.mp3" (find . -iname '* - Track 001.mp3'))".mp3" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment