meloncholy / vid-streamer

VidStreamer.js: A simple streamer for Flash and HTML5-style videos. Supports HTTP pseudostreaming and works with JW Player's bitrate switching.
http://meloncholy.com
384 stars 64 forks source link

Streaming .avi files shows a download popup #21

Open mreis1 opened 9 years ago

mreis1 commented 9 years ago

Hello, I tried to stream a .avi file but it gets downloaded instead of streamed. .mp4 files works like a charm. Thanks

meloncholy commented 9 years ago

This is probably because your browser doesn't support playing AVI files. I've just tried opening an AVI in Chrome directly (hadn't checked if they supported those for a while) and it downloaded, whereas an MP4, as you say, will play fine in the browser.

If you're using a different browser / have different plugins / are running a different OS then you may get different behaviour (and please let me know :), but otherwise there's not a lot I can do. Sorry.

mh-cbon commented 8 years ago

afaik, and after a quick check, avi is not a good candidate for streaming http://stackoverflow.com/a/743229/4466350

One solution is to encode on the fly the avi to mp4, see this for example https://github.com/nknapp/html5-media-converter/blob/master/src/VideoConverter.js it is using fluent-ffmpeg under the hood.

My personal tries about that was not so good as it needs a good machine to transcode the video with a good quality. It also depends of the context within what your application will run.

mreis1 commented 7 years ago

@mh-cbon thanks for the reference