Results 1 to 3 of 3

Thread: Selecting transcoder profile on server side API

  1. #1

    Default Selecting transcoder profile on server side API

    Hi there .... I want to use something like mentioned on following post to select which stream to transcode (

    Is there any way to select at same time, through server side API, which transcoder profile to use for each stream?
    I want to tell which stream to transcode, and which profile of the 3 I will have to use for each stream

    Thanks in advance

  2. #2



    The easiest way to do this will be to implement the ILiveStreamTranscoderActionNotify interface which has a method, onInitBeforeLoadTemplate(LiveStreamTranscoder liveStreamTranscoder);, which is called right before the template is loaded. In this method, you can specify the name of the template that you want to load.

    To implement the interface, you can do the following.

    PHP Code:
        // Add a Transcoder listener to the appInstance.
    appInstance.addLiveStreamTranscoderListener(new MyTranscoderCreateNotifier()); 

        . . .

    // Listener class that listens for transcoder create events and registers the transcoder action notifier class.
    class MyTranscoderCreateNotifier implements ILiveStreamTranscoderNotify 

    public void onLiveStreamTranscoderCreate(ILiveStreamTranscoder liveStreamTranscoderIMediaStream stream
    LiveStreamTranscoder)liveStreamTranscoder).addActionListener(new MyTranscoderActionNotifier()); 

    public void onLiveStreamTranscoderDestroy(ILiveStreamTranscoder liveStreamTranscoderIMediaStream stream
    public void onLiveStreamTranscoderInit(ILiveStreamTranscoder liveStreamTranscoderIMediaStream stream

    //  Listener class that listens for transcoder actions.  This class extends LiveStreamTranscoderActionNotifyBase which already implements all of the ILiveStreamTranscoderActionNotify methods so you only override the methods you need.
    class MyTranscoderActionNotifier extends LiveStreamTranscoderActionNotifyBase 
    // get the templateName from somewhere and set it here.
    public void onInitBeforeLoadTemplate(LiveStreamTranscoder liveStreamTranscoder
    String templateName "myStream.xml";
    You can also use this along side the transcoder control interface to control what actually gets transcoded.

    Last edited by roger_l; 01-28-2014 at 06:54 PM.

  3. #3
    Join Date
    Nov 2012


    To expand this a little, can you specify the name of the template that you want to load in the stream name used on the encoder?

    For example:

    Server URL: rtmp://
    Stream name: myStream,transrate1
    Results in rtmp:// being transcoded with the settings in transrate1.xml

    Server URL: rtmp://
    Stream name: myStream,transrate8
    Results in rtmp:// being transcoded with the settings in transrate8.xml

    Is it doable?

Similar Threads

  1. wowza server side API
    By weslati in forum General Forum
    Replies: 2
    Last Post: 02-28-2013, 02:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts