Wowza Community

Dynamically create smil files

I have a website where users can stream to their own “channel”. Their stream name is their username (which is unique). I would like to implement adaptive bitrate streaming but that would require me to manually create smil files for every user which is not reasonable.

Is there a way to generate a smil file when a user registers, or even a temporary one when they push their stream? I noticed the REST api says you can create smil files dynamically which seems to be the best option for me.

Am I understanding this correctly? What would be the best solution to my issue?

Hi @john mcqueen, do you mean that the users send multiple bitrates to your server, and the server prepares a SMIL for that, or do you use Wowza Transcoder?

  1. If you use Wowza transcoder; you could use “ngrp” instead of SMIL; as ngrp dynamically creates the SMIL from a transcoder group definition.

  2. If you allow users to send multiple bitrates as separate streams to your server, and you want the server to prepare a SMIL, it’s a little more complicated.The challenge is that the server doesn’t know which streams belong together, how many streams there are in the ABR, and what the specifications are for each stream.

2A. You must either let the user define this on forehand, e.g. allow the user to specify the ABR in a Portal GUI prior to starting the stream,

2B. Or you must write a custom module that detects incoming streams, and assumes certain streams to belong together in an ABR, e.g. based on their streamname.

I’ve implemented both 1, 2A and 2B before. Logically, #1 is simple to implement, and 2A is relatively simple, but requires users who understand ABR and stream metadata; 2B requires more effort from you, but won’t require any intelligence from the user (other than that they must set up their encoder to produce multiple streams for the ABR)

@Karel Boek I am planning on using Wowza Transcoder. From what I understand Stream Name Groups only work on the origin server. Which means if I have an edge configuration I can’t use Stream Name Groups.

My plan is to have users send an RTMP stream to the origin server and use the wowza transcoder to create ABR streams that are sent to the edge servers.

@john mcqueen

You didn’t tell that it had to work in an Origin-Edge setup … In that case, you could write a module that requests the NGRP from the Origin, where you have Transcoder, and parses it to a SMIL on the Edge. Done that too; works fine.