I've embedded VLC plugin on a website to play RTSP H.264 live video from webcam.
Everything works fine except --rtsp-tcp command line option. It should force VLC to use TCP as transport.
Here is what I expect to happen:
VLC plugin connects to camera and requests interleaved mode (TCP transport).
Here is what really happens:
1. VLC connects using UDP, which fails because it can't go through NAT.
2. VLC then tries TCP which works.
The problem is that no matter if I use --rtsp-tcp or not, VLC always tries UDP first then TCP. It takes a considerable amount of time before video appears.
Here is part of code which I use to embed VLC:
Code: Select all
<embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org"
version="VideoLAN.VLCPlugin.2" width="100%" height="85%" id="vlc">
</embed>
<script language="Javascript">
var vlc=document.getElementById("vlc");
var id=vlc.playlist.add("rtsp://<path_to_rtsp_stream>", "somename", "--rtsp-tcp");
vlc.playlist.playItem(id);
Thanks