September 23, 2021

Conditional transcoding for ABR

Nimble Streamer Live Transcoder allows building transcoding pipelines of various complexity however it used to provide only straight-forward scenarios regardless of incoming stream parameters.

With conditional transcoding you can implement more complex scenarios based on the resolution of incoming stream. You may define the following conditions for decoder element:

  • width of the original stream;
  • height of the original stream;
  • comparison operators <, <=, =, >= or >;
If the defined condition is not met, the decoding will not start and its respective pipeline will not start.

The most popular use cases of such conditioning are:
  • situational up-scaling: if you have a scenario to transcode 4K input to 1080p and your input stream from your source happen to go down to 720p, this will prevent wasting your resources to create unnecessary high resolution.
  • set maximum output resolution, so whatever is published by your streamers, you produce a ladder limited from above.
All use cases fit perfectly with live ABR feature set of Nimble Streamer. It allows defining ABR streams with any number of streams and the output will provide any streams that are available at any given moment. So if some stream is not generated due to conditional transcoder, the output adaptive stream will still be available for playback with lower resolutions.

Here's how you can set up conditional transcoding.

We assume you're already familiar with Live Transcoder, you already have an active Transcoder license and you have it installed and registered

We'll create a scenario which allows down-scaling any incoming stream to 720p if the input video has larger frame size, then do the same for 480p resolution and create 360p regardless of the input. The audio will be passed through for all inputs.

Create a new scenario and drag and drop a new Video source element there.
Then Click on Filter settings to see fields with conditions:


As you can see from the screenshot, this decoder will be initiated if the height of original stream is greater. Then we put Scale filter and Video output element to downscale video to 720p into respective pipeline as shown below.



As a result, you'll get 720p only if the source stream is greater than 720p. If the original stream is 720p then you'll be able to use it in our ABR output as is, we'll show it below.

Now let's add 480p transcoding pipeline.



This Video source has condition of height>480. You'll get 480p only if the source stream is greater than 480p. This will cover extreme cases when the source drops the resolution for some reason.

The remaining 360 pipeline can be implemented without any conditions as we assume the resolution should not drop below 480p in vast majority of cases. Full transcoding scenario will look like this.




Now, having these conditional pipelines, you can proceed with creating output ABR stream.
  1. Go to Nimble Streamer top menu and click on Live Streams.
  2. On the next streams page you need to find your current transcoding server and click on the number in ABR column.
  3. You'll be brought to ABR streams page, there you need to click on Add ABR setting.
  4. You'll see a dialog which you need to fill as shown below.


Here you see an original stream as well as all 4 down-scaled sub-streams. If any of the sub-streams becomes un-available available, Nimble will still generate the correct playlist with active streams so your player will be able to choose between available resolutions.

You can find more details about setup and ABR streams' usage in this ABR setup article.


Overall, conditional transcoding can serve many purposes so feel free to experiment with it as much as you need. Let us know of your use cases which utilize this feature.

Follow us in social media to get updates about our new features and products: YouTubeTwitterFacebookLinkedInRedditTelegram

Related documentation


No comments:

Post a Comment

If you face any specific issue or want to ask some question to our team,
PLEASE USE OUR HELPDESK

This will give much faster and precise response.
Thank you.

Note: Only a member of this blog may post a comment.