# Questions about simulcast streams

**URL:** <https://mediasoup.discourse.group/t/questions-about-simulcast-streams/4489>\
**Category:** mediasoup libraries\
**Created:** [August 23, 2022, 1:36am UTC](https://mediasoup.discourse.group/t/questions-about-simulcast-streams/4489 "2022-08-23T01:36:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kbaran](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/kbaran/32/1430_2.png) [@kbaran](https://mediasoup.discourse.group/u/kbaran)\
**Post date:** [August 23, 2022, 1:36am UTC](https://mediasoup.discourse.group/t/questions-about-simulcast-streams/4489/1 "2022-08-23T01:36:12Z")

</div>

I’m trying to send simulcast video, but for some likely dumb reason on my part, only the lowest-quality stream is active. I’ve tried to follow the demo’s practices fairly closely, including using essentially the same CAM\_VIDEO\_SIMULCAST\_ENCODINGS as the demo

```auto
CAM_VIDEO_SIMULCAST_ENCODINGS = [
  { scaleResolutionDownBy: 4, maxBitrate: 500000 },
  { scaleResolutionDownBy: 2, maxBitrate: 1000000 },
  { scaleResolutionDownBy: 1, maxBitrate: 100000000 }
]

```

but I’ve clearly done something wrong; when I run the demo that’s hosted at [v3demo.mediasoup.org](http://v3demo.mediasoup.org), it’s actively sending three streams over WebRTC, but my application’s code only sends one, with the other two created but no data being sent. The one stream that is active works flawlessly.

I added a server-side listener to producer.on(‘score’) and see that first the lowest-quality stream becomes active with a score of 10, then the middle-quality stream does the same and its score is also 10, but then immediately after that, the middle-quality stream’s score goes to 0. I suspect this is either representative of the problem or the problem itself, but I’m not sure why this is occurring. The highest-quality stream never seems to be handled at all.

I didn’t want to clutter up this initial post with too much code if a generic nudge in the right direction would let me solve the problem, but if this isn’t enough to go off of, I can post more.

---

<div class="post-metadata">

**Author:** ![havfo](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/havfo/32/268_2.png) [@havfo](https://mediasoup.discourse.group/u/havfo)\
**Post date:** [August 23, 2022, 12:46pm UTC](https://mediasoup.discourse.group/t/questions-about-simulcast-streams/4489/2 "2022-08-23T12:46:48Z")

</div>

Chrome has internal limits on number of layers it will send based on resolution of main stream. Check to see if your highest layer has high enough resolution. My memory might be a bit off, but I think a resolution of 640x480 will produce max 2 layers.

---

<div class="post-metadata">

**Author:** ![kbaran](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/kbaran/32/1430_2.png) [@kbaran](https://mediasoup.discourse.group/u/kbaran)\
**Post date:** [August 23, 2022, 3:52pm UTC](https://mediasoup.discourse.group/t/questions-about-simulcast-streams/4489/3 "2022-08-23T15:52:52Z")

</div>

That’s useful to know about Chrome, but why does the hosted demo send all three streams on Chrome - 1280x720, 640x380, and 320x180 - while my app only attempts to send 2, regardless of whether the max resolution is 1280x720 or 640x380 (I’ve tried both)? I downloaded and ran the demo locally and only see two streams, as well, which is odd, give the hosted one does three.

The bigger issue for me is the higher-quality stream getting paused immediately and never resumed. I can work with only two resolution streams, but I’d really like to have more than one running.

---

<div class="post-metadata">

**Author:** ![kbaran](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/kbaran/32/1430_2.png) [@kbaran](https://mediasoup.discourse.group/u/kbaran)\
**Post date:** [April 10, 2023, 10:35pm UTC](https://mediasoup.discourse.group/t/questions-about-simulcast-streams/4489/4 "2023-04-10T22:35:51Z")

</div>

Turned out that the problem was that I was setting the x-video-google-start-bitrate header far too low. Instead of having this option:

```auto
codecOptions: {
     videoGoogleStartBitrate: 1000
 },

```

we’re now defining another set of constants for this

```auto
export const CAM_VIDEO_SIMULCAST_CODEC_OPTIONS = {
  videoGoogleStartBitrate: 1000 * 1000, // 1mbps
  videoGoogleMaxBitrate: 1000 * 1000 * 1000, // 1gbps
  videoGoogleMinBitrate: 1000 // 1kbps
}

```

and then importing and using that for codecOptions.
