Skip to main content

RTMP

Quick look-up table

RTMP
Type of streamingReal time streaming
Development StateNot actively maintained
Expected Latency~3000 ms
Connection typeTCP
Container typeFlash Video
WhereFlash player
Default Port1935
Modern codecsH264, AAC, MP3
Difficulty of readBeginner
NotesFlash is no longer supported in modern browsers

What do I need to know about RTMP?

RTMP stands for Real Time Messaging Protocol, it was made to be the delivery protocol for Flash video. With the demise of Flash RTMP isn't really used for playback anymore. RTMP is still one of the most common protocols used for live [ingest][mediaJargon], especially when it comes to user-generated content or smaller scale events.

The thing to remember is that RTMP can only handle H264, AAC and MP3 as codecs that are still in use. It supports a whole range of older video/audio protocols, but you'll most likely not see them get used. Newer protocols cannot be added as the original specifications only allow a small set audio and video codecs. There are however some efforts on the way to enhance the RTMP specifications to allow for more. It's called Enhanced RTMP, whether it will be accepted by the industry still remains to be seen.

When would you use RTMP?

Simply put: Sending live streams towards servers

RTMP is still one of the default choices when sending live streams to servers or media platforms. If you're going to be handling live streams it's not a bad idea to at least familiarize yourself with the usage of RTMP.

The scheme for RTMP looks like this:

rtmp(s)://address:port/application/streamName

You might see other schemes using other variations of RTMP, but it is unlikely you will encounter them at this point. Since this is an introduction we will keep things simple. If you want to know more about RTMP please wait for our deepdive into RTMP article.

There's only two things you'll need to know as a starting user: port: The default port 1935 can be left out of the url. This implies that port 1935 is used. streamName: This is the stream you'll be pushing towards or the stream key/stream token you've received/set up to push towards.

Almost every place you'll use it at will provide values to copy. The only thing to keep in mind is that some split the RTMP url at the streamName, which means you'll have a seperate field to provide your streamName into.

Advantages of RTMP

  • TCP: Packet loss is impossible
  • True Streaming Protocol: Low latency
  • Broad support among broadcasting and server applications

Disadvantages of RTMP

  • TCP: A connection interrupt means the stream is gone, unrecoverable
  • TCP: Raises latency slightly
  • No longer in active development: No support for modern protocols

Making a RTMP stream usable

When a stream comes in as RTMP it's not just simply ready for use, it's in RTMP which is an unsuitable protocol for playback for most modern devices. The stream will need to be converted into more modern formats to make sure viewers can actually view the stream. In order to do this you will want media server software like MistServer, which is capable of both receiving RTMP and sending out streams as RTMP. Eager to get started? Begin now