Getting list of all videos from streams folder of Wowza Media Server using JSP/JAVA

Hi,

Currently i am using one player which is playing videos over the Wowza server, but i need to give explicitly the name of the file to be played. The name and path of file is set from the JSP file where i have embedded the player.

Now,I want to get the list of all videos in streams/content folder of Wowza Media Server using JSP/JAVA where i can select which video to play from the given list.

I suggest you download and install the Wowza IDE (https://www.wowza.com/ide.html). Follow the tutorial in the included User’s Guide. It will walk you through the process of creating your first custom module.

With this knowledge you should be able to create your first custom server side module. To get a list of file in a folder take a look at the java.io.File class. The list() will return a list of files in a folder.

I hope this helps. I realize there is a lot to learn.

Charlie

There are several ways to do this.

  • You can create an HTTPProvider that returns this information over the Wowza Pro HTTP interface. You can then call this interface from Java/JSP. Take a look at the IHTTPProvider interface in the Wowza Pro Javadocs.

  • You can add a SOAP/Webservices interface to Wowza Pro to return the information. See this forum thread:

    https://www.wowza.com/forums/showthread.php?t=682

  • You can embed the Java/JSP servlet container into the Wowza Pro VM. You can use the IServerNotify interface (ServerListeners) to start a servlet engine such as Tomcat or Winstone. It would be running in the same Java VM as Wowza Pro. You could also use this same technique to add an Axis SOAP interface to Wowza Pro.

  • You can add a Socket interface to Wowza Pro for send this information to Java/JSP using a proprietary protocol.

    I am sure there are many more ways to get it done. I hope this helps.

    Charlie

There are lots of options. Probably the easiest way is to create an HTTPProvider. You can them make a request from your Java JSP to Wowza Pro over http to tell Wowza Pro about the new file. Take a look at the IHTTPProvider class.

Charlie

I think this is from server-side you are telling about, I want to get list of videos from client-side. Is there any way to get this…

I have tried the example given and getting result fine :slight_smile:

But in my case client is not Flash it is a JSP/JAVA. So can i convert following code to JSP/JAVA


var nc:NetConnection;

// create a connection to the wowza media server

nc = new NetConnection();

// trace status information

nc.onStatus = function(infoObj)

{

// when we connect to the server…

if (infoObj.code == “NetConnection.Connect.Success”)

{

// create a result object

var doSomethingResult:Object = new Object();

doSomethingResult.onResult = function(returnStr:String)

{

trace("getListOfAvailableFLVs: "+returnStr);

callResult.text = “getListOfAvailableFLVs:”+returnStr;

}

// call our server side function

nc.call(“getListOfAvailableFLVs”, doSomethingResult, “test param1”);

}

}

// connect

nc.connect(“rtmp://ps0673/mymodules”);


Hello,

I have a Java servlet running on Tomcat that performs a file upload and I want to send a message to Wowza users with the uploaded file path.

Could you provide me an example of how to do this using IServerNotify interface?

How the upload application should be accessed from? Now Im using http://192.168.1.1:8080/UploadServlet

Thanks

Diego