UHD / HD Stat Mux

Dec 2018

Introduction

When using the MFSP as the Stat Mux controller, if you have the same resolution for all services, then by 'scale' they will get the same bit rate in term of weighting (complexity will determine the actual rates of the services).
When you have a mixed Stat Mux configuration (in terms of mixed resolutions) specifically in terms of HD/UHD then you might find that the UHD is starved of bits (depending on the content).
This happened in a system that had 2 x HD sports and 1 x UHD sports. The video pool was 48Mb/s (no audios in the test system) and the services were configured as follows:

HD:
bMin - 750Kb/s
bMax - 12Mb/s
UHD:
bMin - 8Mb/s
bMax - 30Mb/s

In this above example, the HD Sports Services were sitting close to, or at their bMax for a lot of the time, leaving the UHD service at around 24Mb/s, which for the UHD football content was not enough. We needed a way to balance the UHD/HD bit distribution.
There is an Advanced Parameter in the MFSP that allows some control of the Stat n) Mux distribution (by resolution) that we can use to balance things up.

Advanced Parameter

The Advanced Parameter is called statmux.SurfaceAdjust and works in the following manner:

Sqrt (Horizontal * Vertical * Frame Rate). So it's a ratio.
For example, If you have UHD and HD in the same Stat Mux, then you have:
sqrt ((3840*2160*50)/ (1920*1080*25)) = sqrt (414720000 / 51840000) = sqrt(8) = 2.82842712474619
So the UHD will get 2.82 more bits if the value is the default '1'

For my example of 2xHD 1xUHD, I had to set the statmux.SurfaceAdjust to 8. The UHD did not actually get 8*More bits, so there so more to this that I have been told. But at least increasing the value for statmux.SurfaceAdjust increases the rate that the UHD gets.
The UHD did manage a much higher average bit rate, going up to 34Mb/s for longer periods.
In the second test we had 4xDrama and 1xUHD Sport. In this example the UHD was taking 32-38Mb/s for a lot of the time, and really stealing all of the bits from the 4 x HD (Drama) content, so my original value of 8 needed dialling back a little for this scenario.

Advanced Parameter Location

The Advanced Parameter lives in the MFSP in the following location:

/etc/opt/ericsson/stream-processing-statmux/

The file that needs to be edited is called:

smxMasterIni.json

Edit the mpeg4.cfg location exactly as below: (The line we have added is “statmux.SurfaceAdjust” : <Value>,)

"mpeg4.cfg" : {
"statmux.livenessTimeout" : 2500,
"statmux.SurfaceAdjust" : <Value>,
"statmux.forceReuseAddr" : false,
"statmux.rejectOnLowBitrate" : true,
"statmux.switchSettlingTime" : 2500
}

Remember, this is a json file, so Syntax is super important.