I need to make a page which displays a video. Firefox and and Opera support the OGG format, no problem there. Chrome is ... "stupid" and does not recognize OGG.
Does Chrome on Windows know how to handle WMV? I already have them encoded, and no I cannot recode new videos since the media is limited in spaced (CDROM).
My code currently looks like this (and not working in chrome)
<video controls>
<source codecs="theora, vorbis" media="video/ogg" src="video.ogv" />
<source media="video/x-ms-wmv" src="video.wmv" />
Please install a new browser, or just get out
</video>
Note that I am missing a codec entry, does anyone know what I need to put there?
To embed WMV videos in a web page you have to use an object/embed tag that calls the windows media player plugin (if it is installed - ie it will not work in platforms where the plugin is not available like iOS). Have a look here for a working example.
Google Chrome will not automatically play WMV files as it requires Windows Media Player and it does not have a default plug-in. You need to install a video player to watch or play web videos in your PC.
Other Video Streaming OptionsHTML5 does not natively support . mov, . rm, or . wmv files so if you must play this file format, proprietary formats may still be useful.
The <video> element is supported by all modern browsers. However, not all browsers support the same video file format. MP4 files are the most widely accepted format, and other formats like WebM and Ogg are supported in Chrome, Firefox, and Opera.
To the best of my knowledge, Chrome doesn't support WMV. Opera, Firefox and Chrome support Ogg Theora+Vorbis, while Chrome and Safari support MPEG-4 H.264+AAC.
Your markup needs a bit of fixing. There is no codecs attribute, use the type attribute instead. Also, you usually don't need the media attribute at all. Here's your cleaned up markup:
<video controls>
<source type="video/ogg; codecs=theora,vorbis" src="video.ogv">
<source src="video.wmv">
Your browser doesn't support video, you may download the
video instead: <a href="video.ogv">Ogg</a>
</video>
The only browser that might be able to play WMV is Opera on Linux (if you happen to have the right GStreamer plugins installed). That's not very useful, so you should probably just not use WMV with <video> at all.
You might find this useful reading: Everything you need to know about HTML5 video and audio.
Disclaimer: I work on <video> for Opera.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With