From e0f5676e484aa9521953a8cb14c2d5e57bf50c90 Mon Sep 17 00:00:00 2001 From: encoded Date: Tue, 20 May 2014 14:49:25 -0600 Subject: [PATCH] Allows bpm-tag to operate on m4a files. Tags are written using mp4tags and read using mp4info, both of which are part of the mp4v2 project, whose code is available at https://code.google.com/p/mp4v2/ --- bpm-tag | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bpm-tag b/bpm-tag index ff52561..c8d37e2 100755 --- a/bpm-tag +++ b/bpm-tag @@ -93,6 +93,9 @@ case "$FILE" in *.ogg) BPM=`vorbiscomment "$FILE" | sed -n 's/^BPM=//p'` ;; +*.m4a) + BPM=`mp4info "$FILE" | sed -n 's/^\s*BPM://p'` + ;; *) echo "$FILE: file extension not known" >&2 exit 1 @@ -129,6 +132,9 @@ case "$FILE" in *.ogg) vorbiscomment -at "BPM=$BPM" "$FILE" ;; +*.m4a) + mp4tags -tempo "$BPM" "$FILE" + ;; *) echo "$FILE: don't know how to tag this type of file" >&2 exit 1