# VoD ABR with amlst

**URL:** https://community.wowza.com/t/vod-abr-with-amlst/43684
**Category:** Wowza Streaming Engine
**Created:** [January 28, 2015, 6:59pm UTC](https://community.wowza.com/t/vod-abr-with-amlst/43684 "2015-01-28T18:59:00Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![George\_Bray](https://avatars.discourse-cdn.com/v4/letter/g/a6a055/32.png) [@George\_Bray](https://community.wowza.com/u/George_Bray)
#### Post date: [January 28, 2015, 6:59pm UTC](https://community.wowza.com/t/vod-abr-with-amlst/43684/1 "2015-01-28T18:59:00Z")

</div>

Hi, newbie here.

I followed the post to use the API to resolve SMIL requests ( [Resolve SMIL file 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:
> 
> ```auto
> 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](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

---

<div class="post-metadata">

### Author: ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)
#### Post date: [January 28, 2015, 8:30am UTC](https://community.wowza.com/t/vod-abr-with-amlst/43684/2 "2015-01-28T08:30:12Z")

</div>

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](https://tools.ietf.org/html/draft-pantos-http-live-streaming-13)

Kind regards,

Salvadore

---

<div class="post-metadata">

### Author: ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)
#### Post date: [January 28, 2015, 1:41pm UTC](https://community.wowza.com/t/vod-abr-with-amlst/43684/3 "2015-01-28T13:41:21Z")

</div>

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

---

<div class="post-metadata">

### Author: ![George\_Bray](https://avatars.discourse-cdn.com/v4/letter/g/a6a055/32.png) [@George\_Bray](https://community.wowza.com/u/George_Bray)
#### Post date: [January 28, 2015, 11:19pm UTC](https://community.wowza.com/t/vod-abr-with-amlst/43684/4 "2015-01-28T23:19:02Z")

</div>

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

---

<div class="post-metadata">

### Author: ![George\_Bray](https://avatars.discourse-cdn.com/v4/letter/g/a6a055/32.png) [@George\_Bray](https://community.wowza.com/u/George_Bray)
#### Post date: [February 18, 2015, 6:42pm UTC](https://community.wowza.com/t/vod-abr-with-amlst/43684/5 "2015-02-18T18:42:55Z")

</div>

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.

```auto
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?**

 

**```auto
http://192.168.0.214/vod/_definst_/mp4:testabr/testabr.m3u8**

**```**

  

**```auto
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:**

 

**```auto
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**

 

**```auto
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**

 

**```auto
http://192.168.0.214/vod/amlst:testabr/jwplayer.smil**

**```**

 

**I get the following result:**

 

**```auto
<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**

 

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

**```**

---

<div class="post-metadata">

### Author: ![George\_Bray](https://avatars.discourse-cdn.com/v4/letter/g/a6a055/32.png) [@George\_Bray](https://community.wowza.com/u/George_Bray)
#### Post date: [March 12, 2015, 3:12pm UTC](https://community.wowza.com/t/vod-abr-with-amlst/43684/6 "2015-03-12T15:12:08Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![le\_thanh\_lam](https://avatars.discourse-cdn.com/v4/letter/l/57b2e6/32.png) [@le\_thanh\_lam](https://community.wowza.com/u/le_thanh_lam)
#### Post date: [January 9, 2020, 9:42am UTC](https://community.wowza.com/t/vod-abr-with-amlst/43684/7 "2020-01-09T09:42:37Z")

</div>

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?
