Version 2.4 id3 tags

Since id3lib is incompatable with version 2.4 id3 tags produced by Sound Juicer, you need to use gstreamer and id3mux to grab the tag info to--for example--renormalize your filenames. Tags can themselves be edited in Rhythmbox.

#!/bin/sh
#~/bin/id3v24-info.sh
#DTPD
for file in "$@" ; do
  TMP=`/bin/tempfile`
  echo "$file"
  gst-launch-0.10 filesrc location=/proc/self/fd/0 \
    ! id3demux ! fakesink -t \
    < "${file}" > "$TMP" 2> /dev/null
  for tag in 'title' 'artist' 'album' 'genre' \
      'track count' 'track number' 'disc number' \
      'artist sortname' ; do
    grep "${tag}:" "$TMP" | \
      awk -F "${tag}: " "{ print \"  ${tag} = \" \$2 }"
  done
  rm "$TMP"
done

So my workflow is:

  1. Rip a stack of CDs in Sound Juicer.
  2. Notice that the tags aren't right or don't fit with the other tags in the collection
  3. Edit tags in rhythmbox
  4. Run a script to renormalize the filename.