Embedding an RTSP stream on a web page using QuickTime - embed

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>

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"
/>

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>

Related

Prevent embedded HTML video from autoplaying

Here is my code:
<object id="flashObj" width="640" height="390" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,47,0">
<param name="movie" value="http://c.brightcove.com/services/viewer/federated_f9?isSlim=0" />
<param name="bgcolor" value="#FFFFFF" />
<param name="flashVars" value="videoId=3945004669001&playerID=2868544859001&playerKey=AQ~~,AAAABvZFMzE~,IXjx0MpOF0rs6Zj6tTY84DVV4TqsG9K-&domain=embed&dynamicStreaming=true" />
<param name="base" value="http://admin.brightcove.com" />
<param name="seamlesstabbing" value="false" />
<param name="allowFullScreen" value="true" />
<param name="swLiveConnect" value="true" />
<param name="allowScriptAccess" value="always" />
<embed src="http://c.brightcove.com/services/viewer/federated_f9?isSlim=1" bgcolor="#FFFFFF" flashVars="videoId=3945004669001&playerID=2868544859001&playerKey=AQ~~,AAAABvZFMzE~,IXjx0MpOF0rs6Zj6tTY84DVV4TqsG9K-&domain=embed&dynamicStreaming=true" base="http://admin.brightcove.com" name="flashObj" width="640" height="390" seamlesstabbing="false" type="application/x-shockwave-flash" allowFullScreen="true" swLiveConnect="true" allowScriptAccess="always" pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash></embed>
</object>
What code do I need to add, or how can I otherwise prevent this from autoplaying?
You could try something like adding flashvars="play=false"
However whether that will work or not depends on a number of different unknowns.
Check out How to make an embedded video not autoplay The first answer gives a far better explaination of it than I can.
However personally if this were a problem I were facing, assuming there was nothing stopping me from doing it I would use HTML5's video tag convert the desired video to MP4 and use it that way
Check out W3cshools for more info on HTML 5 video http://www.w3schools.com/html/html5_video.asp
I hope that helps !

Flash video (swf) not showing up

Is there anything wrong with the below code? Video is not showing up
<div style="vertical-align:middle;text-align:center;width:100%;height:100%">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" height="592" id="player" width="500">
<param name="movie" value="http://www.diareception.com/flvPlayer/Titanium1010.swf?key=key" />
<param name="FlashVars" value="userKey=key&videoIndex=4" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<embed allowfullscreen="true" allowscriptaccess="always" flashvars="userKey=key&videoIndex=4" height="592" name="player"
src="http://www.diareception.com/flvPlayer/Titanium1010.swf?key=key" type="application/x-shockwave-flash" width="500">
</embed></object>
</div>
I believe there is something wrong with your SWF file url/path. I tried replacing your swf file path with a sample SWF file and it worked perfectly fine.
Suggest your to recheck the SWF filepath.

Controlling frame rate of swf file

I want a swf file in my webpage. That file shows the frame rate of the document . Here is how i put it in my webpage
<!DOCTYPE html>
<html>
<body>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
width="550" height="400" id="gamefile">
<param name="allowScriptAccess" value="always" />
<param name="quality" value="high" />
<param name="play" value="true" />
<param name="loop" value="true" />
<embed src="fps.swf"
quality="high"
width="550"
height="400"
play="true"
loop="true"
allowScriptAccess="always"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer"></embed>
</object>
</body>
</html>
The file is working properly, but it shows the frame rate as around 60. The file I made in flash had a frame rate of 120 and I want the frame rate to be 120 only while showing in webpage, but it is currently showing 60
Can somebody out there help me?? You help is much appreciated...

Prevent video from pre-loading on website

I have the following code for a video on my website. I have the AutoPlay turned off in order to prevent playback as soon as I open the website. The problem is that the video still loads automatically and this hurts the bandwidth of some visitors. What can I do to prevent the video from loading until the user decides to play it?
<object width="530" height="405" scale="to fit" hspace="10" border="5">
<param name="VideoTitle" value="/urlpath/movie.m4v" />
<param name="AutoStart" value="False" />
<param name="ShowControls" value="True" />
<param name="ShowStatusBar" value="True" />
<param name="ShowDiplay" value="True" />
<param name="AutoRewind" value="True" />
<embed width="530" height="405" scale="tofit" hspace="0" filename= "/urlpath/movie.m4v"
autostart="False" showcontrols="True" showstatusbar="True" showdiplay="True"
autorewind="True" border="1" src="/urlpath/movie.m4v"></embed>
</object>
Thanks in advance.
Don't include the code in your page. Inject it into the page once the user clicks a fake PLAY button.
As Diodeus said, have it load "on-demand" by creating a javascript function.
Alternatively, I think you could use HTML5's video tag and leave preload off.
-- The Javascript solution is more friendly for older browsers, as not all support HTML5.

QuickTime MOV embedded in HTML page: Can't get controls to appear

Video plays fine, but the controls (play, stop, rewind etc.) don't appear, despite setting the "controller" parameter to "true".
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="320" height="260">
<param name="src" value="myvid.mov" />
<param name="controller" value="true" />
<object type="video/quicktime" data="myvid.mov" width="320" height="260" class="mov">
<param name="controller" value="true" />
</object>
</object>
Works fine when I refer to this video:
http://realdev1.realise.com/rossa/rendertest/quicktime.html
Do the controls need to be enabled when encoding the video perhaps?
The height of the movie + 16px should do the trick.