[vorbis] Bookmarks

Beni Cherniavsky cben at techunix.technion.ac.il
Fri Feb 14 03:18:15 PST 2003



On 2003-02-10, Nemo - earth native wrote:

> On Mon, Feb 10, 2003 at 06:13:53AM -0500, Corey Miller did utter:
> > make it an array of numbers for the times, then just assume they go in
> > order, so it would be {0,354,565,765,1200) which would be setting
> > part1.1 to 0, part 1.2 to 354, etc.  I have to get ready to leave, so
> > when I have some free time I'll look at how ogg handles tags and be
> > able to give a more accurate response to this.
>
> Seems to me you're trying to force computer readable data into tagging,
> which is meant for human readable data. Both can coincide, and it's
> easier to train a computer program to handle human data...
>
True.  If you do want to put all data in a single comment header (as
opposed to the next method), the "proper" way would be to take advantage
of the ability to have several tags with same name.  E.g. something like
this:

BOOKMARK=0:12 Start of foo
BOOKMARK=43:17.34 Bar
BOOKMARK=1:15:0 Quux

The proposed time notation is the human-readable

  [[hours:]minutes:]seconds[.fraction_of_seconds]

I think that's the universally understandable way to write times relative
to some moment, in this case the start of the file.  For robustness, a
program should always ouput normalized times (secs, mins < 60) but should
accept arbitrary times (time = h*3600 + m*60 + s).  [Should this rather be
the original start of the stream - granulepos 0 - so that one doesn't need
tochange the tags when the stream is cut, e.g. by recoding a part from a
streaming server?  I don't think so because for human readability, if the
tag says "2:13" the user should be able to seek his player (that may not
support the tag) to 2 minutes, 13 secons manually...]

> Why not just split the file into parts (vorbiscut), give each it's own
> tags (CHAPTER=3.1, PART=4.1, BOOKMARK=5.9, or however you want). Then
> join all the ogg files back together.
>[snip advantages]
An elegant way indeed.  If you'll find / code the tool for doing this, it
is probably the best thing to do.  IIRC there were even some patches
for ogg123 that make it skip to next "link" (part).

There is one drawback to this way: the bookmark positions are set
irreversibly, sort of.  You can change them by spliting at new points
but the old ones can't be "healed" completely (if they are parts of
the same original stream, that's theoretically possible but there are
no tools to do it).  So if you are going to move the points around,
stay with the single stream comments method.


-- 
Beni Cherniavsky <cben at tx.technion.ac.il>

Do not feed the Bugzillas.
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.




More information about the Vorbis mailing list