Other inputs and outputs¶
This section describes the configuration of the inputs and outputs briefly listed in the protocol overview (Other inputs and outputs): reception from RTSP sources and over HLS/HTTP, work with files and devices, named pipes and the bridge to external applications. Field names are as shown in the interface.
RTSP input¶
The input receives a video stream from RTSP sources: IP cameras and RTSP servers. The node opens an RTSP session, reads the elementary streams and remultiplexes them into the internal MPEG-TS; the stream then passes through the regular SPTS pipeline. If the source has no audio tracks, a silent MPEG-1 Layer II track is added, because the pipeline requires at least one audio track. RTSP is a single-programme source and is available to SPTS streams only.
Settings:
URI (rtsp://…) — the full session address; Login and Password — the credentials, if the server requires authorisation;
Transport — the RTP transport inside RTSP: UDP (default; low latency, sensitive to packet loss), TCP (traverses NAT and firewalls) or an HTTP tunnel (to pass through HTTP proxies);
User-Agent and Cookies (advanced settings) — for servers with non-standard authorisation;
Client timeout — the open and read timeout, 10 seconds by default.
HLS / HTTP input¶
The input receives MPEG-TS over HTTP: either a regular HLS playlist or a continuous HTTP transfer. By default the mode is detected automatically from the content type of the response; it can be set explicitly if required. For an adaptive playlist, the first variant of the master playlist is used by default; the variant number can be set explicitly (advanced setting). Login and password authorisation, Cookies and a custom User-Agent are supported, as well as playlists that redirect to the playlist of a new session. The input is available to SPTS streams only; for MPTS use UDP / RTP / TCP, a file or a DVB adapter.
Files and devices¶
The file type serves both as an input and as an output:
Output — recording to a TS file (for example, for subsequent diagnostics with external analysers) or output to a device: the MPEG-TS transport stream is written as is to a device node in
/dev, for example an ASI card. For a device, enable the Is device node flag.Input — loop playback from a TS file or capture from a device (for example, DVB-ASI reception — DVB receiver).
The path is set by the File path field — the full path to the file or device.
Note
The node works only with an MPEG-TS transport stream. Uncompressed (baseband) SDI video is supported neither on input nor on output: an SDI capture or playout card will not work with the node. For exchange with a device, use a card that receives or delivers MPEG-TS, for example ASI.
Named pipes (pipe)¶
An input of this type reads from a named pipe (FIFO), an output writes to it. Unlike the std type, the node does not start a child process: the external source or receiver application must be started independently and keep the pipe open on its side. The FIFO path (empty = auto) field sets the path to the pipe; the pipe itself is created by the node (when the input or output starts) and removed when it stops, so a pipe owned by another program should not be specified. With an empty value the node chooses the path automatically. The resulting path is visible in the list of inputs and outputs and in the statistics. Available for SPTS and MPTS.
External applications (std)¶
The std type is a bridge to protocols not supported by the built-in facilities: the MPEG-TS stream is received and transmitted through the standard input/output streams of a third-party console application, which the node starts and supervises itself (restarting it on exit).
Application contract:
input — the application writes MPEG-TS to stdout; write diagnostic messages to stderr only — stdout is reserved for the stream;
output — the application reads MPEG-TS from stdin in batches of 16 TS packets; the batch size is configurable (Packets per write).
Settings: Command (absolute path) — the absolute path to the application; Arguments — the command line (quotation marks preserve spaces inside an argument, a backslash escapes characters); Env names and Env values — the pairs of environment variables passed to the application. The full list of fields with their ranges is in External application (std).
If the receiver of a std, pipe or file output falls behind the stream for a long time, the output goes into the Output queue full error and restarts; the data delivered stay in order. When the application exits with a failure, the end of its stderr is shown in the error text.