Video Streaming Server With Multi-Protocol,Robust And Rich API
Location:Index Page  >  Document  >   Record UDP package

As mentioned earlier, Ti Top Streamer supports MPEG-TS Over UDP protocol and can receive UDP unicast and multicast streams.

We know that UDP is a connectionless data transmission protocol that cannot guarantee the order of data collection, and there are also cases of packet loss, which are common on the Internet. In the internal network environment, similar problems may also be encountered, but they are not as obvious as on the Internet. In addition, the mpegs package itself may also have issues (such as incorrect timestamps). This will lead to some transmission quality issues.

For the convenience of troubleshooting such issues, we provide a recording tool for UDP streams, which will record the received packages into a ts file (currently only supports the Mpeg ts format). You just need to send us the recorded files, and we will conduct a test on our own server to quickly locate the problem.

Here is an introduction to the usage of this tool:

1. Download the recording tool:

wget http://www.ttstream.com/download/xmtools
		
If your server cannot connect to the external network, you can also download it using a local browser first and then upload it to the server. Here is download url: http://www.ttstream.com/download/xmtools

2. Save the downloaded file (xmtools) in the bin directory of the TiTopStreamer installation directory. In general, it is /usr/local/TiTopStreamer/bin

3. Granting executable permissions to the file "xmtools" :
chmod +x xmtools
		
4. Run xmtools to record a certain UDP stream. The command line example is as follows:
./xmtools udpdump --listen 236.27.138.18:7001 --output /tmp/udpdump.ts
		
Just to explain briefly, the --listen above refers to listening, and the following address 236.27.138.18:7001 is the receiving address of a certain UDP stream, in the format of IP address and port (x.x.x: port). --output is the output, followed by a file name (which can include a path).

1): If the IP address above is a multicast address and your server is in a multi network interface environment, you can specify another network interface address to receive this multicast stream. For example:--interface 192.168.101.100

2): If the IP address above is a unicast address and Ti Top Streamer is receiving streams from this address, you must first stop receiving this stream on Ti Top Streamer and then record the stream using the above command. That is to say, Ti Top Streamer and xmtools cannot receive streams from the same unicast stream simultaneously (UDP ports may conflict).

If you want to have a comprehensive understanding of how xmtools receive UDP streams, you can also execute xmtools udpdump - h. In this way, you will receive detailed usage instructions, as shown below:



In addition, please note the output message on the console after the command is executed. For example, When there are multiple "UDP push sources" in your network environment that are pushing UDP streams to the current server, this xmtools will prompt you in the console output when switching to the new "source". This often happens in the test environment. You start pushing on one encoder and forget to stop it. Then you start pushing on another encoder. In this way, chaos will emerge.

When you plan to stop the recording, Just use the command : Ctrl + C

Usually, when you encounter a problem and suspect that there is a problem with the UDP stream, you can use the above command to record the stream. You can record the stream for 30 seconds to 1 minute, not too much. Then, you just need to send the recording file to us, First, we will check this file, and then test it on our own Ti Top Streamer server to see if we can reproduce the problem you encountered.

In this way, we can quickly and accurately locate the issue.