[Vorbis-dev] Computing PTS for Vorbis

Silvia Pfeiffer silvia at silvia-pfeiffer.de
Mon Jan 25 22:44:11 PST 2010


You should probably use the granulepos and map it to time to get your
presentation time stamps (pts). A granulepos is typically written at
the end of every page in an Ogg bitstream. If you have a skeleton
track, you can get the time-mapping of the granulepos using the
information in the fisbone headers. Otherwise you indeed need to
decode at least the header of the vorbis and theora track to find out
how to map the granulepos in these tracks to time, i.e. to find out
the granulerate and calculate in essence "granulepos / granulerate".
You will need to read up on granulepos in Theora and Vorbis though.

Hope this helps.

Cheers,
Silvia.

On Sun, Oct 11, 2009 at 2:44 AM, David Ronca <jonathannah at hotmail.com> wrote:
> I am working on a tool that will put ogg-vorbis into various containers
> (asf, mp4, etc.).  These containers require a pts for samples.  I have been
> working on a parser (not decoder) but I cannot find any information on
> packet/block duration.  How does one determine the duration of a vorbis
> audio packet without decoding?
>
> Thanks,
> David
>
> ________________________________
> Hotmail: Trusted email with Microsoft’s powerful SPAM protection. Sign up
> now.
> _______________________________________________
> Vorbis-dev mailing list
> Vorbis-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/vorbis-dev
>
>


More information about the Vorbis-dev mailing list