AW: [Vorbis-dev] Determining the duration of an ogg vorbis file

Mathias Kunter mathiaskunter at yahoo.de
Fri Mar 21 01:52:13 PDT 2008


Thank you very much for your help, it worked that way.

Mathias



----- Ursprüngliche Mail ----
Von: "xiphmont at xiph.org" <xiphmont at xiph.org>
An: Conrad Parker <conrad at metadecks.org>
CC: Mathias Kunter <mathiaskunter at yahoo.de>; vorbis-dev at xiph.org
Gesendet: Donnerstag, den 20. März 2008, 12:49:16 Uhr
Betreff: Re: [Vorbis-dev] Determining the duration of an ogg vorbis file

On Thu, Mar 20, 2008 at 4:34 AM, Conrad Parker <conrad at metadecks.org> wrote:

>  The granulpos field of the last page in the vorbis stream should tell
>  you the duration in samples, divide it by the samplerate to get the
>  duration in seconds.

...that tells you the end time.  In the event that the beginning time
is at a positive offset (like in a typical live stream) you also need
to subtract the starting time (granpos on the first audio page)

Monty





      Lesen Sie Ihre E-Mails auf dem Handy.
www.yahoo.de/go


More information about the Vorbis-dev mailing list