cvorbis

How can I determine the length, in seconds, of a Vorbis stream?


How can I determine the length, in seconds, of the Ogg Vorbis stream with libvorbis and/or libvorbisfile?

As far as I can tell, there's nothing in the vorbis_info structure that tells me the length of the stream.


Solution

  • Using the lower level API, you can do this with ov_time_total.