Old 12th January 2004, 10:24   #1
Morkeleb
Junior Member
 
Join Date: Jan 2004
Posts: 5
Audio type recognition on streaming

Hello

I was unable to find a topic on my problem yet so I post:

I am streaming on-demand encoded ogg over http to winamp.

Just requesting a static ogg from my http server works, aslong as the file ends with .ogg (eg. http://myserver/project/file.ogg)

However, when dynamically encoding I have to pass parameters to a file and under this sircumstances it does not recognize the file as ogg anymore (I think it tries to play it as mp3). Example of such an url:
http://myserver/project/file.ogg;jse...ACBC?trackid=1

How to let winamp know to play ogg in such a case?
Preferably without having to configure winamp, but my server.

Thanx in Advance!
Morkeleb is offline   Reply With Quote
Old 12th January 2004, 14:14   #2
DJ Egg
Techorator
Winamp & Shoutcast Team
 
Join Date: Jun 2000
Posts: 36,136
Try adding:
&type=foo.ogg
to the end of the url

maybe also try:
&foo.ogg
-or-
?.ogg

However, we could do with an example of a real working stream, because I'm not entirely sure if this method will work in your particular case...
DJ Egg is online now   Reply With Quote
Old 13th January 2004, 10:21   #3
Morkeleb
Junior Member
 
Join Date: Jan 2004
Posts: 5
Hello DJ Egg.

I have tried your suggestions.
Well, I partly did even before you suggested, but now,
and after having an updated encoder,
I got a bit nearer to the goal:

Currently Winamp plays the files, but incorrectly -
it stutters so hard that its not nice to listen.
I am quite sure this is no bandwidth problem.

You requested a real working stream.
For this I created a user for you on my Site.
I have sent you the login information in a private message.

Morkeleb
Morkeleb is offline   Reply With Quote
Old 13th January 2004, 12:03   #4
Morkeleb
Junior Member
 
Join Date: Jan 2004
Posts: 5
I found out a bit more:

It could be due to the chunked encoding that the tomcat server sends ogg in.

Does winamp support chunked encoding?
Do you think this can be the reason?

Secondly, it often happens to me that playing does not work anymore after some time - even after starting winamp again.
I have to restart the whole PC then.
I experienced this with ogg on more then one machine.
Sometimes winamp crashes with ogg, too.
Do you have an idea what may be causing this?

By standard http 1.1 needs chunked encoding if the content length is not specified. Strangely, if I send an mp3 without content length it doesnt use chunked encoding. I was not yet successfull in disabling chunked encoding in that case even with the allowChunking="false" parameter for tomcat.

I will post in the tomcat mailing list about this.

Morkeleb
Morkeleb is offline   Reply With Quote
Old 13th January 2004, 13:53   #5
Morkeleb
Junior Member
 
Join Date: Jan 2004
Posts: 5
I researched even more:

chunked encoding is only availble in http 1.1.

For some reason Winamp (I tested with version 5.01, but it seemes to also apply to the 2.8-range) sends http 1.0 requests for mp3 but http 1.1 requests for ogg.

This causes chunked encoding when no content length is specified (this cannot be turned off in http 1.1) and thus
maybe the jerky playback because winamp does not handle the chuning right and interprets it as ogg data.

See here http header examples:

MP3:
GET /yarf/In_The_MUCK.mp3;jsessionid=39EEDAA5A279E88FBBFB2EBE85EEB94F?trackid=1&file.mp3 HTTP/1.0..Host: yarf.sytes.net..User-Agent: WinampMPEG/5.0..Accept: */*..Icy-MetaData:1..Connection: close....

HTTP/1.1 200 OK..Content-Type: audio/x-mpeg..Content-Location: In_The_MUCK_28k.mp3..Date: Tue, 13 Jan 2004 13:30:06 GMT..Server: Apache Coyote/1.0..Connection: close....

OGG:
GET /yarf/In_The_MUCK.ogg;jsessionid=39EEDAA5A279E88FBBFB2EBE85EEB94F?trackid=1&file.ogg HTTP/1.1..Host:yarf.sytes.net..User-Agent:Winamp..Accept:*/*....

HTTP/1.1 200 OK..Content-Type: application/x-ogg..Content-Location: In_The_MUCK_isdn.ogg..Transfer-Encoding: chunked..Date: Tue, 13 Jan 2004 13:32:33 GMT..Server: Apache Coyote/1.0....

For me this is a BUG!

Can you fix this in the next winamp release?
Morkeleb is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Winamp > Winamp Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump