Page 1 of 1

How does vlc read over HTTP? Want to serve a bytestream..

Posted: 05 Sep 2009 11:45
by pion
I am attempting to write a php script to send video data to vlc.

What I'm trying to do, is to mimic the behaviour of apache, when you enter http://localhost/sample.avi into the "open network stream".

I want to serve sample.avi from php, by sending the data to vlc from php. Using fiddler I was able to mimic the headers, and partial byte requests, and I am able to playback my sample.avi using Windows Media Player open http -> http://localhost/sample.php - including seek.

Aparently vlc is reading the file different, but I can't seem to figure out how?
I noticed vlc is checking if the server is running webdav, which it isn't, but I can't seem to figure out where or how vlc request the actual bytes of data it needs?

Any hints as to what data the apache server sends, which I could be missing in my php script? Or rather, what data vlc expects and doesn't get



*Edit: Media player 12.0.7600 (ships with win7 final) sends GET requests with Range header for spesific bytes in order to start playback and seek, can't seem to find that behaviour in vlc, or any other media player I've tried
* VLC needs a partial header, else it will stop recieving data - even if you send the whole file, it needs a partial data header to start playback - on seek it correctly send bytes header. Why not request the parity(?) bytes at the end of avi file to display a proper seek bar?

* VLC downloading .avi first requests Bytes 0-, then Bytes 2048-
In apache: Right after the Bytes 2048- request, it sends webdav request OPTIONS, then PROPFIND - where PROPFIND returns 405 Not allowed due webdav disabled - playback runs as expected
Bytestream from php: No webdav requests are sendt

What info is it that vlc is expecting, which I do not correctly send?

Re: How does vlc read over HTTP? Want to serve a bytestream..

Posted: 10 Sep 2009 19:52
by pion
I am able to start playback with VLC, however if there's limited bandwidth availible, vlc just freeze playback - while still using all availible bandwidth! If I seek to another place in the video, it starts buffering, and playback starts as expected. Not sure if that's a feature request or bug tho