Re: Computing PTS for Vorbis

Silvia Pfeiffer <[email protected]>
Newsgroups gmane.comp.multimedia.ogg.vorbis.devel
Message-ID <[email protected]>
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 <[email protected]> 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
> [email protected]
> http://lists.xiph.org/mailman/listinfo/vorbis-dev
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.