No inbound-rtp ?

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!

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.

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.

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.

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

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

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.

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

	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]);
		}
	}