Q1.How does the decoder receive external RTMP stream decoding output - Decoder Series - kiloview

Q1.How does the decoder receive external RTMP stream decoding output

12/25/2025 / 1447

Problem Background

The user's D260 port 1 is used for management and internal streaming media transmission, while port 2 is used to receive external RTMP streams.

However, the URL generated by RTMP Server cannot be changed to a public IP address and is grayed out.

So how to use D260 to receive external RTMP streams?

Instructions

The transmission process of RTMP streaming service

RTMP (Real Time Messaging Protocol) is a protocol used for real-time streaming media transmission, commonly used in audio and video live streaming and on-demand systems.

The transmission process of RTMP streaming media is an end-to-end real-time audio and video data transmission process.

Client streaming, RTMP server receiving and forwarding data, watching client pull streaming and playing real-time content.

The entire process relies on efficient network connections and flow control mechanisms to ensure smooth transmission of real-time audio and video content.

The transmission process of RTMP streaming media can be divided into the following main steps:
1. Client initiates connection

The client (such as live streaming software) connects to the server through the RTMP protocol, usually by specifying an RTMP server URL (such as rtmp://example.com/live/stream )Come and connect.
The client uses RTMP protocol to establish a persistent TCP connection with the server, which ensures real-time data transmission.

2. The client sends streaming data

Push streaming: The client encodes audio and video data streams (such as audio and video content captured by cameras and microphones) into a format suitable for transmission (usually H.264 video encoding and AAC audio encoding), then divides these encoded data into small packets and pushes them to the RTMP server through the RTMP protocol.

Data is usually divided into multiple small packets (such as each packet containing a timestamp and a small audio and video data block) and transmitted to the server through the network.

3. RTMP server receives and forwards data

After receiving the audio and video streams pushed by the client, the RTMP server will parse the data and may perform some processing (such as transcoding, encapsulation, saving, etc.) as needed.

On the server side, real-time data of audio and video streams may be stored in cache to ensure the continuity and stability of subsequent data.4. Client requests playback

Streaming: Viewers request to watch streaming content through a client, such as a browser or video player.

The client initiates a playback request to the RTMP server, typically specifying a stream name (such as rtmp://example.com/live/stream).
The client establishes a connection with the server through the RTMP protocol, sends a playback request to the server, and the server returns the corresponding audio and video data stream based on the request.

5. The server pushes the streaming data to the client

The RTMP server sends real-time streaming media data (audio, video) to the client in the same streaming format (such as H.264, AAC).

After receiving audio and video data, the client decodes it and plays it on the screen.

This process is real-time, and the server and client will maintain a continuous RTMP connection to ensure the continuous transmission of data streams.

6. Real time synchronization and latency management

In the process of RTMP streaming media transmission, latency is a key issue, especially in the case of live streaming.

The RTMP protocol minimizes latency by controlling packet size, buffering, and real-time synchronization.

At the same time, the server and client will synchronize timestamps in real time to ensure synchronous playback of videos and audio.

7. Disconnecting

Once the live broadcast or playback ends, the RTMP connection between the client and server will be closed.
The streaming client sends a stop push signal, while the playback client stops playing the video.

The difference between RTMP and RTMP Server in D260
RTMP:
This step is equivalent to the fourth step of the RTMP transmission process, which directly requests playback from the RTMP server within the local area network and pulls a certain RTMP stream for playback.

RTMP Server:
This step is equivalent to the second step of the RTMP transmission process. D260 uses its internal RTMP Server to generate an RTMP URL, and generates an RTMP streaming service that appears in D260's source list. As long as the encoding end pushes the data to the URL generated by this RTMP Server, D260 can parse and decode the output.

Solution
Step 1: Use a public IP address for port 1.
Although the D260 device has two network ports, it is not recommended for users to use port 2 for streaming services.
Because network port 2 is usually used for device maintenance, while network port 1 is used for device streaming and decoding.
image.png

Step 2: Use a public IP address to access the device's management page.
The URL generated by the RTMP Server of D260 is determined based on the IP address of the access management page.
If the IP address of network port 1 is used to access the device, the generated URL contains the IP address of network port 1;
If the IP address of network port 2 is used to access the device, the generated URL contains the IP address of network port 2.