[vorbis] ogginfo speed

Kenneth Arnold ken at arnoldnet.net
Tue Mar 12 14:16:24 PST 2002



On Tue, Mar 12, 2002 at 11:09:23PM +1100, Michael Smith wrote:
> At 06:55 AM 3/12/02 +0100, you wrote:
> >> ogginfo decodes the whole file to test stream integrity.
> >
> >It doesn't decode it.
> >
> >It reads all of the stream to check for stream integrity, to calculate
> >length and average bitrate, and to detect chained streams.
> 
> Except it's really buggy. 
> Don't use ogginfo in any sort of program or script - using it 'manually'
> is fine since humans can generally cope with the bugs.
[...]
> >Yes, I object.  All the info you want is available already from other
> >tools (i.e., vorbiscomment and file).
> 
> Agreed here - people using ogginfo for anything except what it already
> does are probably just misunderstanding what the program is intended for.

But it doesn't have to read the whole stream to get that data. Just
use vorbisfile's ov_open, or at least its code. The only thing for
which it really would have to read the entire stream is integrity
checking.

Most of the time I (and I guess most others) would want just the
essential info on the stream (as you said, vorbiscomment + file, but
also as Segher said, length, average bitrate, and chained streams).

The stream integrity check is a very useful function, but detracts
from the program's real purpose, dumping simple, easily-obtainable
information about the file, by taking significant time, especially if
your Ogg collection is on removable media or a network share.

In light of this, I suggest making the stream integrity check an
option (e.g. -t/--integrity-test).

If you really wanted to get involved, there are several classes of
data that ogginfo shows, and there could be a character mask or
similar like ps has to turn them on or off, but I think that's getting
needlessly complex, especially when grep can do most of that just as
well.


-- 
Kenneth Arnold <ken at arnoldnet.net>

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.




More information about the Vorbis mailing list