Skip to content

RTP/RTSP/SDP input

Register name used to load filter: rtpin
This filter may be automatically loaded during graph resolution.

This filter handles SDP/RTSP/RTP input reading. It supports:

  • SDP file reading
  • RTP direct url through rtp:// protocol scheme
  • RTSP session processing through rtsp:// and satip:// protocol schemes

The filter produces either PIDs with media frames, or file PIDs with multiplexed data (e.g. MPEG-2 TS).
The filter will use:

  • RTSP over HTTP tunnel if server port is 80 or 8080 or if protocol scheme is rtsph://.
  • RTSP over TLS if server port is 322 or if protocol scheme is rtsps://.
  • RTSP over HTTPS tunnel if server port is 443 and if protocol scheme is rtsph://.

The filter will attempt reconnecting in TLS mode after two consecutive initial connection failures.

Options

src (cstr): location of source content (SDP, RTP or RTSP URL)

firstport (uint, default: 0): default first port number to use (0 lets the filter decide)

ifce (str): default interface IP to use for multicast. If NULL, the default system interface will be used

ttl (uint, default: 127, minmax: 0-127): multicast TTL

reorder_len (uint, default: 1000): reorder length in packets

reorder_delay (uint, default: 50): max delay in RTP re-orderer, packets will be dispatched after that

block_size (uint, default: 0x100000): buffer size for RTP/UDP or RTSP when interleaved

disable_rtcp (bool, default: false): disable RTCP reporting

nat_keepalive (uint, default: 0): delay in ms of NAT keepalive, disabled by default (except for SatIP, set to 30s by default)

force_mcast (str): force multicast on indicated IP in RTSP setup

use_client_ports (bool, default: false): force using client ports (hack for some RTSP servers overriding client ports)

bandwidth (uint, default: 0): set bandwidth param for RTSP requests

default_port (uint, default: 554, minmax: 0-65535): set default RTSP port

satip_port (uint, default: 1400, minmax: 0-65535): set default port for SATIP

transport (enum, default: auto): set RTP over RTSP

  • auto: set interleave on if HTTP tunnel is used, off otherwise and retry in interleaved mode if UDP timeout
  • tcp: enable RTP over RTSP
  • udp: disable RTP over RTSP

udp_timeout (uint, default: 10000): default timeout before considering UDP is down

rtcp_timeout (uint, default: 5000): default timeout for RTCP traffic in ms. After this timeout, playback will start out of sync. If 0 always wait for RTCP

first_packet_drop (uint, default: 0, updatable): set number of first RTP packet to drop (0 if no drop)

frequency_drop (uint, default: 0, updatable): drop 1 out of N packet (0 disable dropping)

loss_rate (sint, default: -1, updatable): loss rate to signal in RTCP, -1 means real loss rate, otherwise a per-thousand of packet lost

user_agent (str, default: $GUA): user agent string, by default solved from GPAC preferences

languages (str, default: $GLANG): user languages, by default solved from GPAC preferences

stats (uint, default: 500): update statistics to the user every given MS (0 disables reporting)

max_sleep (sint, default: 1000): set max sleep in milliseconds:

  • a negative value -N means to always sleep for N ms
  • a positive value N means to sleep at most N ms but will sleep less if frame duration is shorter

rtcpsync (bool, default: true): use RTCP to adjust synchronization

forceagg (bool, default: false): force RTSP control aggregation (patch for buggy servers)

ssm (strl): list of IP to include for source-specific multicast

ssmx (strl): list of IP to exclude for source-specific multicast

Was this page helpful?