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] "Can't add 'rtsp' mountpoint, missing mandatory information" On valid RTSP multistream setup #3435

Closed slomas04 closed 2 days ago

slomas04 commented 2 days ago

What version of Janus is this happening on? 1.3.0 commit c0d00f650e96d94065368d6bf0214d3ec4a851a9

Have you tested a more recent version of Janus too? no

Was this working before? This is my first time using Janus, but I followed janus.plugin.streaming.jcfg to a T.

Is there a gdb or libasan trace of the issue? There is no trace related to this issue.

Additional context I have been attempting to make a multistream setup for two IP cameras on my network that serve an RTSP stream. When the streams are separate, I am able to watch them with Janus without issue, but I would prefer being able to view both of them at the same time (hence the multistream).

This is the setup in janus.plugin.streaming.jcfg

        type = "rtsp"
    id = 42
    description = "Set of RTSP Streams for IP cameras (1 4:3, 1 16:9)"
    media = ({
                type = "video"
                mid = "v1"
                label = "Video stream #1"
                url="rtsp://verycoolipaddress/media/video1"
                rtsp_user = "username"
                rtsp_pwd = "password"
                codec = "h264"
            },{
                type = "video"
                mid = "v2"
                label = "Video stream #2"
                url="rtsp://evencoolerbutseparateipaddress/media/video1"
                rtsp_user = "username"
                rtsp_pwd = "password"
                codec = "h264"
            }
        )
    secret="themostsecretsecretthateversecreted"
}

Upon launching the Janus server, I recieve this error in return: [plugins/janus_streaming.c:janus_streaming_init:2722] Can't add 'rtsp' mountpoint 'IP-cameras', missing mandatory information...

As far as I know, I am not missing anything. I have consulted both the documentation for the streaming plugin and the guide provided in the jcfg file itself.

lminiero commented 2 days ago

An RTSP mounpoint consumes an RTSP stream, it doesn't serve one. As such, you need to provide the RTSP address of the server to pull packets from, which is not in your config, so the error is correct. That said, even in that case, we currently don't support multistream for RTSP.

lminiero commented 2 days ago

I see now that you've put an RTSP url in each media stream: that's not how it works. You put the RTSP url in the mountpoint, not the invidivual streams. As such, you can only have one RTSP source per mountpoint. If you want to serve two different cameras, you need two separate mountpoints.

Please refer to the group for further discussion, since we only use Github for code issues and bugs.

slomas04 commented 2 days ago

I see now that you've put an RTSP url in each media stream: that's not how it works. You put the RTSP url in the mountpoint, not the invidivual streams. As such, you can only have one RTSP source per mountpoint. If you want to serve two different cameras, you need two separate mountpoints.

Please refer to the group for further discussion, since we only use Github for code issues and bugs.

Understood. Thank you for the help!