Results 1 to 8 of 8

Thread: Custom MediaList provider: loaded but never used?

  1. #1
    Join Date
    Feb 2014
    Posts
    5

    Question Custom MediaList provider: loaded but never used?

    Howdy Richard, et al...

    I am confounded as to why my module is loading, but my MediaList provider is not being used. Maybe a fresh set of eyes will help (lookout, here comes a code dump!):


    package edu.nau.extended.wowza.AMLSTModules;
    
    import com.wowza.wms.medialist.*;
    import com.wowza.wms.module.*;
    import com.wowza.wms.stream.*;
    import com.wowza.wms.application.*;
    
    import edu.nau.extended.wowza.AMLSTModules.db.StreamingQueries;
    import edu.nau.extended.wowza.AMLSTModules.util.AMLSTRendition;
    
    import java.util.ArrayList;
    
    
    public class ModuleAMLSTVod extends ModuleBase {
    	class VodMediaListProvider implements IMediaListProvider
    	{
    		public MediaList resolveMediaList(IMediaListReader mediaListReader, IMediaStream stream, String streamName)
    		{
    			getLogger().info("Running VodMediaListProvider.resolveMediaList() with streamName \"" + streamName + "\""); // I never see this message!
    			MediaList mediaList = new MediaList();
    			MediaListSegment segment = GetMediaListSegment(streamName);
    			mediaList.addSegment(segment);
    			return mediaList;
    		}
    		
    		private MediaListSegment GetMediaListSegment(String streamName)
    		{
    			getLogger().info("Running VodMediaListProvider.GetMediaListSegment(" + streamName + ")"); // I never see this message!
    	        MediaListSegment segment = new MediaListSegment();
    	        ArrayList<AMLSTRendition> renditions = new StreamingQueries().GetVODStream(streamName);
    	        
    	        getLogger().info("Found" + renditions.size() + "streams!"); // I never see this message!
    	        for(AMLSTRendition r: renditions){
    	        	MediaListRendition rendition = new MediaListRendition();
    				rendition.setName(r.streamName);
    				rendition.setBitrateAudio(r.audioDataRate);
    				rendition.setBitrateVideo(r.videoDataRate);
    				rendition.setWidth(r.width);
    				rendition.setHeight(r.height);
    				rendition.setAudioCodecId("mp4a.40.2");
    				rendition.setVideoCodecId("avc1.66.12");
    				segment.addRendition(rendition);
    	        }
    	        return segment;
    		}
    	}
    	
    	
    	public void onAppStart(IApplicationInstance appInstance)
    	{
    		getLogger().info("Setting MediaListProvider to VodMediaListProvider."); // This message appears on the access log. At least the module seems to be loading...
    		appInstance.setMediaListProvider(new VodMediaListProvider());
    	}
    }
    ...and in the Application.xml, modules section:

    <Module> 
        <Name>ModuleAMLSTVod</Name>
        <Description>API Media List module to connect to EC Streaming Data</Description> 
        <Class>edu.nau.extended.wowza.AMLSTModules.ModuleAMLSTVod</Class> 
    </Module>

    Any ideas?

    EDIT: Oh yeah, this is WSE 4.0

    Thanks!
    Last edited by dylan_baxter; 02-17-2014 at 02:44 PM. Reason: Forgot some pertinent information, foo.

  2. #2

    Default

    Hi,

    How are you accessing the streams ?

    So it should be

    [nourl]http://[wowza-ip-address]:1935/live/amlst:myStream/playlist.m3u8[/nourl]

    So it picks up your AMLIST extension.

    Andrew.
    Last edited by andrew_k; 02-17-2014 at 04:51 PM.

  3. #3

    Default

    Hi Dylan.

    Look in [install-dir]/lib folder to confirm that the project .jar file is there.
    Also look in access log just above the app-start event for Module load error message.

    Salvadore

  4. #4

    Default

    It could be that the project .jar file might be in the /lib folder of an old Wowza install location.

    Salvadore

  5. #5
    Join Date
    Feb 2014
    Posts
    5

    Default

    Hey Andrew and Salvadore,
    My stream url looks like this: http://{server}:1935/vod/amlst:Insid...801_1of5_China, I am now suspecting the slash in the stream name is creating problems. What do you think?
    The (non-executable, right?) jar is located here: C:\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine 4.0.0\lib\AMLSTModules.jar
    And the access log lines where my module appears to load successfully (no errors):
    comment	server	INFO	200	-	Wowza Streaming Engine is started!
    comment	server	INFO	200	-	Setting MediaListProvider to VodMediaListProvider.
    app-start	application	INFO	200	amlst:InsideNau	vod/amlst:InsideNau
    Last edited by dylan_baxter; 02-18-2014 at 09:58 AM. Reason: My brackets broke the post

  6. #6
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Your Module is evidently loading, so that's good so far. I copied your module into Eclipse and tried to run it but there are missing libraries. I would step carefully through the code or add a ton of getLogger() statements, and refer to this basic example

    Richard

  7. #7
    Join Date
    Feb 2014
    Posts
    5

    Default

    Hey Richard,
    Thanks for having a look. While testing with simpler stream names and, as you said "a ton of getLogger() statements", I also found the cause to be a malfunctioning library (or a malfunctioning developer rather). For some reason the jtds driver I am using is not loading correctly. Maybe I'll go bug them now

    Thanks again, I'm sure I'll figure this out now.

    Dylan

  8. #8

    Default

    Hi,

    Try changing your link to this.

    http://{server}:1935/vod/_definst_/amlst:InsideNau/IN_0801_1of5_China
    note the _definst_ in the URL.

    As you are using HTTP then you need the _definst_ to define an application instance when using a reference one more folder down to the content.

    Andrew.

Similar Threads

  1. MediaList is empty
    By xyigovno in forum AddOn: Transcoder
    Replies: 4
    Last Post: 05-08-2014, 01:31 PM
  2. Get Least Loaded Server
    By mmiller8 in forum Video On Demand Streaming Discussion
    Replies: 2
    Last Post: 03-12-2014, 11:54 AM
  3. Transcoder: MediaList is empty.
    By aynajus in forum AddOn: Transcoder
    Replies: 7
    Last Post: 02-29-2012, 07:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •