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

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
pion
Blank Cone
Blank Cone
Posts: 14
Joined: 01 Nov 2008 19:07

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

Postby pion » 05 Sep 2009 11:45

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?

pion
Blank Cone
Blank Cone
Posts: 14
Joined: 01 Nov 2008 19:07

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

Postby pion » 10 Sep 2009 19:52

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


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 1 guest