Wowza Community

Getting bitrate of a transocoded stream - MediaProvider

Hello,

we’re developing a custom implementation of IMediaListProvider for JWPlayer. How can we access to the audio + video bitrate of a transcoded stream (to set the system-bitrate attribute) ? From IMediaStream or ILiveStreamTranscoder instances, other ?

What we have is :

rendition.setName(stream.getName());
rendition.setWidth(width);
rendition.setHeight(height);

This is generating :

<smil>
	<head>
		<meta base="rtmp://192.168.1.19:1935/live/_definst_" />
	</head>
	<body>
		<switch>
			<video src="livestream12_160p" width="214" height="160"/>
			<video src="livestream12_240p" width="320" height="240"/>
			<video src="livestream12_source" width="320" height="240"/>
		</switch>
	</body>
</smil>

What we want to reach is :

<smil><head><meta base="rtmp://192.168.1.19:1935/live/_definst_"/></head><body><switch><video src="mp4:livestream12_source" system-bitrate="544000" width="320" height="240"/><video src="mp4:livestream12_360p" system-bitrate="899152" width="480" height="360"/><video src="mp4:livestream12_240p" system-bitrate="382000" width="320" height="240"/><video src="mp4:livestream12_160p" system-bitrate="232000" width="214" height="160"/></switch></body></smil>

We miss the sytem-bitrate and the video src prefix.

Also, how to set the video codec in order to get the prefix “mp4” in the src ? Thanks.

Alternatively, is it possible to get a part of the source of the default implementation of the MediaListProvider for the JWPlayer ?

Thanks a lot in advance.

Hi,

It is possible to automatically generate a complete smil file containing system-bitrate etc from a number of transcoded streams. The following article has examples of how to do this. Essentially you enter something like the following in your browser while the transcoded streams are active

http://[wowza-ip-address]:8086/medialist?streamname=[ngrp-name]&application=[application]&format=smil

and this will display the smil contents that you can then save to your [install-dir]/contents/ directory as yourstream.smil (or whatever you wish to call it) and it will include system-bitrate and other specific parameters that should ensure that you have a well-defined smil file. Please refer to the article linked for specific settings.

Paul

Hello,

thanks for your answer. The reason why we made a custom implementation of IMediaListProvider is that we shutdown the streams generated by the transcoder if the transcoder encode resolution (height / width) is higher than the source stream.

With the URL :

http://[wowza-ip-address]:8086/medialist?streamname=[ngrp-name]&application=[application]&format=smil

There is one item generated by trancoder encode item, whatever if the stream is alive or not.

Our IMediaListProvider provider implementation permits to discard the shutdown streams. But we miss how to get the system-bitrate and encoding prefix in the src name.

Thanks in advance for you help to get this or to ignore the sutdown streams from the smil list.