[vorbis] Ogg too good?
Craig Dickson
crdic at yahoo.com
Thu Mar 7 09:22:32 PST 2002
begin Jonathan Walther quotation:
> I have a different solution, which stands me in good stead. For each
> "CD", all the flac files go in a directory. Then there is a "tags"
> file in that directory. Here is an example of a "tags" file:
>
> a ALBUM="Bob Marley"
> a LABEL="Sony Music Canada"
> a PERFORMER="Bob Marley"
> a GENRE="reggae"
> t 01 TITLE="Concrete Jungle"
> t 02 TITLE="Slave Driver"
> t 03 TITLE="400 Years"
> t 04 TITLE="Stop That Train"
> t 05 TITLE="Baby We've Got A Date"
> t 06 TITLE="Stir It Up"
> t 07 TITLE="Kinky Reggae"
> t 08 TITLE="No More Trouble"
[snip]
> The format of the file is simple: lines that begin with 'a' are tags
> that will be inserted in every track of the album. lines that being
> with 't' expect a track number to go next, and then the tag will only be
> applied to that track.
>
> You may not know it to look at it, but I designed the format of the tag
> file so I could source it from a shell script, after defining "a" and
> "t" as shell functions. Yep, "tags" is a legitimate shell script :-)
> Sure beat writing my own parser...
Nice. I have a somewhat simpler solution, since I'm less tag-happy than
you are. I use files called Manifest that look like this:
A Current 93
L Current 93/Michael Cashmore/Christoph Heeman
D 1999
01 An Introduction to Suffering
02 All the Pretty Little Horses
03 Calling for Vanished Faces
04 The Cat Is Dead
05 Untitled I
05A Michael Cashmore
06 In an English Garden
07 Untitled II
07A Michael Cashmore
08 The Flower Is RedRobed
09 A Silence Song, Silent
09A Michael Cashmore
10 Et in Arcadia Est
11 Moonlight, or Other Dreams, or Other Fields
12 Judas as Black Moth
13 Lazy Moon Part I
13A Christoph Heeman
14 Lazy Moon Part II
14A Christoph Heeman
Here, the A line is the default "artist" for the CD's tracks, which can
be overridden by a track-specific artist line (such as 05A, 07A, 09A,
13A, and 14A above). L is the title of the album, D its date (which can
again be overridden on a per-track basis, though the above doesn't have
an example of that). All this is used to generate oggenc command lines,
using the A or ##A line for the -a option, etc.
Additionally, the track title is munged by a sed script to generate a
Unix-friendly output filename by replacing spaces with underscores and
replacing or stripping out characters that are meaningful to the common
Unix shells (I hate having to remember to escape such things at the
command line).
Unlike yours, the above file is not sourceable from a shell script; my
"parser" looks like this:
line ()
{
grep "^$1 " Manifest | cut -d " " -f 2-
}
which obviously isn't exactly fast, since it has to be called several
times for each track, but on the other hand, actually encoding the
tracks takes 99.9% of the time, so the speed of the parser is
insignificant.
Craig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: part
Type: application/pgp-signature
Size: 233 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/vorbis/attachments/20020307/37be9d56/part-0001.pgp
More information about the Vorbis
mailing list