# RTP Forwarding Live room to Streaming plugin with simulcasting

**URL:** <https://janus.discourse.group/t/rtp-forwarding-live-room-to-streaming-plugin-with-simulcasting/1296>\
**Category:** General\
**Created:** [September 17, 2024, 1:14pm UTC](https://janus.discourse.group/t/rtp-forwarding-live-room-to-streaming-plugin-with-simulcasting/1296 "2024-09-17T13:14:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![braysonjohn](https://yyz2.discourse-cdn.com/free1/user_avatar/janus.discourse.group/braysonjohn/32/282_2.png) [@braysonjohn](https://janus.discourse.group/u/braysonjohn)\
**Post date:** [September 17, 2024, 1:14pm UTC](https://janus.discourse.group/t/rtp-forwarding-live-room-to-streaming-plugin-with-simulcasting/1296/1 "2024-09-17T13:14:19Z")

</div>

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:

```auto
{
                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:

```auto
{
            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.

---

<div class="post-metadata">

**Author:** ![lorenzo](https://yyz2.discourse-cdn.com/free1/user_avatar/janus.discourse.group/lorenzo/32/425_2.png) [@lorenzo](https://janus.discourse.group/u/lorenzo)\
**Post date:** [September 17, 2024, 1:25pm UTC](https://janus.discourse.group/t/rtp-forwarding-live-room-to-streaming-plugin-with-simulcasting/1296/2 "2024-09-17T13:25:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![braysonjohn](https://yyz2.discourse-cdn.com/free1/user_avatar/janus.discourse.group/braysonjohn/32/282_2.png) [@braysonjohn](https://janus.discourse.group/u/braysonjohn)\
**Post date:** [September 17, 2024, 3:46pm UTC](https://janus.discourse.group/t/rtp-forwarding-live-room-to-streaming-plugin-with-simulcasting/1296/3 "2024-09-17T15:46:47Z")

</div>

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**

```auto
{
                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:**

```auto
.....
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
                }
            ],

```

```auto
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

---

<div class="post-metadata">

**Author:** ![lorenzo](https://yyz2.discourse-cdn.com/free1/user_avatar/janus.discourse.group/lorenzo/32/425_2.png) [@lorenzo](https://janus.discourse.group/u/lorenzo)\
**Post date:** [September 17, 2024, 4:07pm UTC](https://janus.discourse.group/t/rtp-forwarding-live-room-to-streaming-plugin-with-simulcasting/1296/4 "2024-09-17T16:07:58Z")

</div>

> [@braysonjohn](#):
>
> From the streaming plugin example, i get simulcast and only receiving the LOW Simulcast only

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).

---

<div class="post-metadata">

**Author:** ![braysonjohn](https://yyz2.discourse-cdn.com/free1/user_avatar/janus.discourse.group/braysonjohn/32/282_2.png) [@braysonjohn](https://janus.discourse.group/u/braysonjohn)\
**Post date:** [September 17, 2024, 4:45pm UTC](https://janus.discourse.group/t/rtp-forwarding-live-room-to-streaming-plugin-with-simulcasting/1296/5 "2024-09-17T16:45:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lorenzo](https://yyz2.discourse-cdn.com/free1/user_avatar/janus.discourse.group/lorenzo/32/425_2.png) [@lorenzo](https://janus.discourse.group/u/lorenzo)\
**Post date:** [September 17, 2024, 5:01pm UTC](https://janus.discourse.group/t/rtp-forwarding-live-room-to-streaming-plugin-with-simulcasting/1296/6 "2024-09-17T17:01:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![braysonjohn](https://yyz2.discourse-cdn.com/free1/user_avatar/janus.discourse.group/braysonjohn/32/282_2.png) [@braysonjohn](https://janus.discourse.group/u/braysonjohn)\
**Post date:** [September 17, 2024, 9:44pm UTC](https://janus.discourse.group/t/rtp-forwarding-live-room-to-streaming-plugin-with-simulcasting/1296/7 "2024-09-17T21:44:57Z")

</div>

> [@lorenzo](#):
>
> RTCP

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