7

I use HTML5 <video> tag to play videos in my LAN from different computers. In my current setup, I have got a server, which provides the html page and all the videos I want to play. There are some computers which should play these videos by loading the html page. In general that works already. But sometimes after a while playing a video, the console says failed to load resource and the playing stops immediately. I thougt, this is maybe some sort of timeout in my LAN and I had the idea to play the videos locally, i.e. copy all videos to each computer and just provide the html on the server. The server html then, just links to file://.../.

but when I tried this approach on the server, the video was stopping every few seconds and it did not buffer at all. It was completely impossible to watch the video. Videos are *.mp4; I run chrome on all win7 computers, Server is XAMPP.

Is there either a way to catch the failed to load resource error, or a way to play local videos in a reasonable quality?

Did none of you have problems like that yet?

Milla Well
  • 3,193
  • 3
  • 35
  • 50
  • It seems to be prevented from playing because of security settings (and for good reason!) But there seems to be a workaround posted here: http://stackoverflow.com/questions/8885701/play-local-hard-drive-video-file-with-html5-video-tag Another option would be to install a simple webserver serving the video files on the lan – Flunk Jan 16 '13 at 15:19
  • I have a simple webserver (xampp), but - i don't know why - there is a error after a litte while. I will try the workaround! – Milla Well Jan 16 '13 at 15:36
  • Does someone know, what that win means in the example of @Flunk http://jsfiddle.net/dsbonev/cCCZ2/embedded/result,js,html,css/presentation/ ? I can't make the URL load correctly – Milla Well Jan 16 '13 at 16:03
  • @Flunk or: is it possible to change the security settings to allow a larger buffer? – Milla Well Feb 01 '13 at 12:55
  • What resource is the browser failing to load? – Jeffery To Feb 04 '13 at 09:12

1 Answers1

0

A few thoughts:

  • does your config include 'AddType video/mp4 .mp4'?
  • is it possible that progressive loading has been disabled somehow?
  • how large are the videos? there are reports of > 30Mb files having playback issues in XAMPP
  • if you convert to another format ( .ogg, .avi, similar ) do they playback any better?
  • if you use a .php (or similar) file to provide progressive loading - any change? IE Stream from the app instead of directly.
ethrbunny
  • 10,379
  • 9
  • 69
  • 131
  • Hello, thanks for your answer! Do you mean the "config" and "progressive loading" of my browser? If yes: How can I check both? It is possible, that the videos have a larger size than 30MB, but I am pretty sure, that it also occured with smaller sizes. I will check that again. I think converting all videos wouldn't be an option, because it would take so much time. But if you think it would help finding the answer I can try this with one or two videos. Could you also provide a link that explains progressive loading? – Milla Well Feb 07 '13 at 12:08
  • Use FFMPEG (or similar) to convert a few to .ogg or .flv and see if it makes any difference. – ethrbunny Feb 07 '13 at 13:12
  • Also - you didn't mention whether or not you support PHP. If so I have some sample code I can include. Otherwise, you might get some traction by searching for 'HTTP/1.1 206 Partial Content'. – ethrbunny Feb 07 '13 at 13:28