[vorbis] Servlet streamed Ogg skips
pd
develop at twonotes.com
Fri Apr 30 16:10:38 PDT 2004
I am writing a J2EE servlet based web application that delivers streamed
audio from a database. In response to a web request it responds with an
M3U file containing a link back to a servlet that delivers the audio. I
am testing this with WinAmp configured as the media player.
The browser properly starts WinAmp which then sends the correct request
for the audio. My servlet responds with a properly tagged MIME type and a
filename with the proper extension to indicate if the content is in MP3,
MIDI, or OGG format.
For MIDI, WinAmp appears to suck down the entire file before it plays.
This is ok, since MIDI files are pretty short. For MP3 files WinAmp
starts playing immediately, which is what I expect. But when the HTTP
ContentType is application/ogg (which I understand WinAmp ignores) and
the filename ends in ".ogg" (which WinAmp DOES look at) the behavior is
different.
In the ogg case WinAmp starts playing immediately but it skip a lot. As
though it is skipping packets or something like that. The entire musical
selection goes by at almost twice its notmal speed.
If I instead deliver the audio as a normal download instead of through a
M3U file then WinAmp plays ogg content correctly. But in that case the
browser is downloading the file before starting WinAmp and so there can be
quite a delay, which I am trying to avoid. I also want to keep track of
partial plays, which I can only do in streaming mode.
Is this a WinAmp problem or is there something I don't know about ogg
streaming? The same pice of code handles all three file types; it just
copies the bytes from the database to the response output stream (if you
are familiar with the HttpServlet java class and its methods).
So what am I missing here?
--- >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