meetecho / janus-gateway

Janus WebRTC Server
https://janus.conf.meetecho.com
GNU General Public License v3.0
8.17k stars 2.47k forks source link

[1.x] videroom: simulcast object in 'attached' message is not documented #3321

Closed gdesmott closed 7 months ago

gdesmott commented 8 months ago

When subscribing to a publisher with simulcast enabled I receive this from Janus:

{
   "janus": "event",
   "session_id": 5357516141901784,
   "transaction": "fI142F1VGStiBQWH5yNRSJlR3cfctf",
   "sender": 4527508631425020,
   "plugindata": {
      "plugin": "janus.plugin.videoroom",
      "data": {
         "videoroom": "attached",
         "room": 8126747226449739,
         "streams": [
            {
               "type": "audio",
               "active": true,
               "mindex": 0,
               "mid": "0",
               "ready": false,
               "send": true,
               "feed_id": 2935669393823058,
               "feed_display": "participant-3c225289-de41-49fd-bf5f-285fb8cf0af3-camera",
               "feed_mid": "0",
               "codec": "opus"
            },
            {
               "type": "video",
               "active": true,
               "mindex": 1,
               "mid": "1",
               "ready": false,
               "send": true,
               "feed_id": 2935669393823058,
               "feed_display": "participant-3c225289-de41-49fd-bf5f-285fb8cf0af3-camera",
               "feed_mid": "1",
               "codec": "vp8",
               "simulcast": {
                  "substream": -1,
                  "substream-target": 2,
                  "temporal-layer": -1,
                  "temporal-layer-target": 2
               }
            }
         ]
      }
   },
   "jsep": {
      "type": "offer",
      "sdp": "v=0\r\no=- 1704986086558952 1 IN IP4 65.108.195.223\r\ns=VideoRoom 8126747226449739\r\nt=0 0\r\na=group:BUNDLE 0 1\r\na=ice-options:trickle\r\na=fingerprint:sha-256 25:4A:C5:A0:4A:BD:1F:63:70:98:7A:4C:C6:5D:D2:0A:2D:40:39:6A:C4:E9:C9:3E:51:25:8F:98:94:D8:F3:E3\r\na=extmap-allow-mixed\r\na=msid-semantic: WMS *\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111\r\nc=IN IP4 65.108.195.223\r\na=sendonly\r\na=mid:0\r\na=rtcp-mux\r\na=ice-ufrag:/94/\r\na=ice-pwd:jYRMW/jnq9dBRUhZPy/oE3\r\na=ice-options:trickle\r\na=setup:actpass\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=fmtp:111 useinbandfec=1\r\na=msid:janus janus0\r\na=ssrc:2098622405 cname:janus\r\na=candidate:1 1 udp 2015363583 65.108.195.223 58783 typ host\r\na=end-of-candidates\r\nm=video 9 UDP/TLS/RTP/SAVPF 96 97\r\nc=IN IP4 65.108.195.223\r\na=sendonly\r\na=mid:1\r\na=rtcp-mux\r\na=ice-ufrag:/94/\r\na=ice-pwd:jYRMW/jnq9dBRUhZPy/oE3\r\na=ice-options:trickle\r\na=setup:actpass\r\na=rtpmap:96 VP8/90000\r\na=rtcp-fb:96 ccm fir\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=rtcp-fb:96 goog-remb\r\na=rtcp-fb:96 transport-cc\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=rtpmap:97 rtx/90000\r\na=fmtp:97 apt=96\r\na=ssrc-group:FID 1181235912 3997749462\r\na=msid:janus janus1\r\na=ssrc:1181235912 cname:janus\r\na=ssrc:3997749462 cname:janus\r\na=candidate:1 1 udp 2015363583 65.108.195.223 58783 typ host\r\na=end-of-candidates\r\n"
   }
}

I didn't find any documentation of the simulcast object and its 4 fields in https://janus.conf.meetecho.com/docs/videoroom

substream-target and temporal-layer-target are not mentioned at all, so I have no idea what those are.

lminiero commented 8 months ago

The -target values are what you asked for, the other too what is currently being sent (-1 by default, since delivery hasn't started yet). Not sure when we added those fields there, but they should be easy to add to the docs.