Results 1 to 4 of 4

Thread: Limit number of transcoded streams based on source video resolution

  1. #1
    Join Date
    Dec 2014

    Default Limit number of transcoded streams based on source video resolution


    I want to limit number of published transcoded streams to save server resources. For me it does not makes much sense to upscale live stream of say 480x360 to HD, as this will not give any quality improvement but will have effect on CPU and disk resources usage (live streams are to be recorded). While I solved the recording part with custom stream recorder, it would be more transparent to solve it on transcoder level instead.
    I read How-to-control-which-streams-get-transcoded-using-server-side-API, but I'm not sure in two things:

    1) That onCodecInfoVideo in my source stream handler will be called before any transcoded streams created, thus I will not be able to set resolution into source streams properties.
    2) That it is guaranteed that onCodecInfoVideo will be called before isLiveStreamTranscode called, so I will be able to get target destination from created transcoded stream.

    Any suggestions?

  2. #2



    onCodecInfoVideo is called when the video codec packet is received. onLiveStreamTranscode will be called when the first packet for the stream is received. If the first packet is the video codec packet then onCodecInfoVideo will be called before onLiveStreamTranscode. If the first packet is some other type of packet then onLiveStreamTranscode will be called first.

    The order that packets arrive will be determined by the encoder.


  3. #3
    Join Date
    Dec 2014


    Is there any way to shutdown transcoded stream individually once they have been already published? Calling TranscoderSession.shutdown(IMediaStream) on transcoded stream shutdowns all the streams except the source one.

  4. #4
    Join Date
    Dec 2014


    The only solution I have found after spending 3 days in vain attempts, is to pass resolution parameters via query string from the streaming client (which is my app) and shutdown transrated stream in ILiveStreamTranscoderControl.isLiveStreamTranscode. Obviously not a beautidul solution, but attempt to deactivate encode worker threads for a specific stream breaks transcoder entirely. That's shame that API does not provide the functionality to shutdown/restart transcoder streams out of box.

Similar Threads

  1. out of sync transcoded and source streams
    By yaroslavv in forum Live Streaming and Encoders
    Replies: 5
    Last Post: 04-15-2014, 04:47 AM
  2. Limit the number of concurrent streams per user
    By russian.hamburguer in forum General Forum
    Replies: 3
    Last Post: 03-26-2014, 05:47 AM
  3. limit number of streams per user account
    By bobmane in forum Server-side Modules and Code Samples Discussion
    Replies: 1
    Last Post: 10-25-2012, 11:17 AM
  4. Max Number of Transcoded Streams?
    By AnthonyBaratta in forum AddOn: Transcoder
    Replies: 3
    Last Post: 12-14-2011, 06:58 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