[Vorbis] Length of an Ogg Vorbis file?

Ross Levis ross at stationplaylist.com
Sun Dec 2 16:11:01 PST 2007


There is a 64 bit sample count in the OggS header at offset 6 I believe.
You can find the last OggS header in the file and read the sample count and
calculate the duration from that without using any libraries.

Ross.

-----Original Message-----
From: vorbis-bounces at xiph.org [mailto:vorbis-bounces at xiph.org] On Behalf Of
Erik de Castro Lopo
Sent: Sunday, 2 December 2007 12:11 p.m.
To: vorbis at xiph.org
Subject: Re: [Vorbis] Length of an Ogg Vorbis file?

John Edwards wrote:

> ov_pcm_total? It's in the vorbis docs.

Sorry, I should have mentioned that I am using the Ogg and Vorbis
libraries directly and I'm not using libvorbisfile.

I am however currently diggging through the vorbisfile sources.

Erik



More information about the Vorbis mailing list