Can html 5 serve the stream in real time?

I heard many interesting features of html 5,

but can it serve a real-time media stream from a webcam?

+6
html5 video-streaming
source share
6 answers

Not html5 on it is own, but html5 video can read streams (for example, on YouTube, live broadcast).

Stream over RTSP or RTP in HTML5 for some info

+1
source share

HTML5 video is just a tag that looks like

<video src="movie.mp4" controls="controls"> Your browser doesn't support the video tag. </video> 

(link here )

Regardless of what movie.mp4 actually contains, it is decided by the base server and can be streaming content if the format itself supports streaming. For example, the h.264 eXtended Profile and scalable high profile support streaming video.

+1
source share

I proved it a few days ago. The answer is yes and no. Yes XMLHttpRequest allows you to access data while streaming from the camera. No, it is not supported in all browsers.

In XMLHttpRequest, you can receive status messages from an object when they are executed asynchronously. The problem is that every browser passes this a little bit. The big problem is that even if the dose of Internet Explorer supports status updates, if you try to access data in state 3, this will lead to an error. For more information, see Link.

If your camera can send a video stream, which is the standard type of multimedia, as other posters say, this would be your best option. Perhaps after the release of IE 9, XMLHttpRequest will work as intended.

+1
source share

This is probably what you are looking for:

http://www.whatwg.org/specs/web-apps/current-work/complete/video-conferencing-and-peer-to-peer-communication.html

Unfortunately, I have no idea about browser support at this time, and the standard itself seems to change frequently.

+1
source share

This has nothing to do with HTML 5. In HTML, you simply point the browser to the resource by pointing it to the video. If your camera emits a stream in a format that the browser can display, it should work, of course. Although in my experience many cameras provide MJPEG, and support for them directly in browsers seems to be limited at best.

0
source share

You can use ffmpeg to convert real-time video from the camera format (MJPEG, etc.), and then access the converted file while it is being generated. MP4 containers store some information at the end of the file, which prevents streaming, so if you are not using another container (ogg, mkv, etc.), you need to use something like qt-faststart to create real-time MP4 files time.

0
source share

All Articles