Search code examples
javascriptrtsp

How to run rtsp video on web page


Hey I would like to know if I can stream an rtsp video on a web page.

If so which third party library can do this work, or what are the available solutions in this current state.

I know that I can run rtsp video on vlc, but can I run vlc on a web page?

I will be glad for any help. Thanks in advance.


Solution

  • There is a web plugin from VLC. From the documentation:

    To embed the plugin into a webpage, use the following template:

    <embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org"
      width="100" height="100" target="rtsp://yourip" />
    

    If you are using vlc version < 2.2.0 with Internet Explorer, use instead the following <object> template:

    <object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" codebase="http://download.videolan.org/pub/videolan/vlc/last/win32/axvlc.cab"
      width="100" height="100" target="rtsp://yourip" ></object>
    

    For the declaration of tag attributes, use the tag . Here an example:

    <object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" codebase="http://download.videolan.org/pub/videolan/vlc/last/win32/axvlc.cab"
      width="100" height="100" target="rtsp://yourip" >
        <param name="autostart" value="true" />
        <param name="allowfullscreen" value="false" />
    </object>
    

    For compatibility with the mozilla plugin, you can combine both tags:

    <object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" codebase="http://download.videolan.org/pub/videolan/vlc/last/win32/axvlc.cab" id="vlc">
        <embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" name="vlc" />
    </object>