6

Can someone guide me on how to properly stream an RSTP in web?

So I have this url rtsp://192.168.1.55:554/vid/stream/channels/1 When played via VLC player Streaming in my desktop appears to run/stream fine.

My next challenge is, to view this via WEB. So I created a simple HTML site, and embedded the quicktime code which I found somewhere in stackoverflow.

<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"  WIDTH="400" HEIGHT="300" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab";>
<PARAM NAME="src" VALUE="rtsp://192.168.1.55:554/vid/stream/channels/1";>
<PARAM NAME="controller" VALUE="false">
<PARAM name="AUTOPLAY" VALUE="true">
<PARAM NAME="qtsrc" VALUE="rtsp://192.168.1.55:554/vid/stream/channels/1";>
<PARAM NAME="pluginspage" VALUE="http://www.apple.com/quicktime/download/indext.html";>
<PARAM name="type" VALUE="video/quicktime">
<EMBED WIDTH="400" HEIGHT="300" AUTOPLAY="true" CONTROLLER="false" SRC="rtsp://192.168.1.55:554/vid/stream/channels/1"; qtsrc="rtsp://192.168.1.55:554/vid/stream/channels/1"; BGCOLOR="FFFFFF" BORDER="0" PLUGINSPAGE="http://www.apple.com/quicktime/download/indext.html";></EMBED>
</OBJECT>

i also included these on my <head> tag

<script src="http://www.apple.com/library/quicktime/scripts/ac_quicktime.js" language="JavaScript" type="text/javascript"></script>
<script src="http://www.apple.com/library/quicktime/scripts/qtp_library.js" language="JavaScript" type="text/javascript"></script>
<link href="http://www.apple.com/library/quicktime/stylesheets/qtp_library.css" rel="StyleSheet" type="text/css" />

But when I load the page, I get a blank screen.

I have tried chrome/ie/firefox.

4

1 回答 1

-2

您必须将路由器的公共端口 554 重定向到私有端口 192.168.1.55:554 才能从网络中的其他位置访问它。

最后,您需要更改代码:

rtsp://XXX.XXX.XXX.XXX:554/vid/stream/channels/1

代替

rtsp://192.168.1.55:554/vid/stream/channels/1

其中 XXX.XXX.XXX.XXX 是您路由器的公网 IP

于 2014-09-11T14:05:04.127 回答