Skip to content
Search

Real-Time Messaging Protocol

lastmod 2022-10-20created 2020-07-065 edits

Real Time Messaging Protocol (commonly abbreviated RTMP) is a proprietary computer communication protocol from Adobe Systems. RTMP is used for streaming audio, video, and other data over the Internet. RTMP is used for communication between Adobe Flash Player and a server.

The types of RTMP are as follows.

  • RTMP (basic): uses port 1935, unencrypted RTMP; if an attempt on port 1935 fails, it retries on port 443 (RTMPS) or port 80 (RTMPT).
  • RTMPT (RTMP Tunneled): RTMP data wrapped in HTTP. Default port is 80. Larger than RTMP because of the HTTP headers.
  • RTMPS (RTMP Secure): RTMP data wrapped in HTTPS. The Flash player supports SSL I/O, so it uses that feature.
  • RTMPE (Encrypted RTMP): RTMP encrypted with 128 bits. Lighter than SSL but has nothing like SSL certificate authentication. Because it uses an encrypted channel, it can affect performance slightly more than basic RTMP.
  • RTMPTE (Encrypted RTMP Tunneled): uses port 80. A mix of RTMPT and RTMPE. Requires Flash Player 9,0,115,0. Affects server performance.
  • RTMFP (Real Time Media Flow Protocol): runs over UDP. Basic RTMP runs over TCP. Always transmits data encrypted.

The original goal was for it to be used only with Flash. Today, however, RTMP is used not only by Flash but also by other applications such as Adobe LiveCycle Data Services ES. Adobe published the RTMP specification on January 20, 2009.

Projects

Streaming test

docker run --rm -it -p 1935:1935 --name nginx-rtmp tiangolo/nginx-rtmp

Send the source to stream with OBS

  1. Open OBS Studio
  2. Click the "Settings" button
  3. Go to the "Stream" section
  4. In "Stream Type" select "Custom Streaming Server"
  5. In the "URL" enter the rtmp://<ip_of_host>/live replacing <ip_of_host> with the IP of the host in which the container is running. For example: rtmp://192.168.0.30/live
  6. In the "Stream key" use a "key" that will be used later in the client URL to display that specific stream. For example: test
  7. Click the "OK" button
  8. In the section "Sources" click de "Add" button (+) and select a source (for example "Screen Capture") and configure it as you need
  9. Click the "Start Streaming" button

Run a player that receives the video (e.g. vlc):

  1. Open a VLC player (it also works in Raspberry Pi using omxplayer)
  2. Click in the "Media" menu
  3. Click in "Open Network Stream"
  4. Enter the URL from above as rtmp://<ip_of_host>/live/<key> replacing <ip_of_host> with the IP of the host in which the container is running and <key> with the key you created in OBS Studio. For example: rtmp://192.168.0.30/live/test
  5. Click "Play"
  6. Now VLC should start playing whatever you are transmitting from OBS Studio

See also

Favorite site

author Zer0 sitemap