[Vorbis] newlines in vorbis comments

Greg Wooledge greg at wooledge.org
Fri Sep 17 15:26:30 PDT 2004


Ian Malone (ibm21 at cam.ac.uk) wrote:

> Is there any way to put a newline character in comments for ogg
> vorbis files in Linux?  I can't see any way of doing it with
> vorbiscomment.


Jernej Simon?i? (jernej.simoncic at guest.arnes.si) wrote:

> Can't you use vorbiscomment -t ? It works for me...


This does indeed work, e.g.:

bash$ vorbiscomment -a -t $'ADDITIONAL=This is a\ntwo-line tag' somefile.ogg

(The above syntax will not work in all shells.)

But the intuitive way to retrieve the tags from an Ogg Vorbis file is
to dump them to standard output with newlines between them.  When this
is done (e.g. by vorbiscomment -l), then there's no way to distinguish
between a newline inside a tag, and a new tag.

Perhaps you could take a hint from xargs(1) and add a "-0" option to
vorbiscomment, which would separate tags with NUL characters instead
of newlines.  If that's not flexible enough, the user could specify
a comment delimiter on the command line.  It looks like "-d" is free
for this purpose.

-- 
Greg Wooledge                  |   "Truth belongs to everybody."
greg at wooledge.org              |    - The Red Hot Chili Peppers
http://wooledge.org/~greg/     |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.xiph.org/pipermail/vorbis/attachments/20040917/b1d64b0a/attachment.pgp


More information about the Vorbis mailing list