[LAU] Generic ipod: ogg vorbis tag name weirdness

M Watts zwy648rct at gmail.com
Tue Oct 5 11:57:42 UTC 2010


My imitation ipod plays oggs.  They all seemed to be tagged correctly, 
but some always showed up as Unknown Artist etc.

Couldn't figure it out till I looked at the tags with vorbiscomment. 
THe only difference was that the 'Unknown' files had tagnames in lower 
case, like title=badum-badum.  Known files had TITLE=etc.

Here's a short script to fix this up, and add discnumber tag for good 
measure (which my player seem to need)

#! /bin/bash
# capitalise tag names on today's ogg files
# add discnumber tag if not already there

for ogg in $(find . -mtime -1 -name '*.ogg'); do
   vorbiscomment -l $ogg | sed 's/.*=/\U&/g' > "$1{1%%.ogg}.tag"
   if [ `grep -c DISCNUMBER $1{1%%.ogg}.tag` -eq 0 ]
     then
       echo "DISCNUMBER=1" >> "$1{1%%.ogg}.tag"
   fi
   vorbiscomment -w -c "$1{1%%.ogg}.tag" $ogg
   rm -f "$1{1%%.ogg}.tag"
done

The discnumber tag could be added with vorbiscomment's -a flag, but oh 
well...

I got the temporary file bit from some guy on the Arch forums, so thanks 
whoever you are.


More information about the Linux-audio-user mailing list