最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to get stream from camera to web page? - Stack Overflow

programmeradmin5浏览0评论

I have started developing module which shows the live video stream from the camera on web page.

But, I don't know how to show the video stream live in web page.

Is there any JavaScript function helps to show live view? Does object tag in HTML allow us to embed live video ?

Could someone guide me on how I can do this?

I have started developing module which shows the live video stream from the camera on web page.

But, I don't know how to show the video stream live in web page.

Is there any JavaScript function helps to show live view? Does object tag in HTML allow us to embed live video ?

Could someone guide me on how I can do this?

Share Improve this question edited Mar 26, 2012 at 4:50 Starx 79k50 gold badges186 silver badges265 bronze badges asked Mar 26, 2012 at 4:13 MohanMohan 88710 gold badges20 silver badges32 bronze badges 2
  • Just to be sure. You are trying to show a webcam stream from a remote server on a client's browser? Or a local webcam feed? – Tchoupi Commented Mar 26, 2012 at 4:18
  • these camera should not play over internet. it can access only within industry. – Mohan Commented Mar 26, 2012 at 4:33
Add a ment  | 

2 Answers 2

Reset to default 7

If you are mentioning about the Live Streaming. For this you either need Streaming Video Server or HTTP Streaming.

  1. Streaming Video Server

    IT is the server from which you will stream your video. They have to be extremely fast, able to handle many connections at a time, depending on user's connection speed etc. To have this, you can

    • Buy your own, or
    • Sign up for a hosted streaming plan with an ISP (Internet Service Provider)
  2. Or, you need HTTP Streaming

    To make it as simple as it can be

    • Create a video file in a mon streaming media format
    • Upload the file to your web server
    • Make a simple hyperlink to the video file, or use special HTML tags to embed the video in a web page.

Some helpful posts and plugins

  • Video streaming over websockets using JavaScript

  • jQuery Video Player: Enables webcam video streaming

  • Video and Audio Streaming with Flash and Open Source Tools
    And yes <object> tag, can be used to embed a video player which stream the data.

  • Streaming over HTTP with JavaScript: AJAX video player Remended, step by step guide
<OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
        codebase="http://downloads.videolan/pub/videolan/vlc/latest/win32/axvlc.cab"
        width="640" height="441" id="vlc" events="True">

    <param name="Src" value="rtsp://your camera ip address" />
    <param name="ShowDisplay" value="True" />
    <param name="AutoLoop" value="False" />
    <param name="AutoPlay" value="True" />

    <embed id="vlcEmb"  type="application/x-google-vlc-plugin" quality="high" version="VideoLAN.VLCPlugin.2" autoplay="yes" loop="no" width="640" height="441"
           target="rtsp://your camera ip address" >               
    </embed>
发布评论

评论列表(0)

  1. 暂无评论