Aerial view of historic rooftops and skyline in Saint Petersburg, showcasing urban architecture and vibrant city landscape.

RTMP and RTMPS: streaming to YouTube and Twitch

Aerial, view, architecture, buildings, infrastructure, city, skyline, tower, road, lights, rooftops
Photo: StockSnap / Pixabay
In shortRTMP (Real-Time Messaging Protocol) is how cameras and encoders push live video to platforms like YouTube, Twitch and Facebook: you give the encoder a server URL and a secret stream key, and it sends the stream out over TCP. RTMPS is the same thing wrapped in TLS encryption, and it is the version you should use whenever the platform offers it.

RTMP is old by internet standards. It was built for Flash Player, which Adobe stopped supporting at the end of 2020. Yet almost every live stream you watch on YouTube or Twitch still starts its journey as RTMP. The reason is simple: it is a reliable, well-understood way to push one stream from an encoder to a server, and every encoder, from OBS to many IP cameras, can do it.

For camera owners, RTMP matters because it is the easiest and safest way to share a camera publicly. The camera connects out to the platform, so nothing on the internet has to connect in to your network.

What RTMP is

RTMP was developed by Macromedia and later Adobe, which published a specification for version 1.0 in December 2012. It runs over TCP, by default on port 1935, and splits audio, video and data into small chunks that are interleaved in one connection, so audio and video stay in sync. A short handshake starts the session, then the client “publishes” a stream to a named application on the server.

In today’s streaming world RTMP does one job: ingest, getting the stream from your encoder to the platform. Viewers no longer receive RTMP; platforms convert it to HLS or DASH for browsers and phones. See how live streaming works for the full chain.

RTMPS push: camera or encoder sends the stream with a stream key through the router out to YouTube ingest, which converts to HLS for viewers; no inbound connections to the camera Your site Camera / encoder URL + stream key Router no open ports RTMPS outbound, encrypted Ingest server YouTube, Twitch Transcode to HLS / DASH Viewers Stream key = password Anyone with it can broadcast on your channel. Keep it secret. The connection goes out from your site, so the camera never has to be reachable from the internet.
RTMPS pushes your stream out to the platform. Viewers watch the platform’s copy, never your camera directly.

A short history: from Flash player to ingest

In the 2000s, RTMP did everything. Websites embedded a Flash player, the player opened an RTMP connection to a media server, and video flowed straight to the viewer with only a few seconds of delay. It powered early live video on the web, from news channels to the first big game-streaming sites.

Then the web moved on. Smartphones never supported Flash, browsers dropped plugins for security reasons, and HTTP-based streaming such as HLS proved much cheaper to scale through ordinary web caches. Adobe ended Flash Player support on December 31, 2020. RTMP survived because the ingest side never needed a browser: encoders kept speaking RTMP to servers, and servers converted it for viewers. That is the role it plays today.

RTMP and delay

RTMP itself is fast; the push from encoder to platform usually adds only a second or two. Most of the delay viewers notice comes later, when the platform transcodes and packages the stream into HLS segments and the player buffers a few of them. So switching from RTMP to another ingest protocol rarely makes a big difference to what viewers see. If you need a shorter delay, look at the platform’s latency setting first; YouTube, for example, lets you choose a latency mode for each stream. For a scenic webcam, normal latency is the most stable choice.

Sending one camera to several platforms

An encoder can usually push to only one or two RTMP destinations at once without straining your upload, because each destination needs its own full copy of the stream. If you want the same camera on YouTube, Twitch and Facebook, a restreaming service receives one RTMP stream from you and sends copies to each platform from its own servers. You upload once; it does the rest, usually for a monthly fee. For most webcams, one YouTube stream embedded on your website and listed on LiveLocation reaches plenty of people.

The two things you need: URL and stream key

Every RTMP platform gives you two values in its dashboard:

  • Server URL (sometimes called the ingest URL or RTMP server), which starts with rtmp:// or rtmps://.
  • Stream key, a long secret string that identifies your channel or event.

YouTube’s instructions are typical: copy the stream URL from YouTube Studio and paste it into your encoder’s server field, then paste the stream key where indicated. Once the encoder starts, the platform shows the incoming stream and its health.

Treat the stream key like a password. Anyone who has it can broadcast whatever they like on your channel. Do not put it in screenshots, support forums or shared documents. If it leaks, reset it in the platform’s dashboard and update your encoder.

RTMP vs RTMPS

Plain RTMP sends everything, including the stream key, unencrypted. Anyone on the network path could in theory read it. RTMPS wraps the same protocol in TLS, the encryption used by HTTPS websites, and often uses port 443, which also helps on networks that block unusual ports. YouTube highlights RTMPS as its secure option. If your camera or encoder offers RTMPS, use it. If a camera only supports plain RTMP, consider using an encoder between the camera and the platform that can send RTMPS.

Recommended settings for YouTube

YouTube publishes its live encoder settings. As checked on the date at the bottom of this page, its recommendations for H.264 over RTMP include:

ResolutionFrame rateYouTube recommended video bitrateNotes for webcams
2160p (4K)30 fps42 MbpsNeeds a strong, steady upload
1440p30 fps21 MbpsRare for webcams
1080p30 fps14 MbpsMany scenic webcams look fine far lower
720p30 fps8 MbpsGood choice on slower uploads
480p30 fps4 MbpsMinimum for a pleasant view

Other settings YouTube recommends: a keyframe every 2 seconds (no more than 4), AAC or MP3 audio at 128 kbps for stereo. For a calm scenic webcam with little motion, many owners run 1080p at 3 to 6 Mbps and 15 to 30 fps to fit their upload; YouTube may show a “bitrate lower than recommended” note, but the picture can still look good. Use the bitrate and data calculator to see what your connection can carry.

Where RTMP comes from at a camera site

OptionHow it worksProsCons
Camera with built-in RTMPEnter URL and key in the camera’s settingsNo extra hardware, low powerFewer settings; may lack RTMPS or overlays
OBS or other software encoderPC pulls RTSP from the camera, pushes RTMPSFree, flexible: overlays, scenes, audio controlNeeds a PC running 24/7
Hardware encoder or media server boxSmall device pulls RTSP and pushes outReliable, low power, set and forgetExtra cost
Camera-streaming serviceService receives or pulls the stream and restreams itCan send to several platforms at onceMonthly fee

Some IP camera makers list RTMP on their spec sheets. Reolink, for example, lists RTSP and RTMP among the protocols of its RLC-810A. Check the exact model before buying, and check whether it supports RTMPS. Our step-by-step YouTube guide covers each option.

Running a 24/7 stream over RTMP

A webcam stream is different from a gaming or event stream: it is supposed to run forever. A few things help:

  • Use a persistent stream key so the encoder can reconnect to the same stream after a dropout.
  • Set the encoder to auto-reconnect. Internet links drop now and then; the encoder should retry by itself.
  • Know the archive rule. YouTube says streams under 12 hours are archived automatically. A 24/7 stream will not keep a full recording, which is usually fine for a webcam.
  • Restart on a schedule. Some owners restart the stream once a day at a quiet hour to clear small glitches.
  • Watch stream health. Platforms show warnings for low bitrate, wrong keyframe interval or dropped frames.
  • Put the encoder, router and switch on a UPS so short power cuts do not end the stream.
  • Use constant bitrate (CBR). Platforms handle a steady bitrate better than one that jumps with every gust of wind, and your data use stays predictable.
  • Keep firmware and encoder software updated, but schedule updates for a quiet hour so the stream is not cut at sunset.

RTMP compared with newer ingest options

RTMPRTMPSSRTHLS ingest
EncryptedNoYes (TLS)Yes (optional AES)Yes over HTTPS
TransportTCPTCPUDP with recoveryHTTP(S)
Handles lossy linksSo-soSo-soWellOK
Encoder supportUniversalVery commonGrowingSome
Good forLegacy camerasMost webcams4G and unstable networksNewer codecs on YouTube

YouTube’s help pages mention RTMPS, HLS and SRT (with some verified encoders). For a typical webcam on a wired connection, RTMPS is the simple, safe choice. On a shaky 4G link, SRT can ride through packet loss better if your encoder and platform support it. See 4G/LTE cameras.

Common RTMP problems

  • “Connection failed”: wrong URL, a typo in the key, or a firewall blocking port 1935. Try the RTMPS URL on port 443.
  • Stream connects but no video on the platform: the codec may be wrong; use H.264 video and AAC audio.
  • Frequent reconnects: upload speed dips below the bitrate. Lower the bitrate or switch to a wired connection.
  • Audio missing: some platforms expect an audio track. Send silent audio if the camera has none, or check the platform’s guidance. For privacy, a webcam’s microphone is usually best off; see US filming and audio laws.

Do these next

  1. Check whether your camera supports RTMP or RTMPS, or pick an encoder.
  2. Set up your YouTube stream with a persistent key.
  3. Submit the stream so people can find it on LiveLocation.

Questions people ask

What is RTMP used for today?

Mostly for ingest: pushing a live stream from an encoder or camera to a platform such as YouTube, Twitch or Facebook. Viewers then watch the platform’s converted version, usually HLS or DASH.

What is the difference between RTMP and RTMPS?

RTMPS is RTMP inside TLS encryption, like HTTPS for websites. It protects your stream key and video in transit and often uses port 443. Use it whenever it is available.

What port does RTMP use?

Port 1935 by default. RTMPS commonly uses port 443. Both are outbound connections from your encoder; you do not need to open any ports on your router.

Can an IP camera stream directly to YouTube?

Some can: they have built-in RTMP settings for a server URL and stream key. Others need an encoder, such as OBS on a PC or a small hardware box, to pull the camera’s RTSP stream and push it to YouTube.

What happens if someone gets my stream key?

They can broadcast on your channel. Reset the key in your platform’s dashboard right away and update your encoder with the new one.

Sources

  1. Adobe RTMP Specification 1.0 (2012), archived copy (checked 2026-10-07)
  2. YouTube Help: Choose live encoder settings, bitrates and resolutions (checked 2026-10-07)
  3. YouTube Help: Create a live stream with an encoder (checked 2026-10-07)
  4. Adobe: Flash Player end of life (checked 2026-10-07)
  5. RFC 8216: HTTP Live Streaming (IETF) (checked 2026-10-07)
  6. Reolink RLC-810A specifications (RTSP, RTMP) (checked 2026-10-07)

Last reviewed October 7, 2026 by the LiveLocation team. General information, not legal or electrical advice.