Closed mail2mhossain closed 12 months ago
The whole team is on vacation, we'll have a look when we're back in a few weeks.
An offer containing streams with simulcast will have extra attributes for rid negotiation and the RTP stream will also have extensions to support that. Maybe your rtc stack is not capable of handling those extras and will either fail the negotiation or will be unable to decode the RTP stream.
From an API perspective the only thing you need to get a simulcast stream is just adding substream
and temporal
fields to the streams
array elements in the subscribe
request.
So, I need to add substream
and temporal
fields as follows:
{ "handle_id": 2034943113457475, "body": { "streams": [ { "feed": 3929900983627935, "mid": "0", "substream": 1, "substream-target": 2, "temporal-layer": -1, "temporal-layer-target": 2 } ], "request": "join", "ptype": "subscriber", "room": 2887853390818590, "display": "8801713032885", "muted": false }, "session_id": 6348774939895119, "janus": "message", "transaction": "ef60791a-6f6f-44e0-8532-86ca310496c0" }
Still did not get feed from simulcast enable device.
BTW: Say, one is publishing and subscribing video with simulcast enabled way. Another one is publishing and subscribing without simulcast.
A -> simulcast enabled device: connected to Janus server B-> simulcast disabled device (means its rtc stack do not support simulcast): connected to Janus server C-> simulcast disabled device (means its rtc stack do not support simulcast): connected to Janus server
Scenario 1: A is publishing and subscribing video and successfully getting video of B & C. Scenario 2: B is publishing and subscribing video, getting video of C BUT not getting video of A. Scenario 3: C is publishing and subscribing video, getting video of B BUT not getting video of A.
In scenario 2 or 3, can Janus send video without adding extra attributes so that device B or C can handle RTP stream without doing extra job, means without implementing simulcast support in their rtc stack? Say, Janus will always forward the highest quality video of A to B and C.
Sorry for the confusion, but the extra simulcast parameters are in the publishing leg, not in the subscribing one. I'll try to be more clear.
When publishing simulcast streams, enabled stacks will add rtp extensions and additional parameters in the negotiation.
When subscribing to a simulcast pub, peers just see a single rtp stream (like non-simulcast publishers) and Janus will notify the availability of different simulcast layers through the API. Users can switch simulcast layers through the same API (the parameters substream
and temporal
I was mentioning before).
Please refer to the plugin API here.
In case of missing parameters about which layer to receive, Janus just picks a default (I don't remember which one off top of my head).
About your scenarios, I tried with my browser opening 3 tabs on the mvideoroom demo, one with simulcast enabled (add "?simulcast=yes" to the url) and 2 without simulcast. Every tab was able to see the others, so an issue in the sfu is unlikely.
Some troubleshooting steps:
Janus message flow for a peer that is unable to see a simulcast stream:
The peer connection is being successfully established. The JSEP answer from sipsorcery looks "too short" with some parameters (often negotiated by rtc stacks) lacking, anyway I'm not sure that might be an issue.
Please try to get an unencrypted dump of the subscriber traffic through the Admin API, that will tell us if the bitstream is playable or not.
pcap_in_text_with_simulcast.zip
This video we can't process with SipSorcery.
You need to capture the subscriber side, not the publisher side. That said, I extracted the three video streams from the pcap and, with janus-pp-rec
, they all work just fine.
Attaching pcap_as_subscriber_of_simulcast.txt. I'll send our client tool too so that you can check. pcap_as_subscriber_of_simulcast.txt
Using the same process (text2pcap, pcap2mjr, janus-pp-rec) I got a playable video out of it, which means the video is fine. The only thing I noticed is that it plays at Benny Hill speed (very fast). Not sure if it's a problem in how the video is encoded by the publisher. But apart from that, it's a working RTP video stream, which again means the problem is in SipSorcery, not Janus. Closing the issue.
As a simulcast publisher, we provide a range of video qualities, including low, medium, and high, to Janus. If you are a subscriber without simulcast support, which quality of video would you receive from Janus: low, medium, or high?
If you are a subscriber without simulcast support
All subscribers are without simulcast support. Simulcast support is only needed on the publisher side: on the subscriber side, the VideoRoom plugin automatically only sends a single video stream, choosing one of the available ones.
FYI: SipSorcery only supports VP8 & H264 Video codecs.
I am currently utilizing the 'SipSorcery' library, a .Net Core webRTC solution. However, I'm facing difficulties since this library does not support simulcast. When a device publishes video in a video room without simulcast, I am able to subscribe to and receive the video feed without any issue.
The problem arises when a device publishes a video with simulcast. In this case, I am not receiving any video feed. I am wondering if there are any additional parameters that I need to include in my subscription message so that Janus will provide me with the feed.
Below is my current subscription message for reference:
When the 'attached' event is triggered, I receive the following message:
Any guidance or assistance you can provide on this matter would be greatly appreciated.