# Simulcast not working with mediasoup client in android phone

**URL:** <https://react-native-webrtc.discourse.group/t/simulcast-not-working-with-mediasoup-client-in-android-phone/395>\
**Category:** Uncategorized\
**Created:** [December 4, 2019, 1:44pm UTC](https://react-native-webrtc.discourse.group/t/simulcast-not-working-with-mediasoup-client-in-android-phone/395 "2019-12-04T13:44:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashishvista](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@ashishvista](https://react-native-webrtc.discourse.group/u/ashishvista)\
**Post date:** [December 4, 2019, 1:44pm UTC](https://react-native-webrtc.discourse.group/t/simulcast-not-working-with-mediasoup-client-in-android-phone/395/1 "2019-12-04T13:44:19Z")

</div>

I am using realme 3 android device and redmi pro 7. Video communication is working correctly but i am seeing simulcast is not working. This is code snippet

const encodings =  
[  
{ maxBitrate: 180000, scaleResolutionDownBy: 4 },  
{ maxBitrate: 360000, scaleResolutionDownBy: 2 },  
{ maxBitrate: 1500000, scaleResolutionDownBy: 1 }  
];

this.\_camProducer = await this.\_sendTransport.produce(  
{  
track,  
encodings,  
codecOptions :  
{  
videoGoogleStartBitrate : 1000  
}  
});

_ **then i am getting this callback run** _\*.

this.\_sendTransport.on(  
‘produce’, async ({ kind, rtpParameters, appData }, callback, errback) =\>  
{  
try  
{  
const { id } = await this.\_protoo.request(  
‘produce’,  
{  
transportId : this.\_sendTransport.id,  
kind,  
rtpParameters,  
appData  
});

```
					callback({ id });
				}
				catch (error)
				{
					errback(error);
				}
			});

```

When console logging i am gettting this output  
 ![Screenshot from 2019-12-04 18-51-04](https://global.discourse-cdn.com/free1/uploads/reactnativewebrtc1/original/1X/d78d27452b5edd4286b1de1c6ef412a5cd97b8f6.png)

But the same code when running in chrome browser simulcast is working. Is simulcast works in android ??

---

<div class="post-metadata">

**Author:** ![saghul](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/saghul/32/4_2.png) [@saghul](https://react-native-webrtc.discourse.group/u/saghul)\
**Post date:** [December 4, 2019, 4:30pm UTC](https://react-native-webrtc.discourse.group/t/simulcast-not-working-with-mediasoup-client-in-android-phone/395/2 "2019-12-04T16:30:20Z")

</div>

By default hardware acelerated codecs are used on Android, thus simulcast ddoesn’t work. If you switch to the software codecs you will be able to use simulcast.

In order to do that you need to initialize the plugin by hand. Here is how we do it for Jitsi Meet: [https://github.com/jitsi/jitsi-meet/commit/49e3b03885bd0c00fcd9b64c2f4d6b77ad68b62a](https://github.com/jitsi/jitsi-meet/commit/49e3b03885bd0c00fcd9b64c2f4d6b77ad68b62a)

---

<div class="post-metadata">

**Author:** ![ashishvista](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@ashishvista](https://react-native-webrtc.discourse.group/u/ashishvista)\
**Post date:** [December 5, 2019, 2:57pm UTC](https://react-native-webrtc.discourse.group/t/simulcast-not-working-with-mediasoup-client-in-android-phone/395/3 "2019-12-05T14:57:49Z")

</div>

thanks @saghul it works. But now device heats up quickly. i have enabled software mode for encoding only.  
i want to know , desktop chrome browser uses hardware codec or software codec to make simulcast works??  
is there any android or ios device where hardware accelerated encoding simulcast will work?

---

<div class="post-metadata">

**Author:** ![saghul](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/saghul/32/4_2.png) [@saghul](https://react-native-webrtc.discourse.group/u/saghul)\
**Post date:** [December 5, 2019, 3:16pm UTC](https://react-native-webrtc.discourse.group/t/simulcast-not-working-with-mediasoup-client-in-android-phone/395/4 "2019-12-05T15:16:04Z")

</div>

I’m afraid not. You need the software encoder for simulcast to work.

---

<div class="post-metadata">

**Author:** ![ashishvista](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@ashishvista](https://react-native-webrtc.discourse.group/u/ashishvista)\
**Post date:** [December 5, 2019, 3:22pm UTC](https://react-native-webrtc.discourse.group/t/simulcast-not-working-with-mediasoup-client-in-android-phone/395/5 "2019-12-05T15:22:50Z")

</div>

In desktop, chrome browser uses software codec for simulcast??

---

<div class="post-metadata">

**Author:** ![saghul](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/saghul/32/4_2.png) [@saghul](https://react-native-webrtc.discourse.group/u/saghul)\
**Post date:** [December 5, 2019, 3:24pm UTC](https://react-native-webrtc.discourse.group/t/simulcast-not-working-with-mediasoup-client-in-android-phone/395/6 "2019-12-05T15:24:58Z")

</div>

Yes, it uses the software codecs.
