October 19, 2011

Wowza released patch for 3.0.0 (patch3)

This morning I got a message from Wowza Team that they released critical patch for recently released server. I loaded and applied the patch and checked that my application works fine. I also took a look at revision history and see that actually this patch was not the first.

Current patch version is 3 but there are also patch2 and patch1 with a lot of issues fixed.
I didn't receive notifications about 1 and 2 patches so thanks to Wowza guys they informed us about major changes in the product. Patch3 includes all changes so just apply it to be updated.

October 12, 2011

WMSIPAuth plugin is now available

Greetings.

As you know Windows Media Services come with a great built-in functionality. However, some of the basic features are made not in a very convenient way. As example, IP-based authentication can be set up via GUI tool; it's not convenient to use on a large amount of IPs and it also works really slow in such case.

That's why we made a plugin that allows restricting access to WMS via a simple configuration file where all those rules are written down like this:

1.6.0.0/15
1.22.0.0/15
1.38.0.0/15
1.186.0.0/16
1.187.0.0/16

Current implementation works really fast even on dozens of thousands of IP ranges listed in a config.
Trial version of WMSIPAuth plug in is available for download. It's free or charge and it currently has a restriction of 5 IP ranges to be restricted.

However if you need more IP ranges capacity or have some extended functionality like allowing only certain IPs instead of restricting them, or even have geo-location based restriction, you can contact our teamto discuss terms and price of such solution.

October 10, 2011

Wowza 3.0.0 is available to download

Wowza Media System has recently announced Wowza Server 3.0.0, the next version of their award winning solution.

I've checked our product and our Maven template implemented for 2.2.4.
Everything works fine and you don't even have to replace Wowza jars in template lib since Wowza 2.2.4 and 3.0.0 look like being backward compatible (at least in case of our product).

Just don't forget to change Vm settings for debug.
On 2.2.4 use
-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:4300 -Xmx768M "-Dcom.wowza.wms.AppHome=C:/Program Files/Wowza Media Systems/Wowza Media Server 2.2.4" "-Dcom.wowza.wms.ConfigHome=C:/Program Files/Wowza Media Systems/Wowza Media Server 2.2.4" -Dcom.sun.management.jmxremote=true -Dfile.encoding=Cp1251 -classpath "C:\Program Files\Wowza Media Systems\Wowza Media Server 2.2.4\bin\wms-bootstrap.jar" com.wowza.wms.bootstrap.Bootstrap start
And on 3.0.0 use
-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:4300 -Xmx768M "-Dcom.wowza.wms.AppHome=C:/Program Files/Wowza Media Systems/Wowza Media Server 3.0.0" "-Dcom.wowza.wms.ConfigHome=C:/Program Files/Wowza Media Systems/Wowza Media Server 3.0.0" -Dcom.sun.management.jmxremote=true -Dfile.encoding=Cp1251 -classpath "C:\Program Files\Wowza Media Systems\Wowza Media Server 3.0.0\bin\wms-bootstrap.jar" com.wowza.wms.bootstrap.Bootstrap start


P.S. Please check Wowza patch 3 information before using 3.0.0 for production purposes.

P.P.S. Please also check other Wowza-related posts from our blog.

October 5, 2011

Maven template for Wowza

First of all let me explain why I decided to develop WMSPanel Wowza integration using Maven.
When I started my first steps with Wowza I downloaded Wowza IDE and easily made my first test project. All looked just fine but after some time I decided that Wowza IDE is not applicable in my case because of the following reasons.
  1. It does not support full development cycle. You can create Module or Listener but you cannot create and run Unit Tests, cannot add dependencies that will be copied with your jar before Wowza launch.
  2. After any change of any source file IDE tries to build jar and copy it. I want to have ability to implement some features and then build jar and copy it explicitly.
  3. There are a lot of libraries we cannot work in general. Apache langs and codacs, joda time library. Those who work with Java professionally knows what I'm talking about. Maven is just great when you need to add publically available libraries.
  4. You cannot control jar manifest produced by IDE. If you need your jar to have some additional attributes you should use Maven. Wowza IDE cannot help you here.
Wowza IDE produces regulair jar file with our compiled classes included so we use maven-jar-plugin for making jar library as well.

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.1</version>
                <configuration>
                    <finalName>${project.artifactId}</finalName>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>${libFolderName}/</classpathPrefix>
                        </manifest>
                        <manifestEntries>
                        </manifestEntries>
                        <addMavenDescriptor>false</addMavenDescriptor>
                    </archive>
                </configuration>
            </plugin>

Since your library most probably needs to have dependencies you should separate your dependencies from Wowza server libraries and third-party libraries. This is why we add classpath to our dependency folder into jar manifiest. In addition we ask not to include our pom.xml to resulting jar.

To build our jar file as wowza extention we need to have compile time dependency on Wowza libs.

Our test template depends on wms-server.jar and wms-stream-publish.jar. So we copy these libraries to project' lib folder from wowza/lib folder and add them to dependency section.

    <dependencies>
        <dependency>
            <groupId>com.wms</groupId>
            <artifactId>wms-server</artifactId>
            <version>${wms.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.wms</groupId>
            <artifactId>wms-stream-publish</artifactId>
            <version>${wms.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>1.6</version>
        </dependency>
    </dependencies>

As you can see I added joda runtime library dependency to the project. I don't use joda in code but just added this runtime dependency to show how dependency copy works with maven. You can see joda library in wowza\lib\dep-libs after mvn package


Since neither wms-server.jar nor wms-stream-publish.jar are Maven repository libraries we need to introduce them to Maven. Take a look at maven-install-plugin in pom.xml below. Before packing solution you should call mvn validate each time you add new dependency you need to install. During validate phase maven-install-plugin plugin adds all libraries it's configured with into local Maven repository.

To copy "runtime" library dependencies I use maven-dependency-plugin. It copies all runtime dependencies to target/deps-lib subfolder.

Before launching Wowza you need to copy resulting jar with all dependencied to wowza/lib directory.
I use maven-antrun-plugin for this purposes. When you call mvn package system builds jar and copies jar and it's dependencies to wowza/lib.

The last major case I missed to discuss is debugging. I checked how debugging works for Wowza IDE. It just calls JVM with following parameter(Wowza 2, 3.x)
-agentlib:jdwp=transport=dt_socket,address=127.0.0.1:3387,suspend=y,server=n -Xmx768M "-Dcom.wowza.wms.AppHome=C:/Program Files/Wowza Media Systems/Wowza Media Server 2.2.4" "-Dcom.wowza.wms.ConfigHome=C:/Program Files/Wowza Media Systems/Wowza Media Server 2.2.4" -Dcom.sun.management.jmxremote=true -Dfile.encoding=Cp1251 -classpath "C:\Program Files\Wowza Media Systems\Wowza Media Server 2.2.4\bin\wms-bootstrap.jar" com.wowza.wms.bootstrap.Bootstrap start

Or for new Wowza Engine(aka Wowza 4.0)
-agentlib:jdwp=transport=dt_socket,address=127.0.0. 1:3387,suspend=y,server=n -Xmx768M -Dcom.wowza.wms.AppHome=/usr/local/WowzaStreamingEngine -Dcom.wowza.wms.ConfigHome=/usr/local/WowzaStreamingEngine -Dcom.sun.management.jmxremote=true -Dcom.wowza.wms.native.base="linux" -classpath "/usr/local/WowzaStreamingEngine/bin/wms-bootstrap.jar" com.wowza.wms.bootstrap.Bootstrap start
 
So I just get parameters IDE uses and configured exec:java goal to use JVM parameters above. Open project using any IDE with Maven support and configure Maven goal exec:java and find where you can pass JVM parameters. Pass parameters above and use Debug mode to execute goal since Run mode will not work. If you need Run mode working you need to call Wowza IDE in Run mode and get parameters it uses to call java and then add new exec:java goal with params for Run. I just use Debug during development cycle and don't use Run.

Please note that my approach to Wowza is not yours and you most probably need to fix JVM params. In addition I use Windows and if this is not your case you should change all paths in JVM params appropriately.

Our Wowza Maven template is hosted on GitHub, you can download it there and try. I added Server listener from the following article http://www.wowza.com/forums/content.php?162-Server-side-publishing-using-the-Stream-class so follow installation instruction, such as config change, before you can start Wowza.


The approach described above is just little a example of our WMSPanel agent build system. We have comprehensive installer what fixes Wowza configs during installation, installs resulting Wowza library and its dependencies when client runs it on a production Wowza server. We provide consulting services for existing and new Wowza projects. So if you want to have comprehensive installer for Wowza, run unit test during package your project or use any IDE with Maven support, we can help you.

You may also check WMSPanel, a centralized Wowza reports and statistics web-based solution. It uses Wowza agent for gathering core streaming data and present it via a web server. Check out the feature list and try it free of charge.

Take a look also at Nimble Streamer, the light-weight HTTP streaming server for HLS, Smooth and progressive download streaming and re-streaming.