# API to handle SMIL file requests - audio only streams

**URL:** <https://community.wowza.com/t/api-to-handle-smil-file-requests-audio-only-streams/44714>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [February 9, 2015, 4:42pm UTC](https://community.wowza.com/t/api-to-handle-smil-file-requests-audio-only-streams/44714 "2015-02-09T16:42:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nick\_Sherman](https://avatars.discourse-cdn.com/v4/letter/n/958977/32.png) [@Nick\_Sherman](https://community.wowza.com/u/Nick_Sherman)\
**Post date:** [February 9, 2015, 4:42pm UTC](https://community.wowza.com/t/api-to-handle-smil-file-requests-audio-only-streams/44714/1 "2015-02-09T16:42:10Z")

</div>

Hi,

I used this documentation page as a reference for what I’m trying to do: [https://www.wowza.com/docs/how-to-use-java-api-calls-to-resolve-smil-file-requests](https://www.wowza.com/docs/how-to-use-java-api-calls-to-resolve-smil-file-requests)

So far I have had good luck with it, except for audio only streams. I have a live HLS stream using the transcoder. The video streams work fine, but for some reason it seems the manifest is malformed with the location to the audio only stream.

Here’s how I am generating the audio only stream MediaListRendition:

```auto
MediaListRendition audioRendition = new MediaListRendition();
audioRendition.setType(IVHost.CONTENTTYPE_AUDIO);
audioRendition.setName("2d13640584794b38bda36582a4c49192_a");
audioRendition.setBitrateAudio(64000);
segment.addRendition(audioRendition);

```

When I generate the SMIL file using mediaList.toSMILString(), the audio portion looks fine:

However, when I request the manifest file from Wowza, the chunklist file for the audio only stream is off:

#EXTM3U

#EXT-X-VERSION:3

#EXT-X-STREAM-INF:BANDWIDTH=150000

chunklist\_b150000.m3u8?wowzacaptionfile=2d13640584794b38bda36582a4c49192\_150

#EXT-X-STREAM-INF:BANDWIDTH=64000

**chunklist\_b64000\_ao.m3u8**?wowzacaptionfile=2d13640584794b38bda36582a4c49192\_150

#EXT-X-STREAM-INF:BANDWIDTH=268000

chunklist\_b268000.m3u8?wowzacaptionfile=2d13640584794b38bda36582a4c49192\_150

#EXT-X-STREAM-INF:BANDWIDTH=668000

chunklist\_b668000.m3u8?wowzacaptionfile=2d13640584794b38bda36582a4c49192\_150

#EXT-X-STREAM-INF:BANDWIDTH=1000000

chunklist\_b1000000.m3u8?wowzacaptionfile=2d13640584794b38bda36582a4c49192\_150

#EXT-X-STREAM-INF:BANDWIDTH=1800000

chunklist\_b1800000.m3u8?wowzacaptionfile=2d13640584794b38bda36582a4c49192\_150

If I make a request for that chunklist, I get a 404. If I make a request for the correct chunklist (chunklist\_b64000\_a.m3u8) I get the correct response.

Here is the log message for the bad request for chunklist\_b64000\_ao.m3u8:

```auto
HTTPStreamerAdapterCupertinoStreamer.onPlaylist: Stream not found [rlitiu/amlst:2d13640584794b38bda36582a4c49192/chunklist_b64000_ao.m3u8]: 2d13640584794b38bda36582a4c49192_a

```

Is this something that Wowza is doing intentionally? Is there any way to make the manifest list chunklist\_b64000\_a.m3u8 instead?

Thanks,

Nick

---

<div class="post-metadata">

**Author:** ![Matt\_Young](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/matt_young/32/389_2.png) [@Matt\_Young](https://community.wowza.com/u/Matt_Young)\
**Post date:** [March 2, 2015, 9:47am UTC](https://community.wowza.com/t/api-to-handle-smil-file-requests-audio-only-streams/44714/2 "2015-03-02T09:47:41Z")

</div>

Hello Nick

Please refer to ticket #117990 for further review.

Thanks,

Matt

---

<div class="post-metadata">

**Author:** ![David\_Hilliger](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@David\_Hilliger](https://community.wowza.com/u/David_Hilliger)\
**Post date:** [May 12, 2015, 9:30pm UTC](https://community.wowza.com/t/api-to-handle-smil-file-requests-audio-only-streams/44714/3 "2015-05-12T21:30:53Z")

</div>

Hi,

I also have a similar problem with SMIL files and audio only streams. I am using transcoder to generate 4 bit-rates of video and one stream of audio. These all play fine with a client pulling from the transcoder host using ngrp: syntax.

I have a second wowza retrieving the 5 streams (4 video, 1 audio) using .stream files. On this wowza host I have created s SMIL file, with 5 streams included.

When I request the SMIL file I get this:

#EXTM3U

#EXT-X-VERSION:3

#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1764000,RESOLUTION=896x504

chunklist\_b1764000.m3u8

#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1314000,RESOLUTION=768x432

chunklist\_b1314000.m3u8

#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=614000,RESOLUTION=512x288

chunklist\_b614000.m3u8

#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=374000,RESOLUTION=384x216

chunklist\_b374000.m3u8

#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=64000

chunklist\_b64000\_ao.m3u8

… however the link to audio chunklist is incorrect, and I can’t seem to configure wowza in a way to make it correct. When I request “chunklist\_b64000.m3u8” I get audio stream, but when I request “chunklist\_b64000\_ao.m3u8” there is no response.

Running Wowza Streaming Engine 4 Monthly Edition 4.0.1 build10615

Woud like to know if there is a way to remedy this…?

Thx,

David

---

<div class="post-metadata">

**Author:** ![Jason\_Hilton](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/jason_hilton/32/437_2.png) [@Jason\_Hilton](https://community.wowza.com/u/Jason_Hilton)\
**Post date:** [May 14, 2015, 1:48pm UTC](https://community.wowza.com/t/api-to-handle-smil-file-requests-audio-only-streams/44714/4 "2015-05-14T13:48:42Z")

</div>

Hi David,

This will now be handled in ticket #128286.

Regards,

Jason

---

<div class="post-metadata">

**Author:** ![Jason\_Hilton](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/jason_hilton/32/437_2.png) [@Jason\_Hilton](https://community.wowza.com/u/Jason_Hilton)\
**Post date:** [May 18, 2015, 11:16am UTC](https://community.wowza.com/t/api-to-handle-smil-file-requests-audio-only-streams/44714/5 "2015-05-18T11:16:36Z")

</div>

Hi,

Ref the above problem, the audio only tag in a .smil file created using Wowza Streaming Engine Manager is currently incorrect.

The default will look something like the example below when using 3 video streams and one audio only stream:

```auto
<?xml version="1.0" encoding="UTF-8"?>
<smil title="">
 <head></head>
 <body>
  <switch>
   <video height="360" src="myStream_360p" systemLanguage="eng" width="640">
    <param name="videoBitrate" value="850000" valuetype="data"></param>
    <param name="audioBitrate" value="96000" valuetype="data"></param>
   </video>
   <video height="240" src="myStream_240p" systemLanguage="eng" width="360">
    <param name="videoBitrate" value="350000" valuetype="data"></param>
    <param name="audioBitrate" value="96000" valuetype="data"></param>
   </video>
   <video height="160" src="myStream_160p" systemLanguage="eng" width="284">
    <param name="videoBitrate" value="200000" valuetype="data"></param>
    <param name="audioBitrate" value="96000" valuetype="data"></param>
   </video>
   <audio src="mySteam_audioOnly" systemLanguage="eng">
    <param name="audioBitrate" value="96000" valuetype="data"></param>
   </audio>
  </switch>
 </body>
</smil>

```

But this needs to be changed with a text editor to something like this:

```auto
<?xml version="1.0" encoding="UTF-8"?>
<smil title="">
 <head></head>
 <body>
  <switch>
   <video height="360" src="myStream_360p" systemLanguage="eng" width="640">
    <param name="videoBitrate" value="850000" valuetype="data"></param>
    <param name="audioBitrate" value="96000" valuetype="data"></param>
   </video>
   <video height="240" src="myStream_240p" systemLanguage="eng" width="360">
    <param name="videoBitrate" value="350000" valuetype="data"></param>
    <param name="audioBitrate" value="96000" valuetype="data"></param>
   </video>
   <video height="160" src="myStream_160p" systemLanguage="eng" width="284">
    <param name="videoBitrate" value="200000" valuetype="data"></param>
    <param name="audioBitrate" value="96000" valuetype="data"></param>
   </video>
   <video src="myStream_audioOnly" systemLanguage="eng">
    <param name="audioBitrate" value="96000" valuetype="data"></param>
    <param name="audioCodecId" value="mp4a.40.2" valuetype="data"></param>
   </video>
  </switch>
 </body>
</smil> 

```

Note: The audio stream is now using a video tag and if using Apple HLS for playback the cupertinoPacketizeAllStreamsAsTS Property will have to be added as “true”.

This can be done in Wowza Streaming Engine Manager under the “Cupertino Streaming Packetizer” section of the Properties tab. To add Properties with the Manager please see the following article.

[How to get started as a Wowza Streaming Engine Manager administrator](https://www.wowza.com/docs/how-to-get-started-as-a-wowza-streaming-engine-manager-administrator)

This has been reported to our engineering team and should be fixed in a later version of Wowza Streaming Engine.

Regards,

Jason
