Port AUDIO - RTP

Stimulation

This port has no stimulus capabilities.

Specifics

Multimedia streams can be sent directly to one or several recipients via IP using the Real-time Transport Protocol (RTP).

The path to an SDP file (Session Description Protocol) must be specified in the testbench configuration. This text file describes the structure of the stream and can also be created manually if the device generating the stream does not provide an SDP file.

The content can look like this, for example:

v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 127.0.0.1
t=0 0
m=audio 5004 RTP/AVP 97
a=rtpmap:97 L16/48000/2
b=AS:1536

In this file information about the stream such as the media type, transport protocol, codec information, and further connection parameters can be defined. Moreover, the file provides essential session and media configuration details required for establishing and interpreting the media exchange. In particular, the line m=audio 5004 RTP/AVP 97 describes that an audio stream arrives on port 5004, which is coded as “dynamic” (RTP/AVP 97). The actual coding of the audio data is described in the line a=rtpmap:97 L16/48000/2. This is a Linear PCM 16 bit stereo audio stream with a sampling rate of 48000 Hz. The ecu.test multimedia RTP audio port currently only supports uncompressed linear PCM 8/16/32 bit audio streams with the payload type “dynamic” (96-127). If several audio streams are described in the SDP file, the first one with a “dynamic” payload type is selected.

An audio stream compatible with this SDP file can be generated using the command line tool ffmpeg, for example:

ffmpeg -re -stream_loop -1 -i test.mp3 -f s16le -acodec pcm_s16le -ac 2 -ar 48000 -f rtp rtp://127.0.0.1:5004

The file test.mp3 is read in an endless loop and sent to port 5004 on localhost with the described format.

Name

Available if

Default value

Valid values

Type

Description

SDP file path

string

Path to the SDP file that describes the RTP stream.

StartRecording

Starts recording

StopRecording

Stops recording