-
Notifications
You must be signed in to change notification settings - Fork 851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SRTO_OUTPACEMODE option for Output Pace Control #1383
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider some minor changes.
Accepted Max's suggestions Co-authored-by: Maxim Sharabayko <maxlovic@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple more formatting-related suggestions.
Co-authored-by: Maxim Sharabayko <maxlovic@gmail.com>
Hi Jean,
That's my note:
Please let me know if you have any concerns/corrections/suggestions to all mentioned above. |
So just on this, I was reading the SRT whitepaper and it states "Another change made in SRT version 1.3 was to add a configuration option called OUTPUTPACEMODE"....just so I'm clear, I assume that was presumably pulled and is now intended for version 1.5 at some point in the future, correct? However, even before the whitepaper describes the OUTPUTPACEMODE option, it states "SRT version 1.3 combines the two packet pacing methods. The input is measured, but it it falls too low, the nominal input bit rate value for the SRT sender's output is respected. If a measurement is lower than the nominal configuration, it isn't followed. However if the encoder input rate rises above the configured rate, it will be followed as much as possible." Is that still accurate, or will that only be the case for 1.5? |
@oviano I tried to introduce this feature in 1.4.2 but the focus was on on other features. After some reviews changes were proposed in the form of another PR. The principle is the same but with some naming changes. I am not sure if it will find its way in 1.4.3 or 1.5.0. I don't even know what the next release will be. |
Right ok thanks, so the whitepaper should be ignored then it would seem. I’ve clearly been using SRT wrong until now by relying on the input rate to be automatically calculated, since specifying number actual encoder bitrate everything is much more stable and consistent. On the subject of encoder overshoot; if you specify the input bitrate INPUTBW is there any scenario where you wouldn’t want it to use the calculated input rate if it was higher? Seems like it should work this way in any case, if you are specifying the input manually... Or why not simplify things and just add SRTO_MINBW. Specify this and it would behave as described, ie uses the highest of this and the calculated BW. Adds nice symmetry to the MAXBW option too. |
@oviano I like the idea of SRTO_MINBW. But unlike SRTO_MAXBW, to replace SRTO_INPUTBW, SRTO_MINBW must be a post-binding option settable at all time. I am using SRTO_INPUTBW when I adjust the encoder's bit rate based on the SRT stats. For your other question I see no reason not to use the measured input bandwidth when higher then configured INPUTBW (overshoot) but I encountered this with adverse effect on decoder only for very low bit rate (~32kbps). I am happy to see other than me needs that feature. |
So I was thinking SRTO_MINBW would be an additional option and wouldn’t replace INPUTBW. Ie If you are guaranteeing a fixed bitrate, you use INPUTBW as now. So nothing changes. But if you want this new behaviour then you specify MINBW instead, meaning “this is my encoder bitrate, but I’m happy for SRT to go above this if the calculated value is higher.” |
There was some rework in #1541, but it ended up with a similar conclusion, that |
SRTO_OUTPACEMODE option can be use to implement custom sender output bit rate. This option provides all the implicit output pace modes defined by the options SRTO_MAXBW, SRTO_INPUTBW, and SRTO_OHEADBW, and add a new mode combining the internally sampled input rate and the configured input rate to adjust the output rate. Other custom modes can be added taking other factors into account such as he size of the sender buffer, the size of the lost packets list, etc... Documentation has been updated and enhanced. The GET-only option SRTO_SMPINBW has also been added to get the internally sampled input bitrate but this value should probably be added in the stats also.