Re: Package Scope Recommendations for File_Ogg

From: Date: Wed, 13 Aug 2003 22:50:46 +0000
Subject: Re: Package Scope Recommendations for File_Ogg
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-19702@lists.php.net to get a copy of this message
On 14 Aug 2003 at 1:23, David Grant wrote: > I'm developing a proposed new package (File_Ogg) with a number of > inheriting packages (such as File_Ogg_Vorbis). I have run into a > problem in terms of scope. > > An Ogg physical bitstream may contain one or more logical bitstreams > in sequence or parallel (and indeed a sequence of parallel logical > bitstreams). An example of a parallel group of logical bitstreams > might be audio and video at the same time. > > The package originally came into existance because I wanted to > retrieve a single Vorbis logical bitstream from an Ogg physical > bitstream. This package -- with some invaluable advice from Stefan > Neufeind -- has expanded in scope to now include a single parallel > group of logical bitstreams. Ideally, this package should cover the > entire Ogg project, and allow multiple parallel logical bitstreams, > and herein lies a problem. Such an objective must include a > theoretically endless physical stream (such as internet radio or > video) containing an endless number of single or parallel logical > bitstreams. Is PHP a suitable platform for handling theoretically > endless streams such as Internet radio and or video? [...] Hi David, didn't intend to cause you so much headache - sorry for that :-) Well I didn't really think about the theoretically possible point combined with several parallel streams and that one can end before the other and a new might start and ... Okay okay, this seems a bit out of scope. Suggestion: How about limiting it to parallel streams? This way it would be possible to detect Theora-video with vorbis-audio or similar correctly. What files do you think exist "in the wild life"? Okay I could think of an ogg-file that contains some audiostreams following each other ... maybe if they switch bitrate inbetween or so. But I don't think this occurs very often. And if you have a look at mp3, mp3-players etc. you will see (as one example) that most programs don't handle intermediate bitrate-changes (if its not marked as vbr) correctly. It too hard to detect things like this correctly, to parse everything (if its a huge file) etc. So from my point of view it would be enough to concentrate on having parallel streams (video+audio, or maybe 2x audio, maybe some additional codec for hell-knows-what in future development). Using libvorbis etc. directly via a pecl-interface, as proposed by Patrick, doesn't seem a good solution for me. Okay, it would save you reinventing the wheel. But if it's possible to solve this problem in "clean" php (and without taking too much amount of memory and time for parsing) I would favor a php-pear- and not a pecl-class. With a pecl-solution you are dependent on libvorbis etc. But combined with "pecl-or-not-pecl" I'd appreciate to receive feedback from others on the list. Hope to hear from anybody. PS: Keep up your motivation, David! Stefan

« previous php.pear.dev (#19702) next »