RTP Forwarding Live room to Streaming plugin with simulcasting

I think i might be missing something from the documentaions both on Streaming plugin and videoroom plugin. I am new to janus and webrtc trying to learn how it works.

I am trying to forward rtp streams from videoroom to streamplugin with simulcasting on:

stream mount point:

{
                request: 'create',
                id: streamID,
                type: 'rtp',
                name: 'new_room',
                description: 'Bubble (' + roomID + ')',
                data: false,
                is_private: false,
                videosimulcast: true,
                media: [{
                    type: "audio",
                    mid: "0",
                    port: audioPort,
                    pt: 111,
                    label: "Audio stream",
                    codec: "opus"
                }, {
                    type: "video",
                    mid: "1",
                    port: videoPort,
                    label: "Video stream",
                    pt: 100,
                    codec: "vp8"
                }]
            }

rtp_forward:

{
            request: 'rtp_forward',
            room: roomId,
            publisher_id: publisher_id,
            host: mountPosintip,
            streams: [{
                    mid: '0',
                    port: aport
                },
                {
                    mid: '1',
                    port: vport,
                    simulcast: true
                }
            ],
        }

I do not get video in the streaming plugin, only audio. I start getting video when i open the video room in the videoroom plugin. But when i close it it also disapear after some times. Also i cannot change to High/Medium streams.

Both the mountpoint and the RTP forwarder must use the port/port2/port3 (port_2 and port_3 in the VideoRoom) functionality, since each simulcast substream must be sent separately from the others. You’re doing a weird mix where you’re only sending/receiving a single substream. The docs explain how, if you look for the keywords I mentioned.

Thanks for quick repy. I rechecked the videoRoom plugin for ports. I am sure there is something i am not understanding from the documentation. Kindly help me point it out.

Mount Point

{
                request: 'create',
                id: streamID,
                type: 'rtp',
                name: 'new_room',
                description: 'xxx (' + roomID + ')',
                data: false,
                is_private: false, 
                media: [{
                    type: "audio",
                    mid: "0",
                    port: audioPort,
                    pt: 111,
                    label: "Audio stream",
                    codec: "opus"
                }, {
                    type: "video",
                    mid: "1",
                    port: videoPort,
                    videoport2: videoPort + 2,
                    videoport3: videoPort + 4,
                    label: "Video stream",
                    pt: 100,
                    codec: "vp8",
                    videosimulcast: true, //i added to see what will change
                    simulcast: true //i added to see what will change
                }]
            }

RTP Forwarding:

.....
streams: [{
                    mid: '0',
                    port: aport
                },
                {
                    mid: '1',
                    port: vport,
                    pt: 100,
                    port_2: vport + 2,
                    pt_2: 100,
                    port_3: vport + 4,
                    pt_3: 100,
                    simulcast: false
                }
            ],
forwarders: [
    {
      stream_id: 4155480195,
      host: ip,
      port: 25102,
      type: 'audio'
    },
    {
      stream_id: 2745133396,
      host: ip,
      port: 19981,
      type: 'video',
      pt: 100
    },
    {
      stream_id: 2179275507,
      host: ip,
      port: 19983,
      type: 'video',
      pt: 100,
      substream: 1
    },
    {
      stream_id: 2638917353,
      host: ip,
      port: 19985,
      type: 'video',
      pt: 100,
      substream: 2
    }
  ],

From the streaming plugin example, i get simulcast and only receiving the LOW Simulcast only, i cannot change to Medium and High.

When i stop and watch the stream again/ or switch substream, i get

We need a PLI for the simulcast context

That’s because you’re passing videoport2 and videoport3 to create: with the new API it’s just port2 and port3 (you’re already passing port for instance, which is the low res you’re indeed getting).

changed to port port2 and port3 while creating mountpoint. I keep getting We need a PLI for the simulcast context when i stop and watch again the stream

You didn’t configure RTCP. Plenty of posts here that talk about that, but again, the documentation will tell you how to use it on both sides.

Thanks, I was able to get it working after setting rtcp_port and rtcpport both on videoroom and streaming plugin.

1 Like