Welcome new web cam players…

We’re rolling out our new web cam video players (less flash, more iOS and HTML5 support!) to our clients.  The first official release was for the Taos Ski Valley web site, which you can see and use here: http://skitaos.org/webcams

BRI JWPlayer

So what’s the geek back-story on these video players? Read on…

We’ve taken the new JWPlayer 6 (which has a great API) and developed an AJAX web cam controller which is attached to the bottom of the player…

AJAX web cam controller

This AJAX controller polls our Wowza Server software to see how many people are watching the video, polls the JWPlayer to see if the video is being played or not, polls a Linux server to see how many people want control of the camera (a MySQL database tracks who’s in control, who wants control, how much time they have to wait, and which pre-set views each camera has available), and finally sends the camera control commands back to the Linux server where a PHP script redirects these commands back to the actual web cam.

The biggest challenge to all of this (besides getting the AJAX controller to work with Internet Explorer! Arrrgh!) was that the Sony SNCRZ25 all-weather web cams that many of our Ski Area clients use don’t produce video in a format that is compatible with iOS devices.  Our solution was to use the latest version of ffmpeg to grab the video via http from the cameras, convert it from MPEG4-part 2 to rtmp, and then send the video to our Wowza server to be re-broadcast for the JWPlayers to pick up.  Initially getting this ffmpeg to Wowza video conversion wasn’t too difficult, but it was CPU intensive and slow.  Getting this process to quickly and efficiently happen was extremely time consuming as both ffmpeg and Wowza have a massive amount of settings that needed to be tweaked – mostly through trial and error  – in order to make it all work fast and without taking down big servers.

All that just to get be able to watch a web camera move and play on iPads and iPhones!

But its all working swimmingly now and I’m very happy with the results.

If you are a developer that need ffmpeg settings or tips on how to get this done themselves, feel free to leave your questions in the comments below and I’ll get you pointed in the right direction (and might even supply you with some code.)

Loading Video Player…

3 thoughts on “Welcome new web cam players…

  1. Well done! Also, can’t wait to see the new data center.

  2. Jonathan!

    Oh man do I appreciate your work EVEN MORE while I was building this out. This stuff is tricky and takes a frikkin’ LONG time to get done.

    And I still can’t figure out how you made your xuggler/ffmpeg conversion run so fast!

    I owe you.

    ~ Oban

  3. This is awesome! I use JW6 and Wowza and would love to be able to implement this on my website. Any way I could get some help?

Leave a Reply

Your email address will not be published. Required fields are marked *