I have spent many hours researching how to display an RTSP feed in a web page. I've tried Quicktime (400 bad request), VLC (No plugin to display this content) and Windows Media Player (protocol not supported). I've read many posts and pages tried variations of code in the web page and also looked at streaming servers, but to be honest, I was hoping it wouldn't be that complicated as I would need somewhere to host the server.
In can open the stream in VLC so was surprised when the plugin didn't work. This is the code in the page but the result is (No plugin to display this content) the browser doesn't even ask to download a plugin.
<OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab"
width="640" height="480" id="vlc" events="True">
<param name="Src" value="rtsp://belletout.no-ip.biz:1552/live3.sdp" />
<param name="ShowDisplay" value="True" />
<param name="AutoLoop" value="False" />
<param name="AutoPlay" value="True" />
<embed id="vlcEmb" type="application/x-google-vlc-plugin" version="VideoLAN.VLCPlugin.2" autoplay="yes" loop="no" width="640" height="480"
target="rtsp://belletout.no-ip.biz:1552/live3.sdp" ></embed>
</OBJECT>
I am really surprised that there isn't an easier method to do this unless I am just following examples that aren't appropriate.
Can anyone offer any suggestion as how to display this real RTSP stream from above in a web page? I would be most grateful.
Thanks
Rob
You need a live media encoder that can read the webcam feed and than encode it.
try windows media encoder Windows Media Encoder 9
change your webpage code to use windows media player.
There should be a sample when you install it.
Related
I have a very similar question to Play a Shoutcast Stream on iPhone with HTML5, but with a few differences...
I have an Icecast server running on Ubuntu 14.04 LTS, streaming an mp3. The setup follows Icecast's documentation exactly, is linked from an <audio> HTML5 tag on a website running on AWS EC2 and works in my desktop / laptop browser.
However, when I try to load the same website in iOS, on either my iPhone or my iPad, the HTML5 audio player loads, shows "Loading..." for several minutes, then either displays nothing or "Error".
The HTML5 code is as follows:
<audio controls>
<source src="http://xx.xx.xx.xx:8000/example1.mp3" type="audio/mpeg" />
</audio>
Suggestions or ideas as to why this doesn't work in iOS?
I finally got this resolved, but realized I never posted an answer.
I had to set the <audio> src value to the streaming mount point found in my icecast.xml file.
So, in my icecast.xml file, I have:
<!-- You may have multiple <listener> elements -->
<listen-socket>
<port>8000</port>
<bind-address>123.456.789.012</bind-address>
<shoutcast-mount>/stream</shoutcast-mount>
</listen-socket>
Thus, my HTML5 <audio> tag became:
For good measure, I also included the mime_type of audio/mpeg and controls to the <audio> tag, though these are not required.
I have an rails 3.2 application that uses a Flash Video Player. I load the Flash player using swfobject (I also tried the swf_fu gem that works fine). I use dynamic publishing method because I have some flashvars.
It works fine in development environment, but the player doesn't load on Safari and Firefox in production environment, and just shows the background color. It's working fine on Chrome though. The swfobject code seems to be working, I have the same HTML on all browsers when I open the Inspector.
<object type="application/x-shockwave-flash" id="VideoPlayer" data="/assets/VideoPlayer-e79c6b85d45b6d29d04fb4905e8c83dc.swf" width="480" height="390">
<param name="quality" value="high">
<param name="bgcolor" value="#869ca7">
<param name="flashvars" value="[...]">
</object>
If I just switch back to development environment it works again. The only difference I see is the fingerprint in production mode. In dev, there is just data="/assets/VideoPlayer.swf" but the rest is the same.
Any ideas on this? Caching, asset compilation, compression?
Turns out it was an asset compression problem. I turned off gzip compression and it worked again. Seems like Chrome Flash player handles this better..
I was just deploying my very first Ruby on Rails application to Engine Yard, and now the media player does not work in Firefox.
So far I am only supporting Opera, Chrome and Safari. On the local test server the media player was working as well with Firefox. I am using the very basic HTML5 player.
<audio id="audio_<%=i%>" controls="controls" height="100" width="200" title="Variante <%= #ind_titel[i]%>">
<source src='/audio/mp3/<%=value%>.mp3' type="audio/mp3" />
<source src='/audio/ogg/<%=value%>.ogg' type="audio/ogg" />
<embed height="100" width="100" src='/audio/mp3/<%=value%>.mp3' />
</audio>
Firebug gives me something like:
HTTP "Content-Type" "application/octet-stream" is not supported in Firefox
Edit:
I have changed now the /etc/nginx/mime.types on the Server and added the lines:
application/ogg ogg ogx;
audio/ogg oga;
But it still does not work...
According to this instruction: http://9elements.com/io/?p=306
I have tried to change as well the config/initializers/mime_types.rb
with the given lines but my local test server didnt even start with this code.
Not 100% sure but it sounds like your server is not reporting the proper mime types for your audio files. You could check by navigating to the audio file directly and checking the content type in the headers of Firebug's net tab. If that's the case apache (or whatever server you use) may have to be configured to report the proper mime type for .mp3 and .ogg files.
My SL app shows correctly in all browsers (Opera, FF, IE) in all web servers (embedded, IIS 7.5) on my develompment machine. But in work web server (IIS 7.5) no one browser show my SL app. No error, nothing - just empty place. But it contains all markup of my SL app:
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="200px" height="40px">
<param name="source" value="#Url.Content("~/Apps/SilverlightApplication1.xap")"/>
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="5.0.61118.0" />
<param name="autoUpgrade" value="true" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=5.0.61118.0" style="text-decoration:none">
<img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
</a>
</object>
In addition, on my development machine I have the "Setup SL app on this PC..." button in SL context menu, but not on my work server.
All IISs - on development and work server machines - have settings ".NET 4 FW" for app pool .NET version and integrated pipeline.
I can get the .xap file directly through the browser's address bar but can't get one through the HTML page.
It seems that the SL app just is not visible on my work server. How to fix it?
Addition. There is no any Silverlight development or client framework on the work server - can it be clue?
UPDATE. I changed data and type attributes in the object tag to "application/x-silverlight-app". Now the "invite to install SL" image appears instead of my SL app. But I already have the newest version of SL plugin, and while installing the SL the installer tells me about it.
If you are getting just a white screen then you should go into the silverlight.js and make it so the errors are thrown to some sort of message box that you can see.
If it's plain white there is an error of some sort going on, and if debug is essentially turned off in the settings (i.e don't show the user the error) then you'll not know what the issue is.
[EDIT]
Add .xap application/x-silverlight-app as MIME type.
OK this is a new one for me, I have a SWF file where the link only works on Mac browser but does not work on PC browser:
http://luc.edu/wwwtest/studyabroad/
I am using the absolute path for the SWF and check the FLA file and the link is going to the correctly location. Can anyone help me why this is happening? I have also checked my object code and it seems correct.
instead of http://luc.edu/wwwtest/studyabroad/ use http://www.luc.edu/wwwtest/studyabroad/
or instead of :
<param name="allowScriptAccess" value="sameDomain">
do
<param name="allowScriptAccess" value="Always">