RTMP, MPEG-DASH, and other video streaming protocols are standardized delivery methods for fragmenting video clips and reassembling them for transmitting to the audience. In recent years, live streaming has emerged as one of the most sought-after communication and entertainment tools. Video streaming is becoming much more popular than any other industry in the current world.
To keep pace with this rapidly growing industry, the video and video streaming technologies are also changing frequently. Apple, Adobe, and many other companies, for example, have developed their own streaming communication protocol/video protocol for data transmission, so that the files are lightweight and presentable to the viewers.
RTSP, RTP, RTCP, RTMP, HLS, RTSP, UDP, and UDP are the most frequently used protocols. A low latency streaming protocol known as Real-Time Messaging Protocol (RTMP) was first developed for Flash media players for live streaming and on-demand playback. Since then, it has been adopted by most media players.
What is RTMP?
Real-time messaging protocol is referred to as RTMP. The protocol is proprietary to Adobe. Macromedia Inc. originally developed it, but Adobe acquired the company in 2005. RTMP is an application-level protocol designed to deliver on-demand media and live media (i.e. live audio, video, and data) over the Internet between a Flash player and RTMP Media Server.
Real-Time Messaging Protocol (RTMP) Variations
The RTMP protocol is a TCP-based network protocol that enables low-latency communication and maintains persistent connections. RTMP can be adapted to allow other types of communication.
• RTMPT: RTMP tunneled over HTTP is known as RTMPT.
• RTMPS: RTMPS uses TLS/SSL for secure connections instead of RTMP.
• RTMPE: RTMPE is an enhanced and encrypted version of RTMP, using Adobe’s security mechanism to protect content in real-time.
• RTMFP: RTMFP is a Real-Time Media Flow Protocol is a secure protocol that allows for the transmission of media over the network. UDP is the basis of RTMFP, whereas TCP is the basis for RTMP. With it, live streaming media is delivered more efficiently, overhead and latency are reduced, and voice and audio quality are improved.
RTMP: How it works?
TCP is used to support Real-Time Messaging Protocol. Multiplexes bidirectional messages over a reliable stream between communication peers (e.g. communication between RTMP server and client flash player/web player/mobile device).
RTMP supports multiple independent virtual channels. It is possible to stream audio and video from two different channels simultaneously using RTMP Streaming. The stream is made possible by a three-step process that includes the handshake, the connection, and the stream. We will discuss each step in detail.
- The Handshake
RTMP streaming begins by connecting to an RTMP server via TCP. To do so, it uses a handshake system known as chunks, which consists of three packets. Clients or users initiate a handshake with the server they wish to access. Clients send packets to the server to begin the process.
It informs the server of the client’s protocol version. After receiving this packet, the client sends a second one containing a timestamp.
Replying to the client, the server sends an echo of the packet with a timestamp indicating when it received it. Clients respond with a timestamp packet to the server, which it acknowledges and returns. The handshake process ends with the packet exchange and ushers in the connection stage.
- The Connection
In addition to the handshake stage, the connection stage is also between the client and the server. An Action Message Format (AMF) connection is established between the client and server.
To connect, the client sends the server a request. Connection requests are acknowledged, verified, and accepted by the server. Once this is done, the connection stage is considered complete.
- The Stream
The final stage is called the stream. Client and server must have passed through the handshake and connection stage to arrive at this stage before establishing an RTMP connection. Clients can stream video or audio at the same time at the stream stage. This is done by sending three messages to the server (CreateStream, ping, and play).
After receiving this message, the server lets the client continue streaming.