Re: Length of an Ogg Vorbis file?
Ralph Giles <[email protected]>
| Newsgroups | gmane.comp.multimedia.ogg.vorbis.general |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Dec 01, 2007 at 01:06:46PM +1100, Erik de Castro Lopo wrote: > Is there a way of finding out the length of an Ogg Vorbis file without > decoding the whole file and counting samples? You can parse the header(s) for the sample rate, then use it to decode the first and last timestamps on each chain segment. Modulo holes, the sum of the differences will give you the duration. See ov_time_tell in vorbisfile.c. -r