Page 1 of 1

VLC does not support HTTP 1.1 protocol for MP3 Streaming

Posted: 10 Jan 2010 18:53
by ericschmidt
I have built an MP3 streaming server that emulates Shoutcast and Icecast functionality. I am hoping that someone who is familiar with the streaming code in VLC can shed some light here.

Issue: VLC sends HTTP 1.1 requests when connecting to a stream source, however is does not support chunked transfer encoding for Shoutcast or Icecast streams. Why? HTTP 1.1 protocol clearly states that if a client makes a 1.1 request and the server responds with 1.1 the client must support 1.1.

- Repro: VLC Client sends request for "Icecast" stream with HTTP 1.1 and Icy-MetaData=1. This means that the client can support HTTP 1.1 and meta data in the stream. However, this is not the case. The VLC player recognizes the stream, starts playing, but once it hits the meta-data marker it dies because (I believe) it assumes that this is just a plain MP3/mime stream not an Icecast stream. What is really strange is that the player sometime recognizes that first meta-marker, but then dies on the next read.

Thoughts? How can this be addressed?

Thanks
Eric

Re: VLC does not support HTTP 1.1 protocol for MP3 Streaming

Posted: 11 Jan 2010 12:09
by Jean-Baptiste Kempf
File a bug.

Re: VLC does not support HTTP 1.1 protocol for MP3 Streaming

Posted: 11 Jan 2010 17:34
by RĂ©mi Denis-Courmont
The VLC HTTP client does support chunked Transfer-Encoding.

Re: VLC does not support HTTP 1.1 protocol for MP3 Streaming

Posted: 08 Feb 2010 05:57
by Punkley
Im also seeing this issue,


try connecting to
http://radio1.internode.on.net:8000/1

It will show the problem.

Re: VLC does not support HTTP 1.1 protocol for MP3 Streaming

Posted: 08 Feb 2010 19:58
by Punkley
ok i've worked around the problem,

The problem im seeing appears to be an issue with http/1.1 queries chunked-transfers(i think) and not specifying a content-length.

This works with VLC

HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Server: OnNet-CDN/0.7.65
Date: Mon, 08 Feb 2010 18:55:16 GMT
Content-Type: audio/mpeg
Connection: close
icy-br: 128
icy-genre: Punk
icy-name: PunkRadioCast | The Worlds Largest And Loudest Punk Rock Station
icy-url: http://www.punkradiocast.com
Cache-Control: no-cache
Content-Length: 10488645

This doesn't

HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Server: OnNet-CDN/0.7.65
Date: Mon, 08 Feb 2010 18:55:16 GMT
Content-Type: audio/mpeg
Connection: close
icy-br: 128
icy-genre: Punk
icy-name: PunkRadioCast | The Worlds Largest And Loudest Punk Rock Station
icy-url: http://www.punkradiocast.com
Cache-Control: no-cache


I've currently got a work arround in place to add a fake Content-Length when the "VLC Player" useragent is detected.