Getting the user's GEO Location with Wowza Media Server
I was reminded of this topic while reading a few items in the forums on Wowza’s site and thought I would finally get an article out about it.
A while ago we were commissioned for a project to build a video content management system. Within this system there was the request to show log results of how many times videos were played, how much bandwidth was used in a day, month etc and also where the viewer is located on the planet.
Anyways, a bunch of research ensued and we came across the best alternative so far which is from MaxMind. They offer a free and paid for version of a database that has geolocation lookup tables. Here’s one for countries and one for cities.
You now have just about all the tools you need to start figuring out and possibly logging where your users are coming from if you are using Wowza. If you have the Wowza IDE installed then it’s a simple as pie to import the java classes into your project and start taking advantage of them.
From here it’s easy. Read the docs a bit to understand what you have downloaded and then go ahead and create a LookupService, pointing to the location of where your database is at (the .dat file you download from MaxMind). Pass in the users’s ip, which you can get from the client properties clientObj.getIp() and voila! you should now have the location of the user by country, city latitude, longitude and so on. It’s that simple to do!
I encourage you to try it out, being that it’s all contained within Java, you only have to extend your main module out to load in the required classes and instantiate the LookupService and grab the result. Simple.
With all of that, there are 3rd party developers that are happy to share code and a couple of them have gone ahead and put together a module that you can try out
So good luck with it!
Posted by: Graeme Bull on Sep 05, 2011
Share This Article
STi Video Recorder for Wowza Media Server HD Edition v3
This is our latest version of our Video/Audio recording application that runs right in the browser through the Flash Player. You have the option to choose to record between three different sizes, review your recording and even save it if you want in a list to view later. It's like a mini video content management system of all your recorded videos. Once recorded the application provides a simple way to link to the page where the bonus video player (included in the package if you want to use it) where the video can be played back. There is also an option to embed the player in a web page or blog.