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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
> 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.I'm not sure if this is the case, but it sounds as if Winamp is downloading the Ogg file as fast as possible and just plays from the current download position. Try to restrict the output rate from your servlet to the stream's actual bitrate. Tor --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Saturday 01 May 2004 09:23, Tor-Einar Jarnbjo wrote:> > 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. > > I'm not sure if this is the case, but it sounds as if Winamp is downloading > the Ogg file as fast as possible and just plays from the current download > position. Try to restrict the output rate from your servlet to the stream's > actual bitrate. >I really doubt this is the case - I've never seen winamp behave like that. What the actual problem is I don't know... This sounds like it _should_ just work. Mike --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Possibly Parallel Threads
- RCurl Post
- vpimd, a personal information server
- An unexpected exception has been detected in native code outside the VM
- Problem 1: package resteasy-3.0.26-6.module_el8.4.0+595+e59c9af2.noarch from @System requires pki-servlet-4.0-api, but none of the providers can be installed
- SMC Webconsole 3.1 and ZFS Administration 1.0 - stacktraces in snv_b89