ch00k
ch00k

Reputation: 29

Embedding an RTSP stream on a web page using QuickTime

I am attempting to embed an rtsp stream from an IP camera, using the quicktime plugin. Currently I can connect to the RTSP stream both locally and externally using QuickTime player, however when I attempt to embed the code into my web page, after quicktime prompts me for my permission to run, quicktime's logo comes up, and no video is loaded. Ive tried loading the web page on computers both inside and outside the network, and tried a generic texteditor HTML version of the code with the same results. Im confident that the problem lies somewhere around the code, not the network or stream, so if anyone has any suggestions, the help would be greatly appreciated. Example:

<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="320" width="240">

<param name="src" value=
"rtsp://xxx.xxx.xxx.xxx:8554/CH001.sdp" />
<param name="autoplay" value="true" />
<param name="controller" value="true" />
<param name="loop" value="false" />
<param name="type" value="video/quicktime" />

<embed src="rtsp://xxx.xxx.xxx.xxx:8554/CH001.sdp" autoplay="true" controller="true" loop="false" height="320" width="240" pluginspage="http://www.apple.com/quicktime/download/" /></object>

Upvotes: 1

Views: 7584

Answers (2)

Hossein Amini
Hossein Amini

Reputation: 737

For anyone needing this in the future, below code worked for me. just put the code inside HTML page and replace my RTSP url with your camera's specific url:

<script type="text/javascript">
document.writeln('<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width=' 
+ 720 + ' height=' + 480 + ' 
CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">');
document.writeln('<param name="autoplay" value="true">');
document.writeln('<param name="controller" value="true">');
document.writeln('<param name="qtsrc" value="' + 
'rtsp://192.168.1.90:554/user=admin&password=&channel=01&stream=0.sdp' + '">');
</script>

Upvotes: 0

pragnesh
pragnesh

Reputation: 1250

Following is working for me in Internet Explorer. Hope this helps.

<html><body>
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="1280" height="720">
    <param name="src" value="test1.qtl" />
    <param name="autoplay" value="true" />
    <param name="pluginspage" value="http://www.apple.com/quicktime/download/" />
    <param name="controller" value="true" />
    <object data="sample-movie.qtl" width="1280" height="720" type="video/quicktime">
        <param name="pluginurl" value="http://www.apple.com/quicktime/download/" />
        <param name="controller" value="true" />
    </object>
</object>
</body>
</html>

And here is the corresponding .qtl file

<?xml version="1.0"?>
<?quicktime type="application/x-quicktime-media-link"?>
<embed autoplay="true" fullscreen="full" href="http://www.apple.com/quicktime/" src="rtsp://10.99.19.224:8554/test" 
/>

Upvotes: 1

Related Questions