[Vorbis] newlines in vorbis comments

Monty xiphmont at xiph.org
Fri Sep 17 16:04:29 PDT 2004




On Fri, Sep 17, 2004 at 06:26:30PM -0400, Greg Wooledge wrote:
> 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.

Tags are not ASCII; they´re UTF-8.  

As for having multiple tags, the spec supports that.  No reason for odd hacking.

Monty


More information about the Vorbis mailing list