I'm trying to build a standalone server for Roku that will stream content from my local computer and I run into a problem (I'm using Delphi for development).
If I send the whole video as a stream, Roku will play the video nice to about minute 30 and then won't work anymore. If I stream the same video from Apache server, the video will play without problems...
I looked in Apache logs and I see that Roku makes multiple requests for the same video:
192.168.1.137 - - [05/Feb/2011:14:42:44 -0800] "GET /dvr/Bear%20Attack!/Bear%20Attack!_20110126_18001900.mp4 HTTP/1.1" 500 679867904
192.168.1.137 - - [05/Feb/2011:14:45:16 -0800] "GET /dvr/Bear%20Attack!/Bear%20Attack!_20110126_18001900.mp4 HTTP/1.1" 500 679169301
192.168.1.137 - - [05/Feb/2011:14:46:41 -0800] "GET /dvr/Bear%20Attack!/Bear%20Attack!_20110126_18001900.mp4 HTTP/1.1" 500 679835136
192.168.1.137 - - [05/Feb/2011:14:47:57 -0800] "GET /dvr/Bear%20Attack!/Bear%20Attack!_20110126_18001900.mp4 HTTP/1.1" 500 679136533
192.168.1.137 - - [05/Feb/2011:14:50:46 -0800] "GET /dvr/Bear%20Attack!/Bear%20Attack!_20110126_18001900.mp4 HTTP/1.1" 500 679802368
192.168.1.137 - - [05/Feb/2011:14:51:17 -0800] "GET /dvr/Bear%20Attack!/Bear%20Attack!_20110126_18001900.mp4 HTTP/1.1" 500 679070997
192.168.1.137 - - [05/Feb/2011:14:53:50 -0800] "GET /dvr/Bear%20Attack!/Bear%20Attack!_20110126_18001900.mp4 HTTP/1.1" 500 679769600
Can someone please explain to me, just in few words how the communication between Roku and the server should be handled? I need a good simple explanation
🙂My first atempt, that plays about 30 min into the video looks like this on the sever side:
if FileExists(LFilename) then
begin
AResponseInfo.ContentType := 'video/mp4';
AResponseInfo.ContentStream := TIdReadFileExclusiveStream.Create(LFilename);
end;
TIA
P.S.: This is going to be open source, so anyone can play with it when I have a working version.
https://github.com/e1ioan/
http://rokucam.com