Reserving mids via dummy publishers

We want to reserve %MY_GRID_SIZE% mids on each subscriber’s PC to speed up the subscription process when a new publisher joins. For every new publisher, we could switch between dummy and real streams. Ideally, after that, we would have just a single SDP exchange for each subscriber.

Before we start implementing this, I have a couple of questions for the knowledgeable and experienced Janus community:

  1. Is this a good idea? Could anything go wrong, even if all the publishers use the same codec, such as VP8?
  2. Is it a good strategy to reserve some mids for VP8 and others for AV1, having 50+ mids in SDP?
  3. Are there problems with simulcast and SVC?

This is exactly the reason why we implemented dummy publishers, because a company we consult for wanted to avoid renegotiations and just pre-allocate a fixed number of audio/video slots that they could then switch to/from. As such, I’d say that yes, it is a good idea if you have frequent changes in a subscriber’s media topology. Of course it assumes the same codec is used for a specific mid/m-line when you change the source: there’s no problem if some m-lines use VP8 and some AV1, what’s important is that you only use VP8 sources for VP8 lines, and AV1 sources for AV1 lines, or video simply won’t work. Simulcast and SVC are reset when you switch so they should be fine.

2 Likes

Thanks!
I have one more question, if you don’t mind:
have you ever encountered a situation where switching between streams with the same codec didn’t work because the remote senders had different codec presets, possibly due to device or browser-specific settings?

I haven’t done much testing myself, for the feature, so I wouldn’t know. I’d suggest you to start experimenting with it to see what works for you and what doesn’t.

1 Like