[Vorbis] Help please streaming oggs as they are being created

Ralph Giles giles at xiph.org
Sun Oct 24 09:49:11 PDT 2004


On Sun, Oct 24, 2004 at 12:30:53PM -0400, ben-extra at MIT.EDU wrote:

> Nothing does what I want.  Edna was easy to set up and use.  When I go
> to my own edna web page, xmms opens and streams radio.ogg just fine,
> but there is no seek control displayed, so I can't move forward in the
> file to the current time.  However, the file does play through to the
> end.  So if I start listening 20 minutes after a recording starts, I
> can listen to the whole recording, but 20 minutes delayed.  I haven't
> tested edna from Windows.
> 
> Using straight Apache, the entire file downloads before it starts to
> play (no streaming) and there IS a seek control, so I can move forward
> to the current time.  Which is good, except xmms stops playing when it
> reaches the end of the file, even if the file has gotten larger on the
> server.  (So if I start listening 20 minutes into the recording, I can
> only hear 20 minutes of the recording.)

Yes. The issue here is seekability over the network. You can do this over
http, but afaik alsaplayer is the only one that supports it. You might
try that. I'm not sure if you'll need to set some of the no-cache headers
for apache to keep serving the growing file or not.

Seeking over http is slow because it has to do a binary search to find
the seek point. An obvious optimization is to do the seek on the server
side. It's possible to write an apache extension to implement time-based
units for the Range: headers as well as bytes (if you want a fun little
project :). There's also an internet draft for addressing temporal
subranges through uri fragments. You might take a look at annodex.net; 
they have a mod_annodex that can return pre-seeked bits, but I don't know
if it works on generic ogg files or not.

> Reading google and the xiph.org archives there seems to be a lot of
> ideas on how to make this work, but nothing definitive.  Things I have
> seen mentioned include:
> 
>   -using ices/icecast

This can replicate what you're hearing for others over the net, but 
doesn't help anyone else do independent seeking.

>   -changing to MP3, which is better suited to seeking

Ha! This is not true. Except for the way metadata is conventionally
done it's not much worse either, so you might as well use Vorbis.

Hope that helps,
 -r


More information about the Vorbis mailing list