https://www.wowza.com/docs/how-to-enable-geographic-locking-modulegeoiplock
I used your module as a base and wrote my own, which allows to limit content based on multiple country codes via “allow from all, deny from xxx” or vice versa “deny from all, allow from xxx” style rules.
Config file with the country code limitations can be reloaded on the fly (does not require restart of wowza server).
http://github.com/titpetric/wowza-geoip
There’s now also a commercial version available: https://scene-si.org/products/wowza/. It’s compatible with the latest Wowza versions (4.5.0+ at time of writing).
Best regards,
Tit Petric
I see a XML typo in locationinfo.xml. Double “>>” in Value tag
Change this
<Value>>c:/locationinfo.xml</Value>
To This:
<Value>c:/locationinfo.xml</Value>
Richard
I don’t know much about this 3rd party addon, but from what you report it is installed and working. I’m not sure what you want it to do and if it is working as you expect, but it is doing something.
Richard
You are trying to fallback to a file in a live application, which won’t work. The GeolocationPlaybackFile should be a live stream.
You could play labaca.flv as a live stream in a loop using the Stream class. Take a look at these examples:
https://www.wowza.com/docs/stream-class-example
https://www.wowza.com/docs/how-to-schedule-streaming-with-wowza-streaming-engine-streampublisher
Richard
Cool, thanks for the update.
Richard
No, it’s much too soon. The soonest you can get stream name server-side is by overriding play
https://www.wowza.com/docs/how-to-override-play-to-control-access
Or in IMediaStreamActionNotify3 onPlay
Richard
@Tit Petric
You have a small typo in the Application.xml snippets section of your git repo.
You need to look at adding the function
public void onHTTPCupertinoStreamingSessionCreate(HTTPStreamerSessionCupertino httpCupertinoStreamingSession)
{
//boolean isGood = true;
//String ipAddress = httpCupertinoStreamingSession.getIpAddress();
//String queryStr = httpCupertinoStreamingSession.getQueryStr();
//String referrer = httpCupertinoStreamingSession.getReferrer();
//String cookieStr = httpCupertinoStreamingSession.getCookieStr();
//String userAgent = httpCupertinoStreamingSession.getUserAgent();
}
into the code.
Shamrock
Hi,
works great for flash. Can someone provide an update so it would work with smooth streaming also? Thanks.
where is the jar files? We do not see on github.
Compatible with wowza 2.2.3 ?
Do you have files ready for use? … as “Example” in wowzamedia
I ask to send on my e-mail
Best Regards, Wowzek:(
Just a bit of news:
I added IP and Netmask support into the GeoIP module on github.
@willwh:
That’s not a typo, it’s valid xml. I commented out an optional part of the config - the optional location to the GeoIP database, if you have it in another location.
@wowzek:
I will make the jar file available on github shortly. You can download it from there and set it up manually. If you use a Wowza Media Server version different than 2.1.0, your mileage may vary, and should try to build the module yourself.
Best Regards,
Tit Petric
And some more news:
-
Updated to WowzaMediaServer 2.1.2 (module available for download on github)
-
Added functionality to remap geo-blocked streams to a default file stream (config based). This way you can play an informative clip to the user, explaining why he cannot access geo blocked content.
As far as internals go, I now override the play() method, instead of using stream listeners. Comments and suggestions are appreciated.
Contact me at tit.petric@monotek.net if you have any feature requests (like smooth streaming here :)). Cuppertino streams are supported in a branch on github (not merged into master yet), but smoothsteaming check is not yet implemented. I’ll try to look at it during the next few weeks!
I’m glad people use the module without major problems (mostly configuration issues ;)). Thanks for your support.
New version is released, 1.0.2, also available as a precompiled .jar file for WMS 2.2.4
Get it at https://github.com/titpetric/wowza-geoip
Added features:
-
Smoothstreaming support
-
San Jose HTTP streaming support
-
RTSP support (UNTESTED!)
-
CupertinoStreaming support (previously available only in hampei’s branch, thanks to marzipi above for the patch).
Let me know how it works for you, and If there are any problems. Any log4j/debug logs containing “geoip.rtp” are appreciated, to debug it in case of problems.
Note: The redirect feature only works on normal RTMP streams for now, I will be looking into supporting it for other streaming types in the future.
Best regards,
Tit Petric
Hi,
since i have a large number of files that i have to block and i don’t want wowza to parse a large xml, i was wondering is there an option to have a single xml file for each video located in same dir as video?
Thank you in advance for your help.
jonny
The geoip xml file only gets parsed once or on every modification. There really is no reason to worry about this, unless you modify this file often. It is cached when it’s loaded. How big is the file? I wouldn’t worry for anything below 1 megabyte anyway.
Edit: There’s not a commercial GeoIP plugin available.
You can review the documentation here: https://scene-si.org/docs/geoip-plugin/
The plugin is available for purchase here: https://scene-si.org/products/wowza/
Best,
Tit
Hi,
I think it must be easy but I am confused. Maybe its because my English skills are not the best.
Okay, my setup should “allow all countries” and “deny DE” for example for a vod application:
App.xml:
<Property>
<Name>GeolocationDefaultRestrict</Name>
<Value>0</Value>
<Type>Integer</Type>
</Property>
<Property>
<Name>GeolocationConfigFile</Name>
<Value>c:/locationinfo.xml</Value>
<Type>String</Type>
</Property>
<Property>
<Name>GeolocationPlaybackShutdown</Name>
<Value>True</Value>
<Type>Boolean</Type>
</Property>
<Property>
<Name>GeoIPDatabase</Name>
<Value>c:/GeoIP.dat</Value>
<Type>String</Type>
</Property>
<Property>
<Name>GeolocationDebug</Name>
<Value>true</Value>
<Type>Boolean</Type>
</Property>
my locationinfo.xml:
<?xml version="1.0" encoding="utf-8"?>
<LocationInfo>
<Locatfion path="vod/" restrict="none">
<Except type="country">DE</Except>
</Location>
</LocationInfo>
But this setup will play my file.
I am running WOWZA on a Win2008 by the way… Are the paths correct?
Regards,
Daniel
Hi,
after Tit helps me to unknot my brain I must say, I mistake accept with except and that was my problem.
Here the solution if someone had the same:
Just use
[HTML]
US
[/HTML] if you want to restrict playback in only one country (in this case, every country except US will play your stream).
If you want to limit it to just US (and no other country will play your stream), change the restrict="" argument in to “all”.
And thats all…
Hi,
goto https://github.com/titpetric/wowza-geoip and klick on the download button
It is compatible with with 2.2.3 - I use it and it works perfekt!
Regards,
Daniel