RTP I/O mode

Last modified by Simon Morlat on 2024/01/23 12:48

The RTP I/O mode allows the Liblinphone client to forward audio or video as RTP packets from/to an external source/consumer, instead of getting audio or video taken from sound card, camera and screen.
This is an experimental feature that can only be enabled from settings. A typical usage is when the video encoding and RTP sending is performed by an external tool, such as gstreamer.
Here is an example for enabling RTP I/O for video:
 

[video]
rtp_io=1
rtp_map=H264/90000  # the video codec to use
rtp_ptnum=104  # the payload type number to use
rtp_local_addr=127.0.0.1 # the address to listen for incoming RTP packets that will be forward to the remote during the SIP call
rtp_local_port=17076 # the port where to listen for incoming RTP packets, that will be forward to the remote during the SIP call
rtp_remote_addr=127.0.0.1 # the remote ip address where to forward RTP packets received during the SIP call
rtp_remote_port=24000 # the remote port where to forward RTP packets received during the SIP call

Please note that the codec used for RTP I/O must be the same as the one selected for the video call as no transcoding is taking place.

The same properties are available to control audio RTP I/O in the [sound] section.

The properties can be filled programmatically using the Config object, for example in Java langage:
 

Config config = core.getConfig();
config.setInteger("video", "rtp_io", 1);
config.setString("video", "rtp_map", "H264/90000");
/* etc */