Salvadore,
Please can you help me work out how to get Wowza playing an ABR stream of ts segment with vod.
I have been successful getting ABR working with the bigbuckbunny vod and live myStream tutorials displaying in jwplayer6 pro. These demo media files are single mp4 files, not folders of multibitrate .ts files.
An example multibitrate stream exists in my content folder as a folder of folders in the following structure.
testabr/
testabr.m3u8
stream-1-480000/
index.m3u8
frag-1.ts
frag-2.ts
frag-3.ts
frag-4.ts
...
stream-2-990000/
index.m3u8
frag-1.ts
frag-2.ts
frag-3.ts
frag-4.ts
...
My First Question: How do I reference the ABR file testabr.m3u8 file in a subfolder, where the .ts files are in subfolders?
http://192.168.0.214/vod/_definst_/mp4:testabr/testabr.m3u8
http://192.168.0.214/vod/_definst_/mp4:testabr/stream-1-480000/index.m3u8
Using curl with these URLs yields nothing and returned an error on the server:
MediaReaderH264.open[vod/_definst_]: Not found: C:/Program Files (x86)/Wowza Media Systems/Wowza Streaming Engine 4.1.1/content/testabr.: java.io.FileNotFoundException: C:\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine 4.1.1\content\testabr (Access is denied)|at java.io.RandomAccessFile.open(Native Method)|at java.io.RandomAccessFile.(Unknown Source)|at com.wowza.io.WowzaRandomAccessFile.(WowzaRandomAccessFile.java:12)|at com.wowza.io.DirectRandomAccessReader.open(DirectRandomAccessReader.java:222)|at com.wowza.wms.mediareader.h264.MediaReaderH264.open(MediaReaderH264.java:250)|
For your info I include testabr.m3u8
EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=544000
stream-1-480000/index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1054000
stream-2-990000/index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1864000
stream-3-1800000/index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=3064000
stream-4-3000000/index.m3u8
My Second Question: In an attempt to generate the correct SMIL file that references the ABR files in subdirectories I followed the instructions to use the java API to make a modified amlst module. Can Wowza deliver ABR from folders of .ts segment files?
By using curling this URL
http://192.168.0.214/vod/amlst:testabr/jwplayer.smil
I get the following result:
<smil>
<head>
<meta base="rtmp://192.168.0.214/vod/_definst_" />
</head>
<body>
<switch>
<video src="testabr/stream-1-480000/index.m3u8" system-bitrate="544000" width="512" height="288"/>
<video src="testabr/stream-2-990000/index.m3u8" system-bitrate="1054000" width="640" height="360"/>
<video src="testabr/stream-3-180000/index.m3u8" system-bitrate="1864000" width="852" height="480"/>
<video src="testabr/stream-4-3000000/index.m3u8" system-bitrate="3064000" width="1280" height="720"/>
</switch>
</body>
</smil>
And using this URL in jwplayer does not play anything.
So I hope I’ve given you enough information about what I’m trying to do, and what I have tried based on reading the docs and following the tutorials.
thanks very much,
George
package au.com.videola.wms.module;
import com.wowza.wms.medialist.*;
import com.wowza.wms.module.*;
import com.wowza.wms.stream.*;
import com.wowza.wms.application.*;
public class ABRModule 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(streamName+"/stream-1-480000/index.m3u8");
rendition1.setBitrateAudio(64000);
rendition1.setBitrateVideo(480000);
rendition1.setWidth(512);
rendition1.setHeight(288);
rendition1.setAudioCodecId("mp4a.40.2");
rendition1.setVideoCodecId("avc1.66.12");
MediaListRendition rendition2 = new MediaListRendition();
segment.addRendition(rendition2);
rendition2.setName(streamName+"/stream-2-990000/index.m3u8");
rendition2.setBitrateAudio(64000);
rendition2.setBitrateVideo(990000);
rendition2.setWidth(640);
rendition2.setHeight(360);
rendition2.setAudioCodecId("mp4a.40.2");
rendition2.setVideoCodecId("avc1.77.31");
MediaListRendition rendition3 = new MediaListRendition();
segment.addRendition(rendition3);
rendition3.setName(streamName+"/stream-3-180000/index.m3u8");
rendition3.setBitrateAudio(64000);
rendition3.setBitrateVideo(1800000);
rendition3.setWidth(852);
rendition3.setHeight(480);
rendition3.setAudioCodecId("mp4a.40.2");
rendition3.setVideoCodecId("avc1.77.31");
MediaListRendition rendition4 = new MediaListRendition();
segment.addRendition(rendition4);
rendition4.setName(streamName+"/stream-4-3000000/index.m3u8");
rendition4.setBitrateAudio(64000);
rendition4.setBitrateVideo(3000000);
rendition4.setWidth(1280);
rendition4.setHeight(720);
rendition4.setAudioCodecId("mp4a.40.2");
rendition4.setVideoCodecId("avc1.77.31");
return mediaList;
}
}
public void onAppStart(IApplicationInstance appInstance)
{
appInstance.setMediaListProvider(new MyMediaListProvider());
}
}