# Spatial layers has lower resolution

**URL:** <https://mediasoup.discourse.group/t/spatial-layers-has-lower-resolution/2778>\
**Category:** Integration\
**Created:** [May 10, 2021, 7:18am UTC](https://mediasoup.discourse.group/t/spatial-layers-has-lower-resolution/2778 "2021-05-10T07:18:19Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [May 10, 2021, 10:07am UTC](https://mediasoup.discourse.group/t/spatial-layers-has-lower-resolution/2778/2 "2021-05-10T10:07:42Z")

</div>

> [@piranna](#):
>
> Problems is, when setting layer two (index: 1) with `consumer.setPreferredLayer({spatialLayer: 1})` , video has a `videoHeight` of 320, like scalings are `[4, 2, 1]` instead of `[2, 1]` .

Just to confirm that you are passing proper encodings to the producer, enable spatial layer 0 in the consumer and check the received resolution.

TIP: The fact that you tell getUserMedia to generate 640p video does NOT mean that the encoder is gonna encode the same resolution. It may generate a minor resolution (even for the highest simulcast stream) if there are CPU issues or uplink limitation/issues.

---

_[View the full topic](https://mediasoup.discourse.group/t/spatial-layers-has-lower-resolution/2778)._
