Other inputs and outputs¶
Configuration details for 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¶
Reception of 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 — the pipeline requires at least one audio track. RTSP is a single-program source and is available to SPTS streams only.
Settings:
URI (rtsp://…) — the full session address; Login and Password — the credentials, if the server requires authorization;
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 authorization;
Client timeout — the open and read timeout, 10 seconds by default.
HLS / HTTP input¶
Reception of 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 authorization, 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 analyzers) or output to a device: any device in
/dev, including SDI and ASI cards. 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.
Named pipes (pipe)¶
Reading from a named pipe (FIFO) and writing 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).