Error processing SSI file
LEADTOOLS Multimedia

Show in webframe

LEADTOOLS multimedia gives some filenames special handling. These filenames follow a syntax similar to an URL (“xxxxx://yyyyyy/zzzz”):

  1. Filenames starting with "http:", "https:", "ftp:" or "mms:" are assumed to be streamed from an URL. Such filenames follow standard URL syntax.
  2. Filenames starting with "ltsf" are assumed to be streamed from a LEAD video streaming server with the LEAD Network Source filter being used as the source filter. The filenames should use ltsf://ip_address[:ltsf_port] as the syntax. These streams require the LEADTOOLS Video Streaming Module. In particular, the LEAD Network Source Filter, LEAD Network Demultiplexer Filter and LEAD Network Protocol Manager are used for this functionality.
  3. Filenames starting with "saic" are assumed to be streamed to a UDP port with the LEAD MPEG-2 Transport Source filter being used as the source filter. Such filenames should use saic://ip_address[/network_card][:udp_port] as the syntax. These streams require the LEAD MPEG-2 Transport Source and LEAD MPEG-2 Transport Decoder filters, which have special licensing requirements.
  4. Filenames starting with "udp" are assumed to be streamed to a UDP port with the LEAD MPEG-2 Transport UDP Source filter being used as the source filter. Such filenames should use udp://ip_address[/network_card][:udp_port] as the syntax. These streams require the LEAD MPEG2 Transport UDP Source and LEAD MPEG2 Transport Demultiplexer.
  5. Filenames starting with "tcp" are assumed to be streamed to a TCP/IP port with the LEAD MPEG-2 Transport UDP Source filter being used as the source filter. Such filenames should use tcp://ip_address[:tcp_port] as the syntax. These streams require the LEAD MPEG2 Transport UDP Source and LEAD MPEG2 Transport Demultiplexer.
  6. Filenames starting with "rtsp" are assumed to be streamed from an RTSP server with the LEAD MPEG-2 Transport RTSP Source filter being used as the source filter. These filenames should use rtsp://[username[:password]@]ip_address[:rtsp_port]/server_URL[?param1=val1[&param2=val2]] as the syntax. These streams require the LEAD RTSP Source filter.
  7. Filenames starting with "onvif" are assumed to be streamed from an ONVIF server with the LEAD ONVIF Source filter being used as the source filter. These filenames should use onvif[s/u]://[username[:password]@]ip_address/server_URL[?param1=val1[&param2=val2]] as the syntax. These streams require the LEAD ONVIF Source filter.
Anything else is assumed to be a regular file and the regular DirectShow rendering mechanism is used.

Syntax for strings prefixed with “ltsf”

ip_address The IP address from where the data will be sent. The address can be in the usual Ipv4 format (xx.xx.xx.xx) or it can be a valid host address accepted by the standard inet_addr function. For example, localhost is equivalent to 127.0.0.1. This is the IP address of the sending (server) computer. Note that a computer with multiple network adapters might support multiple addresses.
ltsf_port (Optional) The port on which to listen. The server will listen for connections on this port. The port must be a number from 1 to 65535. Note that you must make sure the port is open if you are running firewall software. The default value it 27015.

Syntax for strings prefixed with "saic" and “udp”

ip_address The IP address to which the data is being sent. The address can be in the usual Ipv4 format (xx.xx.xx.xx) or it can be a valid host address accepted by the standard inet_addr function. For example, localhost is equivalent to 127.0.0.1. This is usually the IP address of the receiving (client) computer. The stream is considered to be multicast if the first number in the Ipv4 address is between 224..239 (0xE0 .. 0xEF). If the first number is not in this range, the stream is unicast.
network_card (Optional) The address of the network card receiving the data. Used only for multicast streams. This is optional - if it is missing, the default network card will be used.
udp_port (Optional) The port on which to listen. The server will listen for connections on this port. The port must be a number from 1 to 65535. Note that you must make sure the port is open if you are running firewall software.
paramN=valN (Optional, valid only with udp prefix). Parameters used to describe the format of RTP streams containing dynamic payloads for certain raw samples. Right now, this is used only with raw H264 streams. See Note 1 below for the possible values of parameters and values. Multiple parameter pairs should be separated using the '&' character.

Syntax for strings prefixed with “tcp”

ip_address The IP address from where the data will be sent. This can be in the usual Ipv4 format (xx.xx.xx.xx) or it can be a valid host address accepted by the standard function inet_addr. For example, localhost is equivalent to 127.0.0.1. This is usually the IP address of the sending (server) computer.
TCP streams cannot be multicast. All TCP streams are assumed to be unicast.
tcp_port (Optional) The port on which to listen. The server will listen for connections on this port. The port must be a number from 1 to 65535. Note that you must make sure the port is open if you are running firewall software.

Syntax for strings prefixed with “rtsp”

ip_address The IP address of the server sending the data. This can be in the usual Ipv4 format (xx.xx.xx.xx) or it can be a valid host address accepted by the standard function inet_addr. For example, localhost is equivalent to 127.0.0.1. This is usually the IP address of the sending (server) computer.

RTSP streams cannot be multicast. All RTSP streams are assumed to be unicast.

tcp_port (Optional) The port on which the server is listening for RTSP commands. The port must be a number from 1 to 65535. If absent, the default RTSP port (554) will be used.
username (Optional) For servers that use authentication, you can pass a username as part of the connection string. Passing the username and password will avoid the message box asking for the username and password. If you pass the username and password but still get the message box, the server has rejected supplied username and/or password.
password (Optional) For servers that use authentication, you can pass a username and password as part of the connection string. Passing the username and password will avoid the message box asking for the username and password. If you pass the username and password but still get the message box, the server has rejected supplied username and password.
server_URL The URL of the server RTSP. You obtain this from the server documentation.
paramN=valN (Optional) These parameters will be passed to the RTSP server. These parameters are server-dependent and you should consult the server's documentation for more information. They are commonly used for influencing the server's behavior: you can change the video or audio compression, video size, etc. See the Note 2 below for possible values and rtsp command examples. Multiple parameter pairs should be separated using the '&' character.

Syntax for strings prefixed with “onvif”

ip_address or UUID The IP address of the server sending the data or a universally unique identifier. The IP address can be in the usual Ipv4 format (xx.xx.xx.xx), or it can be a valid host address accepted by the standard function inet_addr. For example, localhost is equivalent to 127.0.0.1. This is usually the IP address of the sending (server) computer.
username (Optional) For servers that use authentication, you must pass a username and password as part of the connection string.
password (Optional) For servers that use authentication, you must pass a username and password as part of the connection string.
server_URL The server's web service endpoint. The standard server URL is "/onvif/device_service", but not all devices may follow the standard. In this case, you would need to obtain this from the server documentation.
paramN=valN (Optional) These extra parameters will modify the filter or server's behavior.

Note 1: Parameters used to describe raw H264 video streams

H264 streams sent inside RTP packets use dynamic payloads with a payload type between 96 and 127. These streams can be decoded only when there is extra information being sent using a separate communication channel. The most common method of sending this extra information is through a Session Description Protocol (also known as SDP). The SDP will contain extra information describing the stream. The UDP source needs to know the following information:

The UDP source needs to know this information in order to process these streams. There are two useful parameters right now (rtpmap and fmtp) and their syntax is described below:

rtpmap=payload_type;compression/RTP_units_per_second

Parameter Description
payload_type The payload type. This value should be between 96 and 127.
compression The string describing the compression. Right now, only H264 is supported.
RTP_units_per_second The number of RTP units per second. This value is usually 90000.

These values are usually sent in the SDP information via the a=rtpmap line, as in the following example:

a=rtpmap:99 H264/90000

This should be translated by replacing the space with semicolon (';) into

rtpmap=99;H264/90000

So, the URL syntax for a H264 stream sent to port 40000 containing RTP packets with a payload of 99 and with sequence header packets (NAL units 7 and 8) sent inside the compressed stream is something like this:

udp://192.168.1.100:40000?rtpmap=99;H264/90000

fmtp=payload_type;sprop-parameter-sets="seq1,seq2,...,seqN"

Parameter Description
payload_type The payload type. This value should be between 96 and 127. It should match the value in the rtpmap parameter.
seqN

The base64 encoding of the sequence parameter. When there are several sequence headers, they are separated with a comma ( , ). Usually, there are two sequence headers. A double quote ( " ) should be added at the beginning and end of the sequence list.

Note that the three dots would not be passed in the string. They are there only to indicate there could be other seq values between seq2 and seqN.

These values are usually sent in the SDP information via the a=fmtp line, as in the following example:

a=fmtp:96 packetization-mode=1; profile-level-id=420029; sprop-parameter-sets=Z0IAKeKQFge2BqwYBBuHiRFQ,aM48gA==

In the above example, there are two sequence header strings following the sprop-parameter-sets, separated with a comma. The UDP source filter is interested only in the sprop-parameter-sets field, so this line should be translated into:

fmtp=96;sprop-parameter-sets="Z0IAKeKQFge2BqwYBBuHiRFQ,aM48gA=="

And this pair should be appended to the URL to form something like this:

udp://192.168.1.100:40000?rtpmap=99;H264/90000&fmtp=96;sprop-parameter-sets="Z0IAKeKQFge2BqwYBBuHiRFQ,aM48gA=="

The above URL syntax describes a stream streaming on port 40000, with H264 data inside RTP packets with payload type set to 99, with 90000 RTP units per second and whose sequence headers are not part of the stream. Instead, they are passed through the sprop-parameter-sets component of the fmtp parameter.


Note 2: Examples of RTSP Commands

RTSP servers are usually listening for commands sent to a specific port. The commands can ask the server to describe the stream at a certain URL, to start, pause or stop playback.

In addition, some servers allow the client to pass customization parameters to the server. These commands can change the compression used by the server, the video size, etc. These parameters are server-dependent and you should consult the server's documentation for information on the possible parameters supported by the server. You can see below an example of a command sent to a server to change the compression to JPEG. Again, keep in mind that this command might not work for another RTSP server.

Some RTSP Servers require the use of authentication to restrict access only to authorized users. In these cases, the RTSP Source Filter might display a login message box asking for a username and password. If you know the username and password beforehand, you can pass it as part of the URL to avoid the message box from appearing. Note that the message box still might appear if the supplied username and/or password information is incorrect.

rtsp://192.168.0.164/axis-media/media.amp - connect to an RTSP server running on 192.168.0.164 at the "axis-media/media.amp" URL. The data will be streamed using the default compression.

rtsp://root:pass@192.168.0.164/axis-media/media.amp?videocodec=jpeg - connect to an RTSP server running on 192.168.0.164 at the "axis-media/media.amp" URL. The data will be streamed using JPEG compression. This server is using authentication, and we are connecting as username 'root' and with the password 'pass' in order to avoid having to enter a username and password.


Error processing SSI file