1
votes

I have a web application that is using VLC plugin to stream a video. All this time it has been working well. Now the user wants to add another video stream to the site. When I tried to open this url: rtsp://10.3.207.52/MediaInput/h264/stream_2 on my windows VLC player, I had to go to Tools > Preferences > Input/Codecs and select RTP over RTSP (TCP) in order to be able to play the video stream. Otherwise it won't display the video.

My question is, is there such parameter in VLC object for the web to select RTP over RTSP ?
Because currently it is not working on the web and I'm pretty sure it needs to be in RTP over RTSP mode, just like in windows VLC.

Here is the object that I'm using:

        <object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
                id="vlcplayer" class="camera-single" codebase="../../axvlc-win32.cab">
            <param name="MRL" value="" />
            <param name="ShowDisplay" value="True" />
            <param name="AutoLoop" value="False" />
            <param name="AutoPlay" value="False" />
            <param name="Volume" value="50" />
            <param name="toolbar" value="true" />
            <param name="StartTime" value="0" />

            <embed pluginspage="http://www.videolan.org"
                   type="application/x-vlc-plugin"
                   name="vlcplayer"
                   class="camera-single">
            </embed>
        </object>
1

1 Answers

2
votes

Try this script:

<script type="text/javascript" language="javascript">
    var vlc = document.getElementById("vlcplayer");

    try {
      var options = new Array("rtsp-tcp");
      var id = vlc.playlist.add("rtsp://user:password@IP:554","Video",options);

      vlc.playlist.playItem(id);    
    }
    catch (ex) {    
    }           
</script>