Mediasoup v2: what are the settings for "hi", "med" and "low" profile?

Subj. How do i change these settings? even if i will have to do it once-and-for-all, hardcoded in server code, that would be very valuable.

Right now i see if i stream from Macbook Pro webcam, “low” is 320x240x30fps, “med” is 640x480x30fps, and high is… same as med. If i could change it for 320x240x15fps, 480x360x15fps, and 640x480x30fps, that would be the best… possible? Or at least change resolutions keeping fps constant.

Where do i do that in code? Looked throughout and can’t find anything excelt “low”, “med”, or “high”.

Thanks!

First of all: you should really move to mediasoup v3, no excuse to not do it.

Regarding simulcast profiles in v2:

Right now i see if i stream from Macbook Pro webcam, “low” is 320x240x30fps, “med” is 640x480x30fps, and high is… same as med.

As said many times, this is not a general purpose WebRTC forum, so how you get high quality video (large enough to get 3 simulcast streams) in the browser is not part of mediasoup but getUserMedia() usage.

So your point is that it’s the getUserMedia that defines what exactly will be sent as each of those profiles? Or that it takes an original stream high-bitrate enough that there is a difference between “med” and “high”? Can you give me an example please?

And unfortunately, schedule constraints preclude us from switching versions at this point.

Anyway, is there a way to reduce framerates/resolutions used in each of the profile? At minimum, i’d love to be able to move to
320x240xany fps
480x360xany fps
640x480xany fps

and ideally, set fps at 15 too. this shouldn’t impact getUserMedia as i see it… just some change in server side code - where?

thanks!

You will just get 3 simulcast streams if you call getUserMedia with a high enough resolution parameters. I won’t show any example of that because that’s not part of mediasoup API.

Besides that, even if you get 3 simulcast streams the browser may drop the highest one due to network condition of high CPU usage. And the receivers may just get the low or medium streams depending on their own network conditions and the preferred profile set into those Consumers by the application.

No, that’s not server side related code at all.

OK but what kind of code or setting, and where, sets these constants for what constitute each profile? width, height, and fps values? I am looking for ways to change those. Even if it means changing once and for all, hardcoded.

I am not looking to increase quality. More like, get ability to swich quality in a finer grained way. Let what’s now “med”, be “hi”, and “med” be something in between of current “lo” and “med”. Possible?

I also think it’s not actually simulcast, but SVC. When i send one stream in 640x480 quality, and receive from 2 locations, Hi, and Low quality, i still send out only 1 stream in 640x480 quality as per chrome://webrtc-internals. So i believe this isn’t simulcast, i am not sending 2 streams, while can definitely receive 2 streams with different qualities/bitrates, and no transcoding is going on the server for sure right? And settings for SVC layers are set - where?

And again you are asking about things that are not part of mediasoup making this a general purpose WebRTC forum. I’m sorry but this is the last thing I’ll say here:

  • In mediasoup-client v3 you can set specific encodings parameters, as documented in (surprise) the WebRTC 1.0 spec.
  • Here how to use them within mediasoup-client v3, so this is documented.
  • Now, not all browsers implement such a spec. In fact, in v3 we do it for Firefox and modern Chrome versions, but due to some remaining issues in those WebRTC implementations we do not enable it by default. In order to enable it in Chrome you need to avoid browser autodetection and set “Chrome74” handler when creating a mediasoup-client v3 Device instance.

I’m afraid that’s not possible in mediasoup v2.

No, it’s just that chrome://webrtc-internals does not show all simulcast streams but just the highest one. That’s, as usual, an issue not related to mediasoup.

And, BTW you can also set the min, max framerate in getUserMedia, but of course that affects all the simulcast streams.