No items found.
Blog

RTMP Ultimate Guide | What is it & How to Use a Server to Stream

RTMP (Real-Time Messaging Protocol) is a method for transmitting videos over the internet. Learn what it is and how to set it up RTMP streaming in our easy guide.
Stephen Robles
Video & Podcast Creator
Last Updated:
August 11, 2024
12
min
Reviewed by
Ortal Hadad

Key takeaways:

  • RTMP is a protocol for streaming and transmitting video and audio over the internet. 
  • In an RTMP setup the receiver and the RTMP server need to first agree on settings, then establish a connection so the server can transmit data.
  • To set up and RTMP stream you need a capturing device like a camera, internet connection, an encoder plus a stream key and server URL. 
  • With Riverside setting up an RTMP stream is as easy as copying your streaming platforms’ stream key and server URL into the Riverside studio.

What is RTMP?

RTMP is a protocol used for streaming audio, video, and data over the internet in real-time. As a podcaster or streamer, you regularly use it to send live audio and video from your device to a streaming platform or server.

It was originally developed by Macromedia for streaming data through the Adobe Flash Player, a legacy media player that later became obsolete (more on that later). Nonetheless, RTMP remained an essential component of streaming and is still used to this very day, but in a slightly different way.

RTMP operates in two steps: first and last-mile delivery. 

  • First-mile involves transmitting media from the encoder (the user generating the content) to the server using RTMP. 
  • Last-mile involves the transmission of this media from the server (such as the platform hosting the content) to the final user.

If this sounds a bit confusing, don’t worry—we’ll get into the details in a moment. Right now, all you need to know is that since Adobe discontinued Flash Player in 2020, RTMP is primarily used for first-mile delivery only. Nowadays, last-mile delivery is often handled by other protocols, like HLS (HTTP Live Streaming) and DASH (Dynamic Adaptive Streaming over HTTP).  

RTMP is a platform-agnostic protocol, meaning that it can be used by any platform, from YouTube and Twitch, to smaller niche or private streaming services. It can also be used to ingest live content and send it to an RTMP server for distribution to viewers.

Table of contents:

How does RTMP work for live streaming?

RTMP remains central to the live streaming workflow, specifically in the first-mile delivery phase of media. In other words, it is the primary protocol used to transport your media to a host or server before it is distributed to viewers.

This process is known as “ingestion” and is usually divided into three steps: handshake, connection and streaming. 

However, before this process begins, a few additional stages need to be addressed.

First, all video and audio signals captured by microphones and cameras must be converted into digital data that can be transmitted over the internet. This conversion is performed by an encoder.

The encoded data is then transmitted to the server using RTMP. It is important to note that this data is always broken down into smaller chunks called packets to ensure smooth communication between the client and the server. RTMP relies on TCP (Transmission Control Protocol) to manage packetization, establish the initial connection, and maintain stability. TCP ensures that packets are delivered in the correct order and without errors.

Now, let’s see how the RTMP sends this data to the server through its three main phases:

Handshake

Before a connection could be established between the client and the RTMP server, the two parties must exchange a series of messages to agree on the protocol version and parameters.

This step is called the “handshake” and begins with the client sending a connection request to the server, to which the server responds with an acknowledgment. The client will then send a confirmation to the server, completing the handshake.

During this step, the TCP itself uses its own three-way handshake to establish a connection with the server. This ensures the reliability of the RTMP handshake, since both the client and server can agree on the protocol settings and parameters before the data exchange could begin.

Connection

Once the handshake is complete, the server and client negotiate the details of the stream. During this stage, the server acknowledges the connection request from the client, and responds by confirming the parameters. These include the type of connection, bandwidth limitations, stream name, and authentication details.

Once the connection is established, encoded data packets are sent to the server through the TCP protocol. This client-server connection is persistent, which is an important feature of RTMP since it allows for low-latency streaming.

Streaming

The streaming stage is the last stage of the process. The encoded data received by the RTMP server is now sent to the end user, the viewer. 

However, before the data could be “consumed,” it must be transformed back into audio and video signals. This process is known as transcoding, and it’s the opposite of encoding. Transcoded packets can now be processed by media players for real-time playback.

Note that today, the streaming stage includes another step. Since RTMP protocols aren’t frequently used for last-mile delivery, data must first be repackaged into other formats like HLS or DASH.

Why should you use RTMP for streaming?

As you probably guessed already, RTMP isn’t used for last-mile delivery since Adobe discontinued Flash Player. However, RTMP ingestion and RTMP servers are still widely used for streaming purposes due to their many advantages.

In particular:

  • Low latency streaming: Since the connection is persistent, data transmission doesn’t need to be re-established for each data packet. This minimizes the delay between the source and the viewer. Low latency is particularly important for broadcasters who are streaming in real time, such as during live events, gaming, Q&A sessions, and interactive webinars.
  • Maximum stability, minimal buffering: For the same reasons explained above, RTMP servers are exceptionally stable and efficient at buffering and flow control. Users will rarely have to deal with downtimes, reduced video and audio quality, or long buffering times, even if there are minor fluctuations in network conditions.
  • Wide compatibility: RTMP is accepted by virtually any streaming platform and device, including YouTube, Twitch, smart TVs, and more niche or private streaming services. Most streaming software allows you to enter a custom RTMP URL and stream key, so as long as the platform supports RTMP, you can stream on it even if the platform is not natively integrated into the software.
Streaming live

How to set up your own RTMP stream

Now that you know what RTMP is, and why you might want to use it, it’s time to set up your own RTMP stream.

Let’s start by discussing what you need, first.

RTMP streaming requirements

In a traditional RTMP streaming setup, you would need:

Capture devices

It goes without saying that you’ll need a camera and mic to set up your livestream. 

Your camera will provide the video source for your stream, and your mic will provide the audio. 

High-definition cameras with HDMI support and quality USB microphones are recommended, as well as a dedicated capture card.

Stable Internet connection

A stable and fast internet connection is needed, especially if you plan to broadcast any form or real-time content, such as live events or interactive sessions. 

Ideally, you should have an upload speed of at least 5 Mbps for 720p streaming, 10 Mbps for 1080p, and higher for 4K streaming.

Encoder

An encoder is a device or software that converts your raw audio and video signal into a digital format that can be transmitted to a server for streaming. 

Encoders come in two different forms: hardware and software. 

  • A hardware encoder is a physical device that connects to your computer. 
  • A software encoder runs on your computer and can either be downloaded or cloud-based. 
If you want to know more, you can check our live-streaming encoder guide.

RTMP stream key and server URL

To set up a RTMP stream, you need a server URL and a RTMP stream key.

Server URL

The server URL is the web address of the RTMP server where you'll send your stream. This is required for broadcasting your stream to your intended platforms. It usually starts with "rtmp://" followed by the server address. 

Some platforms, like Twitch, use the same primary RTMP URL for all streamers, while others like YouTube use different ones based on the region you stream from.

RTMP stream key

The RTMP stream key is a unique identifier of your streaming source, and it’s provided by the platform you’re streaming to. Unlike the server URL which is always the same, the stream key changes with each new stream.

You usually input your server URL and stream key into your encoder to establish a connection between it and the platform.

RTMP Stream key example

Streaming platform

The streaming platform is the vehicle you will use to distribute your content to your audience. Popular platforms include Spotify, Facebook Live, YouTube, Twitch, and more. Most platforms use RTMP for ingesting the feed, but then use another protocol for egress, like HLS or DASH.

Read more in our guide on creating your own streaming setup.

How to seamlessly set up an RTMP stream with Riverside

To setup a RTMP stream, you’ll need to start by selecting a streaming service that’s compatible with this protocol.

For example, you can try Riverside which streamlines the entire process. You’ll have access to features such as:

  • A virtual studio: You can invite up to 9 guest speakers and 1000 audience members to your direct studio. Plus, brand this space with your logo, lower thirds and backgrounds.
  • High-quality recording: High-quality audio and video can be captured directly through your web browser, replacing the need for separate recording software.
  • Local recording: Records each participant's audio and video locally on their device, so quality will always be top-notch even with poor or unstable internet connections.
  • Internal encoding: Handles the compression, encoding and transmission of audio and video streams internally, so you don't need separate software or hardware encoders.

With Riverside, you can live stream directly to platforms like YouTube, LinkedIn and Twitter, or use RTMP to stream to any platform that supports it. 

Here’s how:

Step 1: In the dashboard, select an existing studio or select the “+” button to create your own. (You can learn how here.)

Step 2: Click on “Go to Studio”. In the lobby, set up your camera and microphone and then then on “Join Studio” to create a new studio. 

Step 3: Inside your studio, look for the button “Live Stream off” at the top, and click on it. From the newly opened menu click on the three dots under “Stream to social” and then on “Custom RTMP”.

Setting up a custom RTMP stream on Riverside

Step 4: Fill all the fields with the Name of the platform you’re streaming in (your choice), the Stream URL, and the Stream Key. Then click “Add” to confirm.

Stream URL and key on Riverside

Step 5: Click “Go live” to start the live stream—you might need to wait up to 30 seconds before the video appears on the website you're streaming to.

Start recording with Riverside
Easily record high-quality podcasts & videos remotely
Get Started

RTMP variations and what they’re best for

There are some variations of RTMP, each one serving a slightly different purpose or offering additional features to meet specific streaming needs.

RTMPS (RTMP Secure)

RTMPS is a secure version of RTMP that uses an SSL/TLS certification to encrypt the streaming and provide more security. The additional layer of security comes at the cost of some speed, resulting in slightly higher latency.

Best for: 

  • Protecting sensitive content during transmission
  • Compliance with privacy regulations
  • Going live on public internet servers (like a town hall)

RTMPE (RTMP Encrypted)

RTMPE is another encrypted version of RTMP, developed originally by Adobe as a proprietary encryption method for RTMP. Its use is limited since it doesn’t use SSL certificates (the industry standard). However, it offers slightly lower latency compared to RTMPS.

Best for:

  • Streams where low latency is as important as security, such as online gaming tournaments
  • Legacy systems

RTMPT (RTMPT Tunnelled)

RTMPT tunnels data through HTTP requests. This method sends private data via public channels to bypass firewalls and other network restrictions. RTMPT is useful only for streaming in restricted network environments, but the encapsulation of RTMP data in HTTP slows data transmission, introducing extra latency.

Best for:

  • Private and governmental institutions with strict security policies (corporations, universities, hospitals, etc.)
  • Bypassing firewalls and proxy servers

RTMFP (Real-Time Media Flow Protocol)

RTMFP uses UDP (User Datagram Protocol) rather than TCP. The biggest difference here is that UDP is a connectionless protocol that doesn’t check for data integrity and doesn’t retransmit lost packets. In other words, it’s quick and lightweight, since it reduces latency and server load.

Best for:

  • Peer-to-peer live streaming
  • Keeping bandwidth costs under control
  • Reducing server load in interactive streams with multiple users

Is RTMP outdated?

Short answer: no, RTMP is not outdated, but it’s not the mainstream technology it once was.

As the core part of Adobe Flash Player, RTMP was pretty much the industry standard for live streaming throughout the 2000s. However, around 2015, it started losing traction over HTML5, a newer protocol that offered better security, performance and compatibility.

The main issues were the many security vulnerabilities of Flash that were never properly addressed, and its lack of compatibility with mobile devices. When Apple announced it wouldn’t support Flash on iOS devices, the destiny legacy media player was more or less sealed.

In 2020, Adobe officially discontinued Flash Player, and major browsers disabled Flash content by default. However, while this decision certainly reduced the popularity of RTMP, it didn’t spell its doom.

Currently, RTMP is still used by many streaming platforms to ingest live streams from encoders. However, transcoding and last-mile delivery of content to viewers is usually done with newer, more efficient protocols like DASH and HLS. RTMP still offers major benefits when it comes to live streaming - not least the stable and high-quality viewing experience it offers. 

RTMP alternatives to try

While RTMP is still widely used in live streaming ingestion for its low-latency capabilities, there are many newer protocols available for egress, each with its own strengths.

Let’s have a look.

RTMP vs HLS

HLS is the newer industry standard among streaming protocols. 

Owned by Apple, it was released for iOS systems as a substitute for Flash. Today, it is appreciated for its almost-universal compatibility with all kinds of devices including Android ones, smart TVs and all known browsers. 

Compared to RTMP, it usually suffers from higher latency due to its use of HTTP and chunk-based delivery.

RTMP vs DASH

DASH is, in a nutshell, the open-source equivalent of HLS. 

It more or less shares the same benefits and drawbacks, including featuring variable, adaptive bitrate streaming to deliver good quality even with unreliable network connections. 

Since it’s open-source, however, its uses are a bit more flexible. It’s used by major streaming services like YouTube and Netflix.

RTMP vs WebRTC

WebRTC (Web Real-Time Communication) is another open-source protocol with latency so minimal it can be considered as almost real-time. 

It uses peer-to-peer (P2P) streaming, and it’s usually employed for direct communication via web browser for video conferencing purposes. 

It is used by some apps like Discord, WhatsApp, and Facebook Messenger, but its P2P nature makes it less suitable for larger broadcasts.

RTMP vs SRT

As the name implies, SRT (Secure Reliable Transport) is a protocol that focuses on security and privacy. It offers low latency and excellent stability, even over unpredictable networks. 

Additionally, SRT does not depend on a single codec, allowing developers to use it with whatever audio or video codec of their choice. Its main drawbacks are its limited adoption, steep learning curve and increased server load.

Dos and dont’s when working with an RTMP for live streaming

  • Do use a stable internet connection, and…don’t overload your network with too many applications running at the same time.
  • Do test your setup before going live, but…don’t stop monitoring your streaming health (latency, bitrate, etc) even during the session!
  • Do use a wired ethernet connection when possible.
  • Don’t share your streaming key publicly.
  • Do choose the right RTMP for your needs (like RTMPS for secure streams).
  • Don’t assume all streaming platforms use the same RTMP settings.
  • Do use appropriate bitrates for your content and target audience and…
  • Don’t stream at a higher quality than your setup can handle.

And, more importantly, do use Riverside to enjoy studio-level audio and video quality for all your live streaming sessions!

FAQs on RTMPs

How do I create an RTMP stream?

Set up your equipment and encoder, and search for the RTMP server URL and stream key provided by the streaming platform of your choice.

If you’re using an encoder, type them into the appropriate config menu and start broadcasting. If you’re using Riverside, follow our walkthrough above to get started in no time!

How do I get an RTMP link?

An RTMP link is the RTMP server URL needed to launch your streaming. Access your account on the platform where you intend to stream, and look for the RTMP URL in the streaming settings.

Does Twitch use RTMP?

Yes, Twitch uses RTMP to ingest live streams, but uses different protocols for last-mile delivery. You can find more information on how Twitch uses RTMP, as well as where to find your stream key and RTMP URL here.

You can learn more in our step-by-step on how to stream on Twitch.

What is an RTMP client?

An RTMP client is an app used to send or receive audio and video content from and to an RTMP server. They can either be broadcasting clients if they send data from the content creator to the RTMP server (such as OBS studio), playback clients if they simply receive data from the server (such as VLC Media Player), or both. Historically, the first RTMP client was the Adobe Flash Player, which was used as a playback client.

Never miss another article
Highly curated content, case studies, Riverside updates, and more.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Share this post:
Further reading

Record in studio quality without the studio. Transcribe, clip, and edit within seconds.

Record Your Meetings Seamlessly with Riverside
Try Riverside for Free
Share this post:
Online podcast & video studio
Get Started

Keep reading

20 Best Live Streaming Software for 2024 - Free & Paid
Check out 20 of the best live streaming software! We review each one and cover their functionality, pricing and key features.
8 Best Webcam for Streaming in 2024 (4K & 1080p)
These are the very best streaming webcams as of 2024. Find out which are worth purchasing and which are not.
How to Improve Streaming Quality Using 10 Easy Tips
Learn how to improve streaming quality with our 10 easy tips! We'll share what affects streaming quality and how to optimize a PC for smoother streaming.

Start creating with Riverside

Turn your best ideas into your best content yet.
Get started