Dynamic SMIL not working

Hello,

I am trying to generate smil file dynamically , but somehow it not works for me.

I am creating one j2ee web project.

Below is my code :

HTML code

=========

Java code

========

package com.jagir.wowza.smil;

import com.wowza.wms.application.IApplicationInstance;

import com.wowza.wms.medialist.MediaList;

import com.wowza.wms.medialist.MediaListRendition;

import com.wowza.wms.medialist.MediaListSegment;

import com.wowza.wms.module.ModuleBase;

import com.wowza.wms.stream.IMediaListProvider;

import com.wowza.wms.stream.IMediaListReader;

import com.wowza.wms.stream.IMediaStream;

public class ModuleAMLSTTest extends ModuleBase

{

class MyMediaListProvider implements IMediaListProvider

{

public MediaList resolveMediaList(IMediaListReader mediaListReader, IMediaStream stream, String streamName)

{

MediaList mediaList = new MediaList();

MediaListSegment segment = new MediaListSegment();

mediaList.addSegment(segment);

MediaListRendition rendition1 = new MediaListRendition();

segment.addRendition(rendition1);

rendition1.setName(“mp4:”+streamName+"_450.mp4");

rendition1.setBitrateAudio(44100);

rendition1.setBitrateVideo(45000);

rendition1.setWidth(424);

rendition1.setHeight(240);

rendition1.setAudioCodecId(“mp4a.40.2”);

rendition1.setVideoCodecId(“avc1.66.12”);

MediaListRendition rendition2 = new MediaListRendition();

segment.addRendition(rendition2);

rendition2.setName(“mp4:”+streamName+"_750.mp4");

rendition2.setBitrateAudio(44100);

rendition2.setBitrateVideo(750000);

rendition2.setWidth(640);

rendition2.setHeight(480);

rendition2.setAudioCodecId(“mp4a.40.2”);

rendition2.setVideoCodecId(“avc1.77.31”);

MediaListRendition rendition3 = new MediaListRendition();

segment.addRendition(rendition3);

rendition3.setName(“mp4:”+streamName+"_1100.mp4");

rendition3.setBitrateAudio(44100);

rendition3.setBitrateVideo(1100000);

rendition3.setWidth(1272);

rendition3.setHeight(720);

rendition3.setAudioCodecId(“mp4a.40.2”);

rendition3.setVideoCodecId(“avc1.77.31”);

MediaListRendition rendition4 = new MediaListRendition();

segment.addRendition(rendition4);

rendition4.setName(“mp4:”+streamName+"_1500.mp4");

rendition4.setBitrateAudio(44100);

rendition4.setBitrateVideo(1100000);

rendition4.setWidth(1272);

rendition4.setHeight(720);

rendition4.setAudioCodecId(“mp4a.40.2”);

rendition4.setVideoCodecId(“avc1.77.31”);

System.out.println("::::::::::::::::::::::"+streamName);

return mediaList;

}

}

public void onAppStart(IApplicationInstance appInstance)

{

appInstance.setMediaListProvider(new MyMediaListProvider());

}

}

bigbuckbunny_450.mp4

bigbuckbunny_750.mp4

bigbuckbunny_1100.mp4

bigbuckbunny_1500.mp4

files are stored in content folder.

I have also added

ModuleAMLSTTest

ModuleAMLSTTest

com.jagir.wowza.smil.ModuleAMLSTTest

to

C:\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine 4.5.0\conf\vod\Application.xml

Are you seeing any indication of the problem in the error logs? Can you start Wowza in stand-alone mode and view the log output in the console?

Regards,

Salvadore

Are you using the Wowza IDE to compile this module?

If so, please confirm that the jar for this module has been compiled to the [install-dir]/lib folder in your Wowza installation folder.

If not, you need to be using the Wowza IDE:

How to extend Wowza Streaming Engine using the Wowza IDE

Regards,

Salvadore

Thats great news! Thanks for the update and glad you got this working.

Regards,

Salvadore

wowzastreamingengine_error.log

================================

WARN server comment 2016-08-09 20:34:56 - - - - - 16846.869 - - - - - - - - loadModFunctions[vod/definst]: Module class not found or could not be loaded. Check [install-dir]/conf/vod/Application.xml to be sure all Modules/Module/Class paths are correct: name:ModuleAMLSTTest class:com.jagir.wowza.smil.ModuleAMLSTTest

WARN server comment 2016-08-09 20:34:56 - - - - - 0.024 - - - - - - - - HTTPStreamerCupertinoIndexPlaylist.indexFile[vod/definst/amlst:bigbuckbunny]: MediaList is empty.

wowzastreamengine_access.log

======================================

2016-08-09 20:34:56 IST comment server WARN 200 - loadModFunctions[vod/definst]: Module class not found or could not be loaded. Check [install-dir]/conf/vod/Application.xml to be sure all Modules/Module/Class paths are correct: name:ModuleAMLSTTest class:com.jagir.wowza.smil.ModuleAMLSTTest - - - 16846.869 - - - - - - - - - - - - - - - - - - - - - - - - -

2016-08-09 20:34:56 IST comment server INFO 200 - MediaCasterStreamValidator.init[vod/definst]: Started - - - 16846.877 - - - - - - - - - - - - - - - - - - - - - - - - -

2016-08-09 20:34:56 IST comment server INFO 200 - ModuleCoreSecurity.onAppStart[vod/definst]: Publish: AllowedEncoders: securityPublishValidEncoders:Wirecast/|FME/|FMLE/|Wowza GoCoder*|Lavf/|UA Teradek/|KulaByte/|VidBlaster/|XSplit/|PESA - - - 16846.885 - - - - - - - - - - - - - - - - - - - - - - - - -

2016-08-09 20:34:56 IST comment server INFO 200 - ModuleCoreSecurity.onAppStart[vod/definst]: Publish: block duplicate stream names : false - - - 16846.885 - - - - - - - - - - - - - - - - - - - - - - - - -

2016-08-09 20:34:56 IST comment server INFO 200 - ModuleCoreSecurity.onAppStart[vod/definst]: Play: SecureConnection: securityPlayRequireSecureConnection:false - - - 16846.885 - - - - - - - - - - - - - - - - - - - - - - - - -

2016-08-09 20:34:56 IST comment server INFO 200 - ModuleCoreSecurity.onAppStart[vod/definst]: Play: securitySecureTokenVersion property is missing, using SecureToken Version 1, play security enabled for RTMP only - - - 16846.885 - - - - - - - - - - - - - - - - - - - - - - - - -

2016-08-09 20:34:56 IST app-start application INFO 200 definst vod/definst - - - 16846.887 - - - - - - - - - - - - - - - - - - - - - - - - -

2016-08-09 20:34:56 IST connect cupertino INFO 200 1916550908 - defaultVHost vod definst 0.023 192.168.7.10 1935 http://192.168.7.10:1935/vod/amlst:bigbuckbunny/playlist.m3u8 192.168.7.10 http (cupertino) http://localhost:9006/multibitrate/dynamic Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 1916550908 0 0 - 0 - - bigbuckbunny - - - - - http://192.168.7.10:1935/vod/amlst:bigbuckbunny/playlist.m3u8 http://192.168.7.10:1935/vod/amlst:bigbuckbunny/playlist.m3u8 - http://192.168.7.10:1935/vod/amlst:bigbuckbunny/playlist.m3u8 -

2016-08-09 20:34:56 IST create stream INFO 200 bigbuckbunny - defaultVHost vod definst 0.001 192.168.7.10 1935 http://192.168.7.10:1935/vod/amlst:bigbuckbunny/playlist.m3u8 192.168.7.10 http (cupertino) http://localhost:9006/multibitrate/dynamic Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 1916550908 0 0 1 0 0 0 bigbuckbunny - - - - - http://192.168.7.10:1935/vod/amlst:bigbuckbunny/playlist.m3u8 http://192.168.7.10:1935/vod/amlst:bigbuckbunny/playlist.m3u8 - http://192.168.7.10:1935/vod/amlst:bigbuckbunny/playlist.m3u8 -

2016-08-09 20:34:56 IST comment server WARN 200 - HTTPStreamerCupertinoIndexPlaylist.indexFile[vod/definst/amlst:bigbuckbunny]: MediaList is empty. - - - 0.024 - - - - - - - - - - - - - - - - - - - - - - - - -

2016-08-09 20:35:30 IST destroy stream INFO 200 bigbuckbunny - defaultVHost vod definst 34.043 192.168.7.10 1935 http://192.168.7.10:1935/vod/amlst:bigbuckbunny/playlist.m3u8 192.168.7.10 http (cupertino) http://localhost:9006/multibitrate/dynamic Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 1916550908 0 531 1 0 0 0 bigbuckbunny - - - - - http://192.168.7.10:1935/vod/amlst:bigbuckbunny/playlist.m3u8 http://192.168.7.10:1935/vod/amlst:bigbuckbunny/playlist.m3u8 - http://192.168.7.10:1935/vod/amlst:bigbuckbunny/playlist.m3u8 -

2016-08-09 20:35:30 IST disconnect cupertino INFO 200 1916550908 - defaultVHost vod definst 34.067 192.168.7.10 1935 http://192.168.7.10:1935/vod/amlst:bigbuckbunny/playlist.m3u8 192.168.7.10 http (cupertino) http://localhost:9006/multibitrate/dynamic Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 1916550908 0 531 - 0 - - bigbuckbunny - - - - - http://192.168.7.10:1935/vod/amlst:bigbuckbunny/playlist.m3u8 http://192.168.7.10:1935/vod/amlst:bigbuckbunny/playlist.m3u8 - http://192.168.7.10:1935/vod/amlst:bigbuckbunny/playlist.m3u8 -

I have check path : My ModuleAMLSTTest is located under com.jagir.wowza.smil package

Thanks Salvdore.

After copy jar file to [install-dir]/lib folder , it’s working fine as expected.

Regards,

Jagir