MPEG2 Transport UDP Sink Syntax

The strings used by the LEAD MPEG2 Transport UDP Sink filter can be one of the following (optional components are enclosed in square brackets):

udp://*ip_address[:port][/*network_card]

rtp://ip_address[:port][/network_card]
tcp://ip_address[:port]

The MPEG2 Transport UDP Sink string specifies the following information:

  1. Whether the data is sent over UDP or TCP. If the data is sent over UDP, whether it is has RTP packets added to it or not. This is indicated by the prefix (udp, rtp, tcp).

  2. IP address of the server sending the data (ip_address)

  3. (Optional) The port to which the data will be sent (port). If no port is specified, 9005 will be used.

  4. (Optional) The IP address of network card sending the data (network_card). If no network card is specified, the default network connection will be used. This can be used only with multicast RTP or UDP streaming.

Data sent to UDP ports can be sent with or without RTP packets. RTP packets provide increased reliability but they add to the overhead, resulting in a slight bitrate increase.

Note that there is a fundamental difference between how the IP address is specified for UDP and TCP streams, as follows:

The format of the string for UDP streaming without RTP packets is as follows:

udp://*ip_address[udp_port][/*network_card]

Component Description
ip_address The IP address where the data should be sent to (the client's IP address). 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.1The 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.The stream is considered to be broadcast if the last number is 255. For example, streaming to 10.1.1.255 will send to all the computers whose IP address starts with 10.1.1
network_card (Optional) The address of the network card sending the data. This is optional if it is missing, the default network card will be used. This is used only for multicast streams.
port (Optional) The port on which to send data to. 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. If you do not specify a port number, 9005 will be used.

The format of the string for UDP streaming with RTP packets is as follows:

rtp://ip_address[:rtp_port][/network_card]

Component Description
ip_address The IP address where the data should be sent to (the client's IP address). 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.1The 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.The stream is considered to be broadcast if the last number is 255. For example, streaming to 10.1.1.255 will send to all the computers whose IP address starts with 10.1.1
network_card (Optional) The address of the network card receiving the data. This is optional - if it is missing, the default network card will be used. This is used only for multicast streams.
port (Optional) The port on which to send data to. 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. If you do not specify a port number, 9005 will be used.

The format of the string for TCP streaming without RTP packets is as follows:

tcp://ip_address[:rtp_port]

Component Description
ip_address The IP address on which to listen for connections and send 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 one of the IP addresses of the sending (server) computer.TCP streams cannot be multicast or broadcast. All TCP streams are assumed to be unicast.
port (Optional) The port on which to listen. 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. If you do not specify a port number, 9005 will be used.

Examples of valid strings:

udp://127.0.0.1:9005 send the Unicast UDP stream to 127.0.0.1 (local computer) on port 9005
udp://224.1.1.1:9005/20.5.1.200 - send the Multicast UDP stream 224.1.1.1 on port 9005 using the network card with the IP address of 20.5.1.200
udp://10.1.1.255:9005 - send the Broadcast UDP stream on port 9005 to all computers with an IP address of 10.1.1.x
tcp://127.0.0.1:9005 send the TCP stream from 127.0.0.1 (local computer) on port 9005
rtp://127.0.0.1:9005 send the Unicast RTP stream to 127.0.0.1 (local computer) on port 9005
rtp://224.1.1.1:9005/20.5.1.200 - send the Multicast RTP stream 224.1.1.1 on port 9005 using the network card with the IP address of 20.5.1.200
rtp://10.1.1.255:9005 - send the Broadcast RTP stream on port 9005 to all computers with an IP address of 10.1.1.x

Note that you can find out the IP addresses of the network connections on your computer on Windows XP by typing the ipconfig command at the DOS prompt. For more information on obtaining your machine's host name, refer to How to Get Your Own IP Address Programmatically.

You may want to use a particular network card if you have two network connections and one is faster than the other. For example, a laptop might be connected to the network with a wireless network card and a regular network wire. In this case, it would be better to use the wired connection because it is faster and more reliable.

Keep in mind that not all the routers will forward multicast and broadcast RTP or UDP packets. In most cases, RTP and UDP packets will not be sent out of the current network. This makes RTP and UDP unsuitable for streaming over the Internet. For streaming over the Internet, use TCP streaming.

The packets of data in TCP streaming are guaranteed to reach the remote destination and are resent if packets are lost. This means TCP streaming requires higher bandwidth than RTP or UDP streaming. Also, a bottleneck in the network traffic could impact the server performance. Weigh the advantages and disadvantages of UDP vs TCP when picking which type of streaming to use.

In TCP streaming mode, the server will disconnect a remote client if it has not read any data in a certain amount of time.

Only one connection at a time is supported by TCP streaming.

Help Version 23.0.2024.9.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Filters C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.