Wowza Community

VoD ABR with amlst

Hi, newbie here.

I followed the post to use the API to resolve SMIL requests ( https://www.wowza.com/docs/how-to-use-java-api-calls-to-resolve-smil-file-requests ) and have the module loaded and working.

But I’m unclear that the resulting m3u8 is correct.

The video archive we’ve converted (with Squeeze) makes an ABR m3u8 like this:

#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

A converted file yields a filesystem structure like this:

ASSEMBLY 04-06-14 #1
	ASSEMBLY 04-06-14 #1.m3u8
	stream-1-480000
		index.m3u8
		frag-1.ts
		frag-2.ts
		frag-3.ts
		frag-4.ts

The streaming engine module gives this:

http://192.168.0.211:1935/vod/amlst:sample/playlist.m3u8

#EXTM3U

#EXT-X-VERSION:3

#EXT-X-STREAM-INF:BANDWIDTH=544000,CODECS=“avc1.66.12,mp4a.40.2”,RESOLUTION=512x288

chunklist_w457918793_b544000.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=1054000,CODECS=“avc1.77.31,mp4a.40.2”,RESOLUTION=640x360

chunklist_w457918793_b1054000.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=1864000,CODECS=“avc1.77.31,mp4a.40.2”,RESOLUTION=852x480

chunklist_w457918793_b1864000.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=3064000,CODECS=“avc1.77.31,mp4a.40.2”,RESOLUTION=1280x720

chunklist_w457918793_b3064000.m3u8

I’m not really familiar with how chunklist works. Is this an encoding of the directory/index.m3u8 specifier? Am I on the right path to making this work?

thanks

George

Hi George.

I am not sure what or if you are having any problems at this time. If there is a particular problem, can you please specify what that is?

In the meantime, you may find this page informative:

https://tools.ietf.org/html/draft-pantos-http-live-streaming-13

Kind regards,

Salvadore

George, it looks like you are on the right track here. AMLST should work for this.

In the event a problem should arise please let us know and we can take it from there.

Kind regards,

Salvadore

Hi Salvadore,

I am wanting to do ABR streaming from a vod application.

Can you confirm that the way to do this is to use the amlst module to deliver the playlist data on demand, not from files on disk.

If using the amlst module that I created, how does the output describe where to locate the stream files segments in subdirectories?

If this is not the way to perform ABR vod delivery on a multi-bitrate archive, then please tell me how.

thanks

George

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());
	}
	
}

Just to close this thread. Wowza isn’t set up to deliver what many HLS encoders put out. AN ABR stream made with streamsegmenter, squeeze, etc won’t work. For a large body of material to push in, we opted to use the transcoding capability in our production setup. just streaming it in with ffmpeg over time as the system is launched.

Wowza is such a useful product once you get inside it. Thanks.

I have some trouble with VOD ABR with AMLST. I play video well but I cannot seek video as mp4 normally.

When i click server always return 404 chunk list.

What do i need to solve this problems?