Old 27th February 2006, 16:02   #1
nipsy
Junior Member
 
Join Date: Feb 2006
Posts: 2
bug handling streams and content-type?

I'm having a problem with Winamp 5.2 and a music archive I've put together. The archive is in FLAC format and I have a PHP script which encodes MP3 or Ogg Vorbis files on the fly from the FLAC files. The URL looks something like this:
---
http://somehost/dir/play-ogg.php?file=01-song.flac

I mention this in case it has something to do with the problem. Anyway, I assumed since it's a URL, Winamp would simply use the Content-Type header to determine the proper handler.

The header for any given song looks something like this:
---
200 OK
Connection: close
Date: Mon, 27 Feb 2006 16:55:18 GMT
Server: Apache
Content-Type: application/ogg
Client-Date: Mon, 27 Feb 2006 16:55:19 GMT
Client-Peer: 127.0.0.1:80
Client-Response-Num: 1
Content-Disposition: attachment; filename="song.ogg"
X-Powered-By: PHP/4.4.2-1
---

Under Winamp 5.2 (I didn't test on anything older), trying to play either an Ogg Vorbis file (the above header example) or an MP3 (using audio/mpeg as the Content-Type), Winamp just sits there and does nothing. For what it's worth VLC can play these without any problem (although I prefer Winamp for playback which is why I'm reporting this).

Any ideas?
nipsy is offline   Reply With Quote
Old 27th February 2006, 17:13   #2
drewbar
Sawg 2.0
Major Dude
 
Join Date: Mar 2004
Posts: 5,916
Because according to the URL Winamp thinks it's getting a FLAC file, not an MP3 or Ogg Vorbis file.

Count with us!
Jan 1st, 12AM (PST, GMT -8) 2010 - 282,246
drewbar is offline   Reply With Quote
Old 27th February 2006, 17:18   #3
nipsy
Junior Member
 
Join Date: Feb 2006
Posts: 2
Which would be a bug since, out of the box, Winamp does not support FLAC anyway. I happen to have the latest Winamp/FLAC plugin in place, but I tried it with and without the plugin present, and Winamp still hangs.

Extension parsing (especially for a stream) seems particularly bad. Content-Type should always trump any sort of guesswork from extension parsing.
nipsy is offline   Reply With Quote
Old 27th February 2006, 17:26   #4
drewbar
Sawg 2.0
Major Dude
 
Join Date: Mar 2004
Posts: 5,916
Winamp uses the file extension to determin which input plugin to hand the stream off too. If the extension does not accutatly match the content of the stream, it's not going to work.

Count with us!
Jan 1st, 12AM (PST, GMT -8) 2010 - 282,246
drewbar 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