Wowza Community

API to handle SMIL file requests - audio only streams

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

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:

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:

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

Hello Nick

Please refer to ticket #117990 for further review.

Thanks,

Matt

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

Hi David,

This will now be handled in ticket #128286.

Regards,

Jason

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:

<?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:

<?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

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

Regards,

Jason