问题
It seems obvious that WebRTC uses its own rate control (GCC) to control the bitrate of the encoder, but I couldn't find any information about changing resolution as well.
Does WebRTC, (or other realtime video system like Hangout, Skype) change only the bitrate and not the resolution during live ingest?
If it doesn't change the resolution, why is that?
According to the bitrate, quality, resolution curve shown below,
using only single fixed resolution to cover bitrate changes seems not efficient.
This is because the quality drastically goes bad if the bitrate is really low
for the single resolution. (because of the sharp slope of the left side curve)
Therefore, in my opinion, changing resolution as well as bitrate is necessary and reasonable, but I'm not sure if this is supported by WebRTC, Hangouts, Skype or other realtime mobile video system.
Image reference: https://teradek.com/blogs/articles/what-is-the-optimal-bitrate-for-your-resolution
回答1:
Yes, WebRTC will change resolution as well in the face of bandwidth limitations.
There's a control surface planned for this even, called degradationPreference:
const p = sender.getParameters();
console.log(p.degradationPreference); // "balanced" by default
p.degradationPreference = pick? "maintain-framerate" : "maintain-resolution";
await sender.setParameters(p);
But the control isn't implemented by anyone yet. Implementations generally make their own judgement calls at the moment (which is the default "balanced"
).
来源:https://stackoverflow.com/questions/55295914/adpative-rate-control-for-webrtc-does-resolution-change-as-well