ORTC to SDP and back on the server

Hello,

I’ve been trying to convert ORTC to SDP-offer and SDP-answer to ORTC on the server side, but unsuccessfuly.
Could anyone share a code snippet that performs such operations, please?

Are you trying to do something with mediasoup or mediasoup-client, or is this a totally out of the scope question?

mediasoup does not know about SDP at all, it understands ORTC. mediasoup-client on the other side understands SDP and transparently handles different browsers in order to provide ORTC objects to mediasoup.

For server side there is libmediasoupclient which is basically a C++ version of mediasoup-client.

Please make sure you carefully read the docs before posting your question.

I’m using mediasoup but can’t use mediasoup-client.
I’ve looked everywhere but couldn’t find a straightforward solution for converting SDP to ORTC and back on the server side. I understand that the mediasoup-client does it somehow but I can’t replicate it on the server.

That’s probably because there is not any “straightforward solution” for converting SDP to ORTC and vice-versa. So if you are looking for something like that, just forget about it.

If you really understand how SDP works and how like-ORTC parameters produced/needed by mediasoup work, then you should inspect the code of mediasoup-client in depth.

BTW we also did that in mediasoup v1, but if course the ORTC parameters have changed lot since v1:

BTW: Why do you need to convert between SDP and ORTC? are you sure you are asking for the right question?

BTW: Why do you need to convert between SDP and ORTC? are you sure you are asking for the right question?

Is there a way to establish a peer connection with mediasoup and not use mediasoup-client ?

Of course, but you should do something similar to… to what mediasoup-client does.

Still I don’t know why need SDP to ORTC conversion. Honestly you are not providing much info. BTW if you are using FFMpeg or GStreamer or similar, take a look to this: