Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Flac2Alac
#!/bin/sh
ffmpeg -i “$1″ -acodec alac “`basename “$1″ .flac`.m4a” \
-metadata title=\”"$(metaflac –show-tag=TITLE “$1| sed ‘s/title=//g’)”\” \
-metadata author=\”"$(metaflac –show-tag=ARTIST “$1| sed ‘s/artist=//g’)\” \
-metadata album=\”"$(metaflac –show-tag=ALBUM “$1| sed ‘s/album=//g’)”\” \
-metadata year=\”"$(metaflac –show-tag=DATE “$1| sed ‘s/date=//g’)\” \
-metadata track=\”"$(metaflac –show-tag=TRACKNUMBER “$1| sed ‘s/tracknumber=//g’)”\” \
-metadata genre=\”"$(metaflac –show-tag=GENRE “$1| sed ‘s/genre=//g’)\”
#!bin/sh
cd$1
find “$1″ -type f | grep .flac | sed -e “s,[^.],\’&,” -e “s,\$,\’,” | xargs -I {} sh /root/SABScripts/flac2alac.sh {}
find “$1″ -type f | grep .m4a | sed -e “s,[^.],\’&,” -e “s,\$,\’,” | xargs -I {} mv {} “/mnt/Media/iTunes/Automatically Add to iTunes”
cd -
rm -rf “$1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.