Hello all, I run the streaming for a community radio station. We're streaming 160k/s ogg via icecast. For an archive mechanism, I have a scheduler which starts a pseudo listener and archives to a file, via wget: wget http://stream/stream.ogg -O "show name.ogg" That works fine. The scheduler starts recording 30s before shows start and 2m after they end. We're also doing scheduled metadata change to indicate the current show to listeners. So for a 4pm show a url is hit which causes icecast to change the metadata indicating the 4pm show. That also works fine. The problem we're seeing is that the metadata change seems to segment the ogg file (as recorded via wget). All the bits are there but the index seems to be non-contiguous. The symptoms of which are that seeking in the first 30s (the first metadata segment) with mplayer causes mplayer to exit after it exceeds 30s. If I let mplayer play, it will count up to 30s, then the metadata is changed and it counts up to the end of the show and plays the next segement (the first 2m of the next show). Other players will only play the first segment. They see the end of the metadata block and exit, even though there might be hours left to play in the file. We can't redistribute the recorded oggs as we're unsure of how players will handle segements. Here's a sample of the ogg with metadata segmentation: http://benow.ca/misc/metadata_segmentation.ogg What we need is to reset the segmentation and metadata across the whole file. I've tried vorbiscomment to change the metadata, but it only affects the first segment. The only way I've found is to decode and reencode via oggdec -o - metadata_segmentation.ogg | oggenc -o contiguous_metadata.ogg - but that leads to loss of fidelity due to accumulated error (less brightness in audio). We need a way to unsegment the metadata without re-encoding. Is there a tool out there to do that? Is there a programmatic way without re-encoding frames? Thanks, Andy
ogg.k.ogg.k at googlemail.com
2009-Jun-15 18:28 UTC
[ogg-dev] Removing metadata segmentation
> We're also doing scheduled metadata change to indicate the current show > to listeners. So for a 4pm show a url is hit which causes icecast to > change the metadata indicating the 4pm show. That also works fine.And this causes segmentation because the metadata is stored in the second header of the Vorbis stream, so changing metadata will cause a new stream to be started, with the updated metadata. While such streams are valid, they are not, as you found, well supported. There is also no way to insert a Vorbis comments header packet within a Vorbis stream without starting a new logical stream (well, there is, but it would not be a valid stream, and would be ignored the decoder).> oggdec -o - metadata_segmentation.ogg | oggenc -o contiguous_metadata.ogg -This will lose all metadata, which you don't want. If you add again the metadata, it will apply to that single stream again. That said, Internet radio streams are usually handled fairly well by various players, which detect new streams and update metadata accordingly. These are typically live and not seekable though.
ogg.k.ogg.k at googlemail.com wrote:>> We're also doing scheduled metadata change to indicate the current show >> to listeners. So for a 4pm show a url is hit which causes icecast to >> change the metadata indicating the 4pm show. That also works fine. >> > > And this causes segmentation because the metadata is stored in the > second header of the Vorbis stream, so changing metadata will cause > a new stream to be started, with the updated metadata. While such > streams are valid, they are not, as you found, well supported. There > is also no way to insert a Vorbis comments header packet within a > Vorbis stream without starting a new logical stream (well, there is, but > it would not be a valid stream, and would be ignored the decoder). > > >> oggdec -o - metadata_segmentation.ogg | oggenc -o contiguous_metadata.ogg - >> > > This will lose all metadata, which you don't want. If you add again the > metadata, it will apply to that single stream again. > > That said, Internet radio streams are usually handled fairly well by > various players, which detect new streams and update metadata > accordingly. These are typically live and not seekable though. > >Thanks for the reply. What I'm after is basically the conversion of a live stream to a seekable stream. The metadata is known and a wipe and reset is possible, but is it possible to wipe metadata segements across the whole file without re-encoding? Andy
On Tue, Jun 16, 2009 at 6:28 AM, ogg.k.ogg.k at googlemail.com<ogg.k.ogg.k at googlemail.com> wrote:> That said, Internet radio streams are usually handled fairly well by > various players, which detect new streams and update metadata > accordingly. These are typically live and not seekable though.Alas, liboggplay based players don't handle these well. I believe they stop after the first segment. Chris. -- http://www.bluishcoder.co.nz