How to play wmv files in html5 video player - html

Is there any way to play .wmv files using html5 video player?

There is no way. No browser (currently, if ever) supports playing wmv files. You will have to convert it into a format that browsers know how to play.

That's not true. Wmv files CAN play in IE with the windows media player object.
Example:
<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="480"
height="360" codebase="http://www.microsoft.com/Windows/MediaPlayer/">
<param name="Filename" value="http://walkernewsdownload.googlepages.com/HP-iPaq-614.wmv">
<param name="AutoStart" value="true">
<param name="ShowControls" value="true">
<param name="BufferingTime" value="2">
<param name="ShowStatusBar" value="true">
<param name="AutoSize" value="true">
<param name="InvokeURLs" value="false">
<embed src="http://walkernewsdownload.googlepages.com/HP-iPaq-614.wmv"
type="application/x-mplayer2" autostart="1" enabled="1" showstatusbar="1"
showdisplay="1" showcontrols="1"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0" width="480" height="360"></embed>
</object>
You might need to install the Windows Media Player plug-in for your browser (if it is still available for your browser)
Credit: See http://www.walkernews.net/2008/08/17/windows-media-player-how-to-embed-wmv-file-in-html-code/ for a more thorough explanation.

AFAIK, the only way to play WMV files in a browser without resorting to embedding WMP is using Silverlight.

Mediaelement.js player documentation says, support to wmv and mov, but so far i have not seen any positive or success comments for these formats.Formats like wmv and mov are proprietary, so to play video user need to explicitly install browser based plugins. Latest version of Firefox doesn't support wmv directly, there is a work around.To support mov format,user need to have quicktime player install in the system.Go for players that supports Flash fallback for non HTML5 browsers.
WMV plugin for firefox
Firefox Documentation:

Heh, you would think IE would support it as WMV was a Microsoft format and IE is a Microsoft application. Interesting how they don't seem to mix.
Regardless, I hope that WMV will be supported in the future. Technically speaking, all current video formats except for OGG are proprietary. OGG is the only open platform codec.

Sorry, but actually isn't supported in google chrome, safari, Opera and firefox...
You can use any programs to pass WMV to MP4 files, supported :)
I hope this reply has helped you a lot!

Related

Raspberry Pi RTSP steam in browser

I have set up a RTSP stream from my raspberry pi camera module using this:
raspivid -o - -t 9999999 |cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264
I am able to view it using VLC with: rtsp://192.168.0.18:8554/
When I attempt to embed the video in a web page the video does not show.
<!DOCTYPE html>
<html><body>
<OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab"
width="800" height="600" id="vlc" events="True">
<param name="Src" value="rtsp://192.168.0.18:8554/" />
<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://192.168.0.18:8554/" ></embed>
</OBJECT>
</body></html>
What is the best way to embed the video feed in HTML to view it in a web browser?
Well this is a bit tricky - when you open the RTSP link directly with VLC it should work since VLC comes packed with all the codecs (in your case H264). However I'm not aware of what happens with the browser plugin - does it reuse the codecs from the VLC installation or what. It could be that a codec is simply missing on the viewer's end but I'm not sure about that. Also, using the plugin you could run into issues with support among different browsers and whatnot.
The html5 video thing is a bit sketchy since as far as I remember (and this may have changed) neither live H.264 nor WebM is fully supported across all browsers. I'd still go with WebM since Chrome and Firefox has it and only IE requires an add-on. Check this question, it has a valid WebM streaming command line in the response and see if that works for you. If it does you should be even able to omit all the embed stuff and just use a plain HTML5 video tag.

Cannot get Quicktime to Play in IE 9

I am trying to get a movie uploaded from a mobile device to play in a browser.
It works fine in Chrome and FF and IE9(compatibility mode) but I cannot get it to play in IE9 not in compatibility mode.
My embed code is:
<video id='vid' class='video' width='274' height='169' controls='controls' preload='load' autoplay='autoplay'>
<source src='/videos/vid1.mov' />
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="320" height="256" >
<param name="src" value='/videos/vid1.mov'>
<param name="autoplay" value="true">
<param name="loop" value="false">
<param name="controller" value="true">
<embed src='/videos/vid1.mov' width="274" height="169" autoplay="true" loop="false" controller="true" pluginspage="http://www.apple.com/quicktime/"></embed>
</object>
</video>
At first I was just trying the Html5 embed code, but that didn't work, so switched it out for object and embed which didn't work either.
I found that I can combine both here: http://www.w3schools.com/html/html_videos.asp
but still it doesn't work anyway.
After spending 2 hours googling and trying different variations of this I need help!
IE9's HTML5 specs only support H.264 video encoding, so it's worth checking if the .mov was encoded properly
http://blogs.msdn.com/b/ie/archive/2010/04/29/html5-video.aspx
It could also help to supply at least 2 formats of your video, as not all browsers support one particular format. Perhaps .mp4 and .mov? If you're really ambitious swap .mov with .ogv, add a flash-based fallback as your object tag and you should be pretty well set.
change the mime type (as the server delivers it to the browser) from video/quicktime to video/mp4. Simplest way to do this, would be to add this to your .htaccess file:
AddType video/mp4 .mov
Everything should be good once you have this in place. The only other thing you'll likely see is videos coming from an iPhone being rotated 90 degrees to the left. This is the raw format stored by iOS. You'll have to take care of that on the iPhone or the server

How to play an AVI file in a video tag?

I'm wondering if it's possible to make a browser play a AVI file within a video tag.
Everything I found on the web talking about it focus on MP4 and Ogg formats but nobody talks about the AVI format.
The only solution I found is to drop the video tag and make the video playable using JW Player.
Only the DivX web player can stream avi files. actually, theres a plug in for vlc to stream avi files also, but its buggy.
Sometimes it's a pain in the ass to get a solid answer. its one of the big sucks of the internet.
<object id="ie_plugin" classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616"
width="660"
height="300"
codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab">
<param name="custommode" value="stage6" />
<param name="autoPlay" value="false" />
<param name="src" value="link-to-avi" />
<param name="bannerEnabled" value="false" />
<embed id="np_plugin" type="video/divx"
src="link-to-avi"
custommode="stage6"
width="660"
height="300"
autoPlay="false"
bannerEnabled="false"
pluginspage="http://go.divx.com/plugin/download/">
</embed>
</object>
note where it says "link-to-avi" twice :)
Today there are excellent approaches to deal with it. One of them is the module fluent-ffmpeg found on npm.
It requires the previous installation of FFMPEG
The support of avi isn't direct. It will be necessary build a server with node to serve your html.

How to stream live video in HTML5?

I'm looking for a way to broadcast a live video taken from a webcam or camera rooted to a PC.
The broadcast should be displayed in a HTML5 page using the tag (which support rtp, and rtsp I think).
The user viewing the stream should not have to install any plug-in or video player such as QuickTime.
I need the video to be in mp4 format such as: rtsp://www.mywebsite/streaming/video.mp4
This would be the link I'd put as the src of the html 5 video tag.
So I'd like to know if it's possible, what are my options to do such things.
It's possible. But you will have major problems if you're looking for cross browser support. What you can do is offer HTML5 video to the browsers supporting it and then offer QuickTime for browsers not supporting it.
<video src="stream.mp4">
<!-- Don't support <video> -->
<object>
<param name="src" value="video.mp4" />

 <param name="autoplay" value="true" />

 <param name="type" value="video/quicktime" height="256" width="320" />

 
 <embed src="video.mp4" height="256" width="320" autoplay="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/" />
</object>
</video>
Also see: Streaming via RTSP or RTP in HTML5
I don't think it is possible now to "cheat" the HTML5 browser to encapsulate the live video stream to a ".mp4" file.
I believe HTML5 will consider live video support in a near future.
What you can do is just wait. :)
For maximum compatibility, here’s what our video workflow will look like,
Make one version that uses H.264 baseline video and AAC “low complexity” audio in an MP4 container & Make another version that uses WebM (VP8 + Vorbis) or Theora video and Vorbis audio in an Ogg container.
I think this combination solves your problem & it plays on most of browsers.
You should required at least two versions of Video to play in all the browsers.

Pure HTML Music Player

How can I use pure HTML to make a browser-integrated flash-free online music player? Like, you click on a button, and the music starts playing. I have tried everything with <embed> and with(out) <noembed>, but none of it seems to work. I need it to work in Firefox.
I have an MP3 file.
EDIT: Actually, folks, I am SO sorry for asking this question. I have now seen that I simply had not written the path correctly. It all works quite fine with the <embed src="../../path/to/file.mp3" autostart="false" width="20" height="20"/> tag.
The thing is, I was trying to write it for browsers that don't support Flash, like e. g. iPad's Safari.
This ought to help. The HTML5 audio tag has decent support with newer versions of Firefox, Safari, Chrome, and Opera (sadly no Internet Explorer).
You may need to convert your .mp3 to .ogg or another format because certain browsers only allow certain formats.
Oh, you'll need Javascript for controls like .play(), .pause()...
I realize this is not an answer to the question per se, I am adding it for completeness.
This link has every possible permutation you can imagine...
I am not sure if the part below will work in FireFox:
Here is how to embed Windows Media Player into your HTML.
To embed an object in HTML document, the object class ID is required. The class ID for Windows Media Player 7, 9, 10 and 11 is clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6.
Insert the following code into your HTML document to embed Windows Media Player 7 and later:
<OBJECT id="VIDEO" width="320" height="240"
style="position:absolute; left:0;top:0;"
CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject">
<PARAM NAME="URL" VALUE="your file or url">
<PARAM NAME="SendPlayStateChangeEvents" VALUE="True">
<PARAM NAME="AutoStart" VALUE="True">
<PARAM name="uiMode" value="none">
<PARAM name="PlayCount" value="9999">
</OBJECT>
In the URL parameter, you can specify a URL (for streaming) or a local file.
I don't think this is possible yet (comes with HTML5).
You could use the Yahoo Media Player which works with Javascript.