The Visual Lounge lets you find out about TechSmith behind-the-scenes. Watch screencasts and videos from other customers, meet up with your fellow TechSmith users and staff, and get more tips and tricks!

RSS iconSubscribe to RSS feed

Dev Corner - HTML 5 Video Player with multiple video streams

Posted on Thursday October 13, 2011 by Randall Brown

This week's Dev Corner post comes from Mike Luongo and details using HTML5 to create a video player that lets you play multiple video streams at once.

HTML5 video player with PIP that is movable/sizeable/opaciable

I've been playing around with html5 and I have to say it's an exciting new technology! That's right it really deserves a bunch of !!!!! Why is it so cool? With just with a little bit of javascript (yawn) I was able to create a PIP (picture in picture) player with opacity for the web. This example lets you click and drag around the pip (even off the original video). You can click the video and make it large. So you might want to check it out here:

HTML 5 PiP Demo ( Works best in Chrome )

Download the code here

For a long article on how all this works check out this link: Dive into html5

The most important part of the article could probably be found in this single screen capture.

supportedCodecs.png

These are the video types that are supported by browsers. Note that you can give a video tag in html5 multiple source videos and if it is unable to play one of them it will try the next.

HTML5 PIP is something we might be able to use right now but would require more research and testing to figure that out. What we can take from this example is that it is an exciting preview of what is to come. The playback should only get better over time and better supported.

MikeDevCorner.png

Michael Luongo is a software engineer who joined TechSmith in 1999 when the company was about 10 employees. Since joining he has worked on almost every product at TechSmith. He is currently working on the Camtasia Relay team. In his spare time Michael enjoys working on old cars which include a 62 Chevy Corvair, Manx dune buggy, and other vehicles. He also enjoys learning about new technologies. He recently finished a 3D first person shooter in Silverlight and is at work developing his first app for Android.

Comments (7)

Hello Michael and Betsy. Nice information and content here. The link to Dive into HTML5 is not working correctly when I click on it. It gives me a 410 Error.

Also, Michael a video tutorial on how you would make this work with Camtasia Studio 7 for PC would be great to see. Just my opinion and keep up the great work. I see HTML5 video player being a winner in my book. Lots of new things to learn.

Thanks,

Fred G.

Quote floater
Randall :

If you download the sample code, you should be able to replace the videos with your own videos.

One thing to be wary of is the video formats that you use. Like the graph shows, not all browsers support all formats. The videos in the demo are Ogg Theora files which Camtasia doesn't currently output.

Quote floater
Tron :

Works best in Chrome? Come now. This is the HTML5 generation. This type of works-best-in nonsense is from the Lost Decade...

Quote floater

Your demo doesn't work in Firefox because the elements' children don't include a type="video/ogg" attribute. Chrome (and Safari) do content sniffing in the absence of a mime type, whereas Firefox (and IE, and I suspect Opera) do not.

Quote floater
Jon Packer :

@Chris, Opera does do content sniffing, but it's best practice to add the type attribute anyway so the browser doesn't have to try and find it. A good write up on the video tag: http://dev.opera.com/articles/view/everything-you-need-to-know-about-html5-video-and-audio/

Quote floater

@Jon: The demo didn't work for me in Opera, so it appears Opera does not sniff at least in the case of a child source element without a type attribute.

Quote floater
prasanthk :

Hello,

i have a .mkv file with 2 video stream's in it.

While playback in html5 tag video , how do we select a specific stream ?




i have tried
src="1234.mkv#Strem 0"
src="1234.mkv#1"
but no luck....


Best Regards
Prasanth.k

Quote floater

Post a comment


Can't read image


Type the characters you see in the picture above.

Currently Reading:
“Dev Corner - HTML 5 Video Player with multiple video streams”

This page contains a single entry from The Visual Lounge posted on October 13, 2011 2:24 PM.


Previous entry:
UPDATED: Be Here! Join us LIVE on The Forge at 2pm EST Today! (Recording Available).

Next entry:
Time Saver Tuesday - Teleprompters.


All recent entries can be found on the main page or by looking through the archives.