ftrvxmtrx / split2flac

Split flac/ape/wv/wav + cue sheet into separate tracks
253 stars 34 forks source link

ALAC Processing? #16

Open andrewgdunn opened 10 years ago

andrewgdunn commented 10 years ago

I just had to deal with a huge directory of ALAC that I wanted to get over to FLAC. FFMPEG has an implementation of FLAC internally and can handle the task.

If you're in a directory you can do this: for f in *.m4a; do ffmpeg -i "$f" -c:a flac "${f%.m4a}.flac"; rm "$f"; done

If you want to recursively go through a set of directories you can do this: alac2flac_rec() { find . -type f -name '*.m4a' -exec sh -c 'for x; do command ffmpeg -i "$x" -c:a flac "${x%.m4a}.flac"; rm -f -- "$x"; done' {} +; };

Typically I my workflow for music organization looks like split2flac->beets but recently a friend shared a set of albums in ALAC to me and I want to get them to FLAC before using beets.

I share this as a potential feature suggestion. Knowing that my starting point was already a set of split m4a (ALAC encoded) files, I at first didn't think of trying to even use split2flac. Working from a set of split files might not fit within the paradigm of how this utility is meant to be run.