Skip to content

RTMP live streams: how they work and how to set one up

How RTMP and RTMPS work, encoder settings for YouTube, Amazon IVS and ON24, a free local test stream, and how to secure, relay and troubleshoot a live stream.

An RTMP live stream is a live video feed that an encoder, such as OBS Studio, a hardware encoder, or Zoom, pushes to a streaming platform over the Real-Time Messaging Protocol. You copy two values from the platform into the encoder: a server URL that starts with rtmp:// or rtmps://, and a secret stream key. The platform converts the feed to HLS, and viewers watch that version in a browser or an app. RTMP now carries video into a platform and almost never out to viewers. When the platform offers RTMPS (RTMP inside an encrypted TLS connection), use it. The demo below asks when your audience should respond, during the live Q&A or in the replay, and shows where each kind of interaction belongs.

Pick when viewers should respond: during the live Q&A, during the replay, or by choosing a replay topic. Each choice jumps to the scene for that path, and the last screen repeats your choice. The live player in the demo is a fictional streaming platform. Mindstamp does not provide native live streaming; it adds interactions to the recording once the recording is available as source media. Open the demo in a new tab.

What is RTMP?

RTMP is a protocol that carries audio, video, and data messages, with their timing, over a reliable connection such as TCP. It comes from the Flash platform, and Adobe's specification still refers to Flash Player and Flash Media Server. Adobe published version 1.0 of that specification on December 21, 2012. The Veovera Software Organization hosts a copy of Adobe's RTMP 1.0 specification. The default port is 1935, according to the FFmpeg protocol documentation.

Adobe stopped supporting Flash Player on December 31, 2020 and blocked Flash content from running on January 12, 2021 (Adobe). Without Flash, browsers have no way to play RTMP, so the protocol kept one job: moving a live feed from the encoder to the platform. Encoders such as OBS, Wirecast, vMix, and Elemental send it, and the ingest servers of YouTube, Amazon IVS, Mux, Microsoft Teams, and ON24 accept RTMP or RTMPS today (sources in the sections below).

The protocol still gets updates. Enhanced RTMP v2, which Veovera maintains with input from Adobe, YouTube, and Twitch, adds newer codecs such as HEVC, AV1, and VP9, plus multitrack audio and video. YouTube's live encoder settings accept H.264, HEVC, and AV1 over RTMP and RTMPS.

How does RTMP streaming work?

  1. The encoder captures your camera, microphone, and screen and compresses them, usually to H.264 video and AAC audio.
  2. It opens a TCP connection to the platform's ingest server. With RTMPS, that connection runs inside TLS, often on port 443.
  3. The encoder and server complete a handshake. In Adobe's specification, each side sends three fixed-size chunks (C0, C1, and C2 from the client; S0, S1, and S2 from the server) before any media moves.
  4. The encoder names the application and sends the stream key. The platform checks the key and accepts the stream.
  5. Media travels in chunks so that audio, video, and data can share one connection. The maximum chunk size starts at 128 bytes, and either side can change it.
  6. The platform transcodes the feed into several quality levels and packages them as HLS. A content delivery network sends the segments to viewers, and each player switches quality to match its connection. An Amazon IVS standard channel, for example, turns a 1080p30 input into 720p, 480p, 360p, and 160p versions next to the original (Amazon IVS streaming configuration).
  7. Most platforms also record the stream. Cloudflare Stream records every live video automatically.

Our help article on HLS and how it differs from MP4 explains the delivery half of this chain.

RTMP stream example: the parts of an RTMP URL

FFmpeg documents the full address form as rtmp://[username:password@]server[:port][/app][/instance][/playpath]. Most platforms split it in two for you: a server URL that ends with the application name, and a stream key that goes last. Amazon IVS gives this RTMPS example:

rtmps://a1b2c3d4e5f6.global-contribute.live-video.net:443/app/<stream-key>
  • rtmps:// is the protocol. Use rtmp:// only when the platform has no secure option.
  • a1b2c3d4e5f6.global-contribute.live-video.net is the ingest server.
  • :443 is the port. Plain RTMP uses 1935 unless the platform says otherwise.
  • app is the application name on the server.
  • The stream key identifies and authorizes your stream. OBS and most other encoders give it its own field.
Ingest details for common platforms (checked October 2026; ON24 from its 2025 help articles)
PlatformIngest protocolsServer URL or port
Amazon IVSRTMPS (TLS 1.2 or later), RTMP if you allow it on the channel, SRTrtmps://<ingest-server>:443/app/
MuxRTMP, RTMPSrtmp://global-live.mux.com:5222/app or rtmps://global-live.mux.com:443/app
Cloudflare StreamRTMPS, SRTrtmps://live.cloudflare.com:443/live/
Microsoft Teams (RTMP-In)RTMP, RTMPSPorts 1935 and 1936; Microsoft plans to move all RTMP ingest to ports 50118 and 50119 by the end of 2026
ON24 (Broadcast Video)RTMP, plus RTMPS if your encoder supports itURL and Stream ID from Webcast Elite; outbound TCP port 1935

Sources: Mux live streaming guide, Cloudflare Stream live inputs, Microsoft Learn on RTMP-In, and the ON24 articles linked in the ON24 section below.

How to set up an RTMP live stream

  1. Create the live event on your platform and copy the server URL and stream key. Pick the RTMPS URL if the platform lists one.
  2. Install OBS Studio, which is free and open source, or open your hardware encoder's settings page.
  3. In OBS, open Settings > Stream, set Service to Custom..., paste the server URL into Server and the key into Stream Key.
  4. In the output settings, choose H.264, constant bitrate (CBR), a keyframe interval of 2 seconds, and a bitrate from the table below. Set audio to AAC at 44.1 or 48 kHz.
  5. Build your scenes: camera, slides or screen share, and any name titles.
  6. Stream to a private or unlisted test event and watch it on a second device for a few minutes.
  7. Record locally while you stream, so you keep a clean copy if the platform's recording fails. ON24's encoding guide recommends this "insurance copy" too.
Recommended encoder settings by platform (checked October 2026; ON24 from its 2025 encoding guide)
Platform1080p video bitrate720p video bitrateKeyframe intervalAudio
YouTube Live (H.264)30 fps: 5 Mbps minimum, 14 Mbps recommended. 60 fps: 6 Mbps minimum, 17 Mbps recommended3 Mbps minimum, 8 Mbps recommended2 seconds; no more than 4AAC or MP3, 128 Kbps stereo at 44.1 kHz
Amazon IVSUp to 8,500 KbpsUp to 4,500 Kbps2 seconds, or 1 second for lower latencyAAC-LC, 96 to 320 Kbps
ON24 Broadcast Video5,000 Kbps, if 1080p is turned on for your account2,500 Kbps is the most common inbound rate; 500 Kbps minimum2 secondsAAC; 64 Kbps at 720p, 96 Kbps mono at 1080p

Two settings matter on every platform in the table. Use constant bitrate: YouTube lists CBR, ON24 links variable inbound rates to lip-sync problems, and Amazon IVS says variable bitrate spikes can cause dropped frames and buffering. Then leave upload headroom. Amazon IVS tells broadcasters to allocate 50% more bandwidth than the stream needs, and OBS suggests a bitrate of about 75% of your upload speed. Microsoft Teams adds its own rules for RTMP-In: H.264, constant bitrate at 720p (constant or variable at 1080p), and at least 29.97 frames per second.

If the built-in laptop camera looks soft or grainy, an external 1080p USB webcam from Logitech or Razer is the simplest upgrade. The next step up is a mirrorless camera connected through an HDMI capture card.

How to test an RTMP stream on your own computer

You can run your own sample stream in a few minutes with two free tools: MediaMTX, an open-source media server, and FFmpeg.

  1. Download MediaMTX from its GitHub page and run ./mediamtx, or run the bluenviron/mediamtx Docker image. It listens for RTMP on port 1935 and serves HLS on port 8888 (MediaMTX install guide).
  2. Publish any MP4 file in a loop with the command from the MediaMTX FFmpeg guide:
    ffmpeg -re -stream_loop -1 -i file.mp4 -c copy -f flv rtmp://localhost:1935/mystream
    -re reads the file at its normal frame rate, so it behaves like a live source, and -f flv wraps the media in FLV, the format RTMP carries. -c copy works when the file is already H.264 and AAC. For other files, replace it with -c:v libx264 -c:a aac.
  3. Watch the RTMP feed with ffplay rtmp://localhost/mystream, or open http://localhost:8888/mystream in a browser to see the HLS version that MediaMTX makes from it (MediaMTX browser guide).
  4. To test OBS, open Settings > Stream, set Service to Custom..., enter rtmp://localhost/mystream as the Server, leave Stream Key empty, and select Start Streaming (MediaMTX OBS guide).

Use this loop to check scenes and audio levels before you point the encoder at a public platform.

RTMP vs RTMPS: how to protect an RTMP stream

Plain RTMP sends your stream key and your media without encryption, so anyone who can read the traffic on the network path can copy the key. RTMPS puts the same protocol inside TLS, the encryption behind HTTPS. Amazon IVS requires TLS 1.2 or later for RTMPS and recommends RTMPS over RTMP "unless you have specific and verified use cases that require RTMP." Cloudflare Stream's live input guide lists RTMPS and SRT with no plain RTMP option, and ON24 supports RTMPS when the encoder does.

RTMPS protects the trip from your encoder to the platform. It does not stop someone who has the watch link from viewing or sharing the stream. Viewer access needs separate controls on the delivery side:

  • Keep the stream key secret. Amazon IVS says to "treat the stream key like a secret, since it allows anyone to stream to the channel." Keep it off screen shares, and reset it if it leaks.
  • Use signed playback URLs. Mux can require a JSON Web Token that your server issues with an expiry time (Mux secure playback guide).
  • Limit which websites can play the stream. Mux compares the page's Referer header with your list of allowed domains and sends no video when they do not match.
  • Hold internal sessions as in-org events. In Microsoft Teams, an in-org event admits members of your organization and invited guests, and nobody can join from a public registration link.
  • Run the encoder on an updated machine on its own network. Amazon IVS recommends a dedicated internet VLAN for encoding machines, and this overview of common network security vulnerabilities covers the weak points to check around it.

RTMP vs SRT, WebRTC, and HLS

Viewers watch HLS or WebRTC, so the delivery format and the platform's latency setting decide most of the delay they see. RTMP only covers the first leg.

Live streaming protocols by job (latency figures from vendor documentation, checked October 2026)
ProtocolJobPublished delay figures
RTMP and RTMPSIngest from an encoder to a platform, over TCPIngest only; viewers do not watch RTMP
SRTIngest over unreliable networks, with packet-loss recovery and 128-bit or 256-bit AES encryption (Haivision). Amazon IVS, Cloudflare Stream, Teams, and OBS support it.Ingest only
WebRTC (with WHIP for ingest)Real-time video for calls and interactive stages. WHIP, the ingest method, became RFC 9725 in March 2025.Under 300 milliseconds in Amazon IVS real-time stages
HLSDelivery to viewers in short HTTP segments (RFC 8216). Safari plays it natively; other browsers use a library such as hls.js.Up to 30 seconds for a traditional stream and under 5 seconds on IVS low-latency channels (Amazon IVS); under 10 seconds for most viewers on YouTube's low-latency setting and under 5 on ultra-low

For a live Q&A where the presenter answers the chat, choose the platform's low-latency mode. YouTube's latency options show the cost: low and ultra-low latency do not support 4K, and ultra-low latency can increase buffering. For a broadcast-style all-hands with no live questions, normal latency gives the steadiest playback.

How to stream into ON24 with RTMP

ON24 accepts RTMP through the Broadcast Video option in Webcast Elite. The steps below come from ON24's Broadcast Video encoding guide and streaming architecture article, as archived in August 2025. Confirm them with your ON24 contact before the event.

  1. Ask your ON24 account executive to turn on Broadcast Video. ON24 charges extra for it and enables it per account.
  2. Create the event with Broadcast Video as the event type. Webcast Elite shows a URL and a Stream ID for Encoder A, which is required, and Encoder B, an optional backup that ON24's playlists expect. Both values are case-sensitive, and a stray space breaks them.
  3. Set up the encoder. ON24 names Wirecast, OBS, vMix, and Elemental, and needs an outbound connection on TCP port 1935 with no proxy. Use the bitrates in the settings table above, constant bitrate, and a keyframe every 2 seconds.
  4. Start the encoder and open the Preview URL from Webcast Elite to check the feed. Keep the stream running during rehearsals, because polls and other engagement tools do not display without it.
  5. Expect about 20 to 30 seconds between the presenter and the audience console. If you restart the encoder, wait 10 seconds before you start it again so ON24's HLS pipelines can reset.

To bring a Zoom meeting into an ON24 webcast, ON24's help center suggests pasting the Encoder A URL and Stream ID into Zoom's custom live streaming settings (ON24 article, archived September 2025). ON24 calls this a suggestion and not an official solution, because Zoom sends a single stream with no backup.

How to relay a video call to an RTMP or HLS live stream for a large audience

To reach more people than a meeting holds, send the call out over RTMP to a platform that delivers HLS to viewers.

  • Zoom: Pro, Business, Education, and Enterprise accounts can stream meetings and webinars to a custom service once custom live streaming is enabled in settings. The host enters a stream URL, a stream key, and the page where viewers will watch, then starts the stream from the meeting (Zoom Support).
  • Microsoft Teams: when an admin allows live streaming in the meeting policy, organizers enter an RTMP URL and key in the built-in Custom Streaming app (Microsoft Learn on RTMP-Out). Teams events can also take their feed from an encoder over RTMP or SRT. With Teams Enterprise, a view-only event holds up to 10,000 attendees, and an Attendee Capacity Pack raises that to 100,000 (Microsoft Learn on Teams events).
  • Your own video app: LiveKit's Egress service exports a room to YouTube Live, Twitch, or Facebook over RTMP, or records it as HLS segments (LiveKit docs).

The relay turns the call into one composite video. Check how speaker view and screen sharing look in that composite before the event.

Which video platforms create an RTMP ingest point with a REST call?

If you want your own player and branding, use a video API that returns an ingest URL and stream key from one request, then plays the stream back as HLS.

Live inputs you can create through an API (checked October 2026)
ServiceAPI callIngestPlayback in your own player
MuxPOST https://api.mux.com/video/v1/live-streamsRTMP on port 5222, RTMPS on port 443HLS at https://stream.mux.com/{PLAYBACK_ID}.m3u8
Cloudflare StreamPOST /client/v4/accounts/{account_id}/stream/live_inputsRTMPS and SRTHLS and DASH; recordings saved automatically
Amazon IVSCreateChannel (API, console, or AWS CLI)RTMPS, RTMP if allowed, SRTA playback URL; for the lowest latency, AWS requires its IVS player and does not support third-party HLS players

The Mux guide shows the whole request:

curl https://api.mux.com/video/v1/live-streams \ -H "Content-Type: application/json" \ -X POST \ -d '{ "playback_policies": ["public"], "new_asset_settings": { "playback_policies": ["public"] } }' \ -u ${MUX_TOKEN_ID}:${MUX_TOKEN_SECRET}

The response includes a stream key and a playback ID. Point any encoder at the ingest URL with that key, then load the HLS URL in your player. Safari plays HLS natively, and the open-source hls.js library plays it in other browsers through Media Source Extensions.

How to run AI moderation on a live RTMP stream before playback

The moderation APIs we checked take single images, text, or stored video files, so a live stream needs a short relay between the encoder and the platform:

  1. Send the encoder's RTMP feed to a server you control, such as MediaMTX, or FFmpeg in its RTMP listen mode.
  2. Take frames from the feed at a fixed rate with FFmpeg's fps filter, for example fps=1 for one frame each second.
  3. Send each frame to an image moderation API. Amazon Rekognition checks images with DetectModerationLabels and stored videos with StartContentModeration (AWS). Azure AI Content Safety rates images for sexual content, violence, hate, and self-harm at several severity levels, for images up to 4 MB (Microsoft Learn). Google Cloud Vision SafeSearch returns a likelihood for adult, spoof, medical, violence, and racy content (Google Cloud).
  4. Hold the outgoing stream in a delay buffer that is longer than your slowest round trip from frame to verdict.
  5. When the API flags a frame, switch the output to a holding slide, or blur the area with FFmpeg's crop, boxblur, and overlay filters.
  6. Push the result to the delivery platform over RTMPS, and queue flagged frames for a person to review.

These steps check the picture only. For speech, transcribe the audio and run the text through a text moderation API, such as the Analyze text API in Azure AI Content Safety. The sampling rate sets the trade-off: more frames per second catch more and cost more API calls, and the delay buffer adds to every viewer's latency.

How to fix dropped frames and a choppy RTMP stream

OBS separates two problems. Dropped frames mean "your connection to remote server isn't stable or you can't keep up with your set bitrate," and OBS calls it "extremely unlikely" that OBS itself causes them (OBS stream connection troubleshooting). An "encoding overloaded" warning means the computer cannot encode fast enough (OBS encoding performance troubleshooting).

For dropped frames:

  • Set the bitrate to about 75% of your measured upload speed.
  • Use a wired connection. OBS and Amazon IVS both warn that Wi-Fi can be unstable for streaming.
  • Turn on "Dynamically change bitrate to manage congestion" in OBS, so it lowers the bitrate instead of dropping frames.
  • Try a different ingest server, and check whether your internet provider slows streaming traffic. This guide on how to spot and avoid ISP throttling shows how to test for it with speed tests at different times of day.

For encoding overload, lower the output resolution or frame rate, and simplify scenes with fewer browser sources and filters so the computer has capacity left for encoding.

For an event you cannot rerun, add a second encoder on a separate connection. ON24 recommends two encoder machines, each sending its own stream, so that one failure does not end the broadcast.

Common questions

Is RTMP still used for live streaming?

Yes, for ingest. YouTube, Amazon IVS, Mux, Microsoft Teams, Zoom, and ON24 all send or accept RTMP or RTMPS. Viewers then watch HLS or WebRTC.

What port does RTMP use?

The default is TCP port 1935. RTMPS often uses port 443, as on Amazon IVS, Mux, and Cloudflare Stream. Some platforms use their own ports: Mux takes plain RTMP on 5222, and Teams uses 1935 and 1936 today.

Can a browser play an RTMP stream?

No. Browsers lost RTMP playback when Flash Player ended. Convert the stream to HLS, as Amazon IVS, Mux, Cloudflare Stream, and ON24 do for you, or to WebRTC when viewers need real-time delay.

Where is the RTMP specification?

Adobe's RTMP 1.0 specification from December 2012 is a 52-page document that Veovera hosts. For HEVC, AV1, and multitrack support, read the Enhanced RTMP v2 specification alongside it.

Turn the recording into an interactive replay

Mindstamp does not ingest or host live streams. It works on the recording. Download the recording as soon as the platform finishes it, because some platforms expire them: in Teams events built for large audiences, published recordings expire after 30 days by default, and organizers can extend that to 60 days (Microsoft Learn).

Upload the file to Mindstamp, or connect it from a host such as Vimeo or Wistia. Mindstamp no longer offers Panopto import. Then add interactions on the timeline:

  • Chapters, so viewers can jump to the segment they need in a long session.
  • Questions at the points where you would have polled the live audience. A question pauses the video until the viewer responds.
  • Lead capture before a later segment, for example to gate the second half of a webinar recording.
  • Branches that send each viewer to the part of the replay that matches their answer.

Plan for viewers who skim. Across 8.07 million views of 18,315 Mindstamp videos (2018 to October 2026), views of videos longer than 20 minutes played 41.7% of the video on average, compared with 59.4% for videos of one minute or less. Many factors differ between those videos, so treat the gap as a pattern, not proof, but it is a good reason to give a long replay chapters and clear choices. The webinar replay navigator example shows a topic menu that sends each viewer to the matching scene, and our page on webinar repurposing covers the marketing side. For a full walkthrough, read how to create an interactive video.

When the replay is ready, decide how it reaches people. Our guide to uploading a video vs embedding it covers your website, and how to share a video covers links, email, and social posts. Before your next live event, run the local MediaMTX test with your real encoder settings, then repeat it against a private event on your platform.