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

Based on the introduction of   Overview  , We know that in the source types of Ti Top Streamer, in addition to RTMP Push streaming, it also supports pull the stream from external third-party systems (including RTMP streaming, RTSP streaming, mpeg ts over udp, and SRT streaming) Regards of these stream, We call them source stream in this article.

1. Pulling RTMP streams from external third-party systems


To pull an RTMP stream from an external third-party system, you must have a URL for that RTMP stream. e.g. rtmp://192.168.10.102:1935/live/cctv1, It usually contains one audio track and one video track, but it may also contain only one video track or only one audio track. These scenarios may all exist.

If this stream comes from the public network, usually the host part in this URL is a domain name, e.g. rtmp://xxx.xxx.com:1935/live/cctv1. Whether it is a domain name or IP address, the protocol and process for RTMP streaming are the same without any difference. When using a domain name, your server must first configure the address of the domain name resolution server.

Sometimes, the URL of this RTMP stream does not include a port, e.g. rtmp://xxx.xxx.com/live/cctv1. In this case, We will use 1935 in default.

Sometimes, It will include some url query paramter like "?token=xxxxxxxxxxxxxxx" in the rtmp url, e.g. rtmp://xxx.xxx.com/live/cctv1?token=xxxxxxxxxxxxxxxxx, It's also ok.

The above scenarios are very common, you don't have to worry, Ti Top Streamer fully supports the them.

Notes:

A. Strong recommend you try to playback the stream by this rtmp url before you start to set it on the Ti Top Streamer. If it cannot play properly, please check your network configuration first and confirm that the stream provided by the other party is in a normal state.

B. Ti Top Streamer support H.264 and H.265 video and AAC audio. If you try to use other codec (e.g. G.711 audio), Ti Top Streamer doesn't support it.

Next, We will now introduce how to pull this rtmp stream from an external third-party system to the Ti Top Streamer:

Firstly, create an Application with a source type of RTMP Pull, as shown in the following figure::

rtmp

Then, we add an rtmp stream to this Application, as shown in the following figure:

rtmp



2. Pulling RTSP stream from IP cameras or third-party systems


RTSP streams usually come from IP cameras. Of course, there are also some platforms that support RTSP output. It doesn't matter where these RTSP streams come from. Ti Top Streamer follows the standard RTSP protocol and can pull the corresponding audio and video stream based on an RTSP URL.

Pulling RTSP streams from external sources is logically the same as the previously introduced method of pulling RTMP streams. They are all initiated by Ti Top Streamer, parsing URLs, and then making requests to the target host. After signaling interaction, the peer begins to transmit audio and video stream data to Ti Top Streamer.

It should be noted that according to the RTSP protocol, audio and video streams can be transmitted through TCP or UDP. The signaling and audio and video streaming transmission of RTMP are both based on TCP. This is their difference.

Note:

A. Strong recommend you try to playback the stream by this rtmp url before you start to set it on the Ti Top Streamer. If it cannot play properly, please check your network configuration first and confirm that the stream provided by the other party is in a normal state.

Next, we will introduce how to pull this rtsp stream into Ti Top Streamer from an external third-party system:

Firstly, create an Application with a source type of RTSP pull, as shown in the following figure:

rtmp

Then, we add an RTSP stream to this Application, as shown in the following figure:

rtsp



3. Receive MPEG-TS stream through UDP



MPEG-TS is a format for audio and video packets. You can continuously send this type of audio and video packet to a destination address through the UDP channel. This method is commonly used in the distribution of television program signals in the field of broadcasting and television (such as from encoders to IPTV platforms)

Ti Top Streamer can listen on a UDP port and then receive MPEG-TS streams from this UDP channel. This type of source stream is also known as MPEG-TS Over UDP.

Next, we will introduce how to receive MPEG-TS streams through UDP:

Firstly, create an Application with the source type "MPEG-TS Over UDP", as shown in the following figure:

mpegts

Then, we add an MPEG-TS stream to this Application, as shown in the following figure:

mpegts

Note: The host address "0.0.0.0" means that Ti Top Streamer will listen the udp packets on each network interface when your server have multiple network interface. Of course, If you have already made it clear that you want to listen on a certain network interface, please use a specific IP address.



4. Receive SRT stream



The full name of "SRT" is Secure Reliable Transport. About it, You can learn more fromhttps://github.com/Haivision/srt/.

Next, we will introduce how to receive SRT streams:

Firstly, create an Application with the source type SRT (Listener Mode), as shown in the following figure:

srt

Then, we add an SRT stream to this Application, as shown in the following figure:

srt

Note: At present, Ti Top Streamer can only receive SRT streams in Listener Mode, and support for Caller mode will be added in the future.