Hi, I've got a problem with packed OGG files taking a long time to open before they start playing. I have about 30+ OGG files that I have joined together, now the engine I am working on has its own file management and when I use the OV open_callbaks it spends a long time constantly seeking and reading in different sets of 8500 bytes inside the open_callbacks function, some time for as long as 20-30 seconds, I assume this is doing something to find out the information for each of the individual oggs inside the packed file, is there anyway to speed this process up, or not make It search for the info at all as I have all the offsets to each ogg stored in a separate file. Or if it is not searching for information can anybody shed any light on what its trying to do in all this time. Cheers, Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/vorbis-dev/attachments/20040729/e2356648/attachment.html
On Thu, Jul 29, 2004 at 11:57:57AM +0100, Tony wrote:> I have about 30+ OGG files that I have joined together, now the engine I am > working on has its own file management and when I use the OV open_callbaks > it spends a long time constantly seeking and reading in different sets of > 8500 bytes inside the open_callbacks function, some time for as long as > 20-30 seconds, I assume this is doing something to find out the information > for each of the individual oggs inside the packed file, is there anyway to > speed this process up, or not make It search for the info at all as I have > all the offsets to each ogg stored in a separate file. Or if it is not > searching for information can anybody shed any light on what its trying to > do in all this time.Yes, by default ov_open looks for all the chain boundaries so it can caluculate the total length of the sequence. If you only ever play it straight through, just have your seek callback always return -1; in that case libvorbis file will treat it as a non-seekable stream and just passively play the data it's given. If you do need the seek, the usual work around is to use the information in your seek table to calculate offsets in your seek callback so each segment looks like a separate file, i.e. don't let it see the other segments from inside the ov_open() call. Hope that helps, -r
This is a player issue, or prehaps a limitation of VobisFile, since it could cache this information and use the cache when the file is unchanged on disk since it's last "index". See, to find things like the total length or where the barrier is between chained bitstreams, it needs to seek through the entire file. It sounds like it's doing this every time. Optimumally it should begin to play and change the total length of the seek bar as it seeks trough, or better yet, allow you to show each chained bitstream individually in the playlist with the seek bar only representing a single track. Anyways, with a little threading (play and seek at same time) and caching of what it finds, it should be able to make these functions nearly invisible to the user. On Thu, Jul 29, 2004 at 11:57:57AM +0100, Tony wrote:> > I have about 30+ OGG files that I have joined together, now the engine I am > working on has its own file management and when I use the OV open_callbaks > it spends a long time constantly seeking and reading in different sets of > 8500 bytes inside the open_callbacks function, some time for as long as > 20-30 seconds, I assume this is doing something to find out the information > for each of the individual oggs inside the packed file, is there anyway to > speed this process up, or not make It search for the info at all as I have > all the offsets to each ogg stored in a separate file. Or if it is not > searching for information can anybody shed any light on what its trying to > do in all this time.
The serials in the oggs will be the same as others in certain cases as there not made completely unique as there is sometimes a bit of swapping around of which oggs are going into which chains without them being re-encoded, I don't personally add any extra info between the files I just convert the wavs to oggs then do a binary copy to concatenate all the files together, I do it this way as ive never seen any documentation on there being a special way to create chained files. -----Original Message----- From: vorbis-dev-bounces@xiph.org [mailto:vorbis-dev-bounces@xiph.org] On Behalf Of Monty Sent: 29 July 2004 20:18 To: Arc Riley Cc: vorbis-dev@Xiph.org Subject: Re: [Vorbis-dev] packed ogss On Thu, Jul 29, 2004 at 09:14:50AM -0700, Arc Riley wrote:> On Thu, Jul 29, 2004 at 04:55:26PM +0100, Tony wrote: > > One other think I wondered if anybody could clarify when I use the tool > > OggInfo on my chained files it throws up warning between each stream,saying> > that the wrong page was encountered, is this a normal thing when running > > ogginfo tool on chained oggs. > > Sounds like you got duplicate serialnos. Try running your stream > through my reserializer, see if OggInfo still complains...No, the chains wouldn't work at all in that case. Garbage between chained sections is not normal, no. How did you create the oggs, and how did you group them together? If the program that made the Oggs stuck ID3 tags on them (a violation of spec), that would explain the errors at the boundaries after you grouped them together. Of course, it could be something else too. Monty _______________________________________________ Vorbis-dev mailing list Vorbis-dev@xiph.org http://lists.xiph.org/mailman/listinfo/vorbis-dev