http(hls) streaming with smil file to refer 1 mp4 file ( multi-cahannels )

Hi,

We are using the Wowza Media Server 3.6 to streaming (HTTP HLS) multi-channel MP4 video streams to jwplayer. ( we using the plugins as in this link : https://www.wowza.com/docs/how-to-select-audio-data-and-or-video-channel-from-a-multi-channel-mp4-file-by-using-imediareaderactionnotify ).

It works without problem if we just supply the url with the query parameters mp4:sample.mp4?audioindex=0, the problem occurs if we using

smil file to support the adaptive streaming as in the following example :

<?xml version="1.0" encoding="UTF-8"?>

it didn’t work with this example, because it took the query parameter as part of the file name!

Could you please give some advice or example to how to let it works correctly?

Many thanks,

qstream

Hello,

Can you use a smil file similar to this?

<smil>
<head/>
<body>
<switch>
<video src="mp4:sample.mp4" system-bitrate="100000" width="200" height="300">
<param name="videoCodecId" value="avc1.66.30" valuetype="data" />
<param name="audioCodecId" value="mp4a.40.2" valuetype="data" />
</video>
</switch>
</body>
</smil> 

Assuming that your SMIL file is named sample.smil, can you use this HLS streaming request?

http://172.16.18.52:1935/vod/smil.sample.smil/playlist.m3u8?audioindex=0

This way, the query string should be passed to Wowza.

Zoran

Hello,

It didn’t work as you suggested, because in the multichannel selection module i didn’t get the query parameter in the method :

public void onHTTPSessionCreate(IHTTPStreamerSession httpSession)

or in other words, how can I pass the selected index to the MediaReaderListener ( because the actual channel selection is done

in the onMediaReaderOpen method, for adaptive smil streaming, you need more different index to select within the same file name with multiple bitrates channels )

If the client request with following url http://wozaip:1935/vod/smil:sample.smil/playlist.m3u8, where can I get the query string? It seems

it didn’t go to method onHTTPSessionCreate(IHTTPStreamerSession httpSession) if I implement the IMediaReaderActionNotify.

anyways, if it works, how can i combine the different bitrates with the same file name in the smil file, for example :

<smil>
<head/>
<body>
<switch>
<video src="mp4:sample.mp4?audioindex=0" system-bitrate="100000" width="200" height="300">
<param name="videoCodecId" value="avc1.66.30" valuetype="data" />
<param name="audioCodecId" value="mp4a.40.2" valuetype="data" />
</video>
<video src="mp4:sample.mp4?audioindex=1" system-bitrate="20000" width="200" height="300">
<param name="videoCodecId" value="avc1.66.30" valuetype="data" />
<param name="audioCodecId" value="mp4a.40.2" valuetype="data" />
</video>
</switch>
</body>
</smil> 

Hello,

Can you use a smil file similar to this?

<smil>
<head/>
<body>
<switch>
<video src="mp4:sample.mp4" system-bitrate="100000" width="200" height="300">
<param name="videoCodecId" value="avc1.66.30" valuetype="data" />
<param name="audioCodecId" value="mp4a.40.2" valuetype="data" />
</video>
</switch>
</body>
</smil> 

Assuming that your SMIL file is named sample.smil, can you use this HLS streaming request?

http://172.16.18.52:1935/vod/smil.sample.smil/playlist.m3u8?audioindex=0

This way, the query string should be passed to Wowza.

Zoran

Hi,

Thanks, indeed it works as you suggested, I’m now tring to implement my own module to streams different bitrates by using url query

parameters in combination with jwplayer smil file to refer the single multi-tracks mp4. I hoop it will work.

qstream

Hi,

The method Zoran mentioned should work with the default module. The query parameter should be attached to the session and available in onHTTPSessionCreate. It is then put into the session properties for when the stream is actually requested.

It is possible with hls, that the mediaReader is being set up before the HLS session so the property wouldn’t be available. We would have to do some tests.

Another option is to use the IMediaStreamNameAliasProvider(2) interface and set the properties in one of the resolvePlayAlias methods. These are called before the onHTTPSessionCreate method.

I think it would also work for your second option of having multiple copies of the same stream in your smil file.

The resolve alias method is called for the original smil file as well as each of the items in the file. You could set the settings for each video as it is requested.

Roger.