Create transcoder template using custom server module

So situation is. We have many users, each one can configure quantity and quality of output live streams, that users watching can choose of.
For example

  1. video 320x240 vb700 ab32
  2. video 640x480 vb100 ab64
  3. audio ab32

Each user get unique stream name. I plan to create custom module that would create transcoder template in onInitBeforeLoadTemplate and setting it for trascoder to use with current stream.

Like:

  1. user start broadcast with stream name

  2. onInitBeforeLoadTemplate request to our server api to get settings by given stream name

  3. create template .xml and liveStreamTranscoder.setTemplateName(’.xml’)

  4. delete template on onShutdownStart

The only problem i see is there seems to be none standart way to create template.

So, does it seems like a good idea? Would this scheme even work?