Libnemesi - the RTSP/RTP client library

Libnemesi let you add multimedia streaming playback in your applications in a quick and straightforward way. This software, derived from the experience matured with NeMeSi is fully compliant with IETF's standards for real-time streaming of multimedia contents over Internet. libnemesi implements RTSP – Real-Time Streaming Protocol (RFC2326) and RTP/RTCP – Real-Time Transport Protocol/RTP Control Protocol (RFC3550) supporting the RTP Profile for Audio and Video Conferences with Minimal Control (RFC3551).

The library provides two different API:

Libnemesi leverages the netembryo network support and provides hooks to register custom depacketizers (rtp parsers) to have a good compromises between ease of use and flexibility.

libnemesi hasn't been released yet, you can fetch it from our public git tree or use a snapshot

MPlayer has support for libnemesi and currently it is the main testbed for improvements.

libnemesi is released under the GNU Lesser General Public License version 2.1

Dependencies

Libnemesi internals

Libnemesi is implemented with several nested threads dispatched for every session. Within the main thread we send requests to the various servers identified by an RTSP Controller structure, then a thread is dispatched to handle responses.

  • First of all by calling rtsp_init we create an RTSP thread which handles incoming RTSP packets.
  • The RTSP thread as soon as it receives a valid SETUP response from the server creates two different threads to handle RTP and RTCP packets
  • The RTP thread as soon as its created initializes the various parsers for the session
  • Then all the threads will run handling the packets of their specific layer until the RTSP thread for the given session is terminated.

This is a brief documentation of the various layers involved in libnemesi

libnemesi Reference: Doxygenerated reference for libnemesi

RTSP Layer: How the RTSP layer in libnemesi works

RTP Layer: Quick description of the RTP layer in libnemesi

RTCP Layer: How libnemesi implements the RTCP protocol

SDP parser: Libnemesi implements a simple SDP parser for sessions. This is how it works