What I'd like to do is to play a video served by an request to a URL.
The webserver is Django
Here the HttpResponse to serve the video is formed:
filename = rec_path(recording_id) + '/rgb_video.mp4'
wrapper = FileWrapper(file(filename))
response = HttpResponse(wrapper, content_type='video/mp4')
response['Content-Disposition'] = 'filename=video.mp4'
response['Content-Length'] = os.path.getsize(filename)
return response
And in the HTML side I have
Your browser does not support the video tag. //add this line
I can download the video but not play it this way. I've tried installing the mod_h264 mod
and configuring a simple VirtualHost that only serves files. I've also tried Jwplayer but none of them worked.
UPDATE: Strangely one of the videos play this way. All videos are produced with the same settings so I'm not sure what's causing this. The video that plays is quite short, 8 seconds, so perhaps that is the cause?