# No inbound-rtp ?

**URL:** <https://mediasoup.discourse.group/t/no-inbound-rtp/3918>\
**Category:** mediasoup libraries\
**Created:** [February 7, 2022, 1:21am UTC](https://mediasoup.discourse.group/t/no-inbound-rtp/3918 "2022-02-07T01:21:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![skavish](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/skavish/32/1018_2.png) [@skavish](https://mediasoup.discourse.group/u/skavish)\
**Post date:** [February 7, 2022, 1:21am UTC](https://mediasoup.discourse.group/t/no-inbound-rtp/3918/1 "2022-02-07T01:21:25Z")

</div>

hey everybody,

may be somebody has an idea how to explain the following:

- there is a video producer
- there is corresponding consumer

when I get consumer stats I have `outbound-rtp` stream, but no `inbound-rtp` stream.  
and obviously there is no video in consumer or it’s frozen.

it happens to some relatively small percentage of our streams, less than 10-5%  
in majority of streams there are both `inbound-rtp` and `outbound-rtp` streams.

thanks!

---

<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:** [February 7, 2022, 12:53pm UTC](https://mediasoup.discourse.group/t/no-inbound-rtp/3918/2 "2022-02-07T12:53:47Z")

</div>

So it means that there are problems in the Producer side. Sender endpoint is not sending RTP (or expected RTP) to mediasoup so no inbound RTP stream exists in the Producer and hence no inbound RTP stream exists in the corresponding Consumer.

---

<div class="post-metadata">

**Author:** ![skavish](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/skavish/32/1018_2.png) [@skavish](https://mediasoup.discourse.group/u/skavish)\
**Post date:** [February 8, 2022, 12:51pm UTC](https://mediasoup.discourse.group/t/no-inbound-rtp/3918/3 "2022-02-08T12:51:36Z")

</div>

Thank you!

Here is the case:

- producer and consumer, both streams are present in stats, i.e. inbound and outbound, everything is working great
- then at some point only outbound is left, no inbound in stats

Should I see any errors/exceptions in mediasoup server code or in workers?

I am trying to understand the cause of this, so it would be great to see some errors in logs or smth.  
So far it seems it fails silently unless I missed it.

---

<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:** [February 8, 2022, 1:16pm UTC](https://mediasoup.discourse.group/t/no-inbound-rtp/3918/4 "2022-02-08T13:16:45Z")

</div>

> [@skavish](#):
>
> Here is the case:
> 
> - producer and consumer, both streams are present in stats, i.e. inbound and outbound, everything is working great
> - then at some point only outbound is left, no inbound in stats

This is not possible. Once created, RTP streams are never removed from the Producer’s stats, and Producer stats are those that are included as `inbound-rtp` in Consumer’s stats.

---

<div class="post-metadata">

**Author:** ![skavish](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/skavish/32/1018_2.png) [@skavish](https://mediasoup.discourse.group/u/skavish)\
**Post date:** [February 8, 2022, 1:18pm UTC](https://mediasoup.discourse.group/t/no-inbound-rtp/3918/5 "2022-02-08T13:18:34Z")

</div>

I guess I overlooked something, will double check what is going on there. Thank you.

---

<div class="post-metadata">

**Author:** ![snnz](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/snnz/32/693_2.png) [@snnz](https://mediasoup.discourse.group/u/snnz)\
**Post date:** [February 8, 2022, 8:56pm UTC](https://mediasoup.discourse.group/t/no-inbound-rtp/3918/6 "2022-02-08T20:56:01Z")

</div>

> [@ibc](#):
>
> This is not possible.

But it is actually possible in case a simulcast consumer is paused. Though, of course, this is intentional.

---

<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:** [February 8, 2022, 9:02pm UTC](https://mediasoup.discourse.group/t/no-inbound-rtp/3918/7 "2022-02-08T21:02:17Z")

</div>

I don’t know what you mean. Even when the Producer or the SimulcastConsumer are paused, Consumer’s stats still contains all the inbound-rtp entries.

---

<div class="post-metadata">

**Author:** ![snnz](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/snnz/32/693_2.png) [@snnz](https://mediasoup.discourse.group/u/snnz)\
**Post date:** [February 8, 2022, 9:11pm UTC](https://mediasoup.discourse.group/t/no-inbound-rtp/3918/8 "2022-02-08T21:11:54Z")

</div>

To tell the truth, I didn’t checked this in real environment, but just deduced it from the source code:

```auto
	void SimulcastConsumer::UserOnPaused()
	{
...
		UpdateTargetLayers(-1, -1);
...
	}
...
	inline RTC::RtpStream* SimulcastConsumer::GetProducerCurrentRtpStream() const
	{
		if (this->currentSpatialLayer == -1)
			return nullptr;
...
	}
...
	void SimulcastConsumer::FillJsonStats(json& jsonArray) const
	{
...
		// Add stats of our recv stream.
		auto* producerCurrentRtpStream = GetProducerCurrentRtpStream();

		if (producerCurrentRtpStream)
		{
			jsonArray.emplace_back(json::value_t::object);
			producerCurrentRtpStream->FillJsonStats(jsonArray[1]);
		}
	}

```
