
HTTP Streaming with TomCat Server
I have a Tomcat server and I want to do HTTP streaming for flv files.
Since there does not seem to be any streaming module available for Tomcat (I do not want to go through apache and mod_jk route), I developed a filter servlet for streaming .flv files
The idea is that JW player sends test.flv?start=XXXX when it wants to play from XXXX byte. Tomcat is a byte streaming server that accepts request with range headers. So my filter converts from one format to another.
Here is what I have done.
1)Intercept request for flv files.
2)See whether there is a 'start' parameter in the URL
3)Modify the request by adding a 'Range' header and pass it on to default servlet.
The problem I face is this:
When I play the test.flv file, it plays.
When I seek to a position in the test.flv(that has not been downloaded), then the player gives a "FILE NOT FOUND" error.
But when I see the response from server, I see that the server gives a SUCCESS : HTTP 206 partial response.
So What could be the problem? Is it
1) JW player does not work with HTTP 206 response?
2) The file offset (for the keyframe) in the media file is wrong? Though I have used flvtool2 as well as flvmdi to create flv files with keyframes. Both files have same problem.
But why is JW player saying "FILE NOT FOUND" when server is returning a HTTP 206 partial response?