CastreamHelp Center
Open Castream
← Back to Help Center

Getting Started

What Is RTMP? Stream Keys and Server URLs Explained

What Is RTMP? Stream Keys and Server URLs Explained

RTMP sounds like something a robot would say. In reality, it's just the delivery system that carries live video from your phone or computer to platforms like YouTube, Twitch, TikTok, and Instagram. You've probably already used it — every "stream key" you've ever pasted somewhere was RTMP doing its job.

Here's the whole thing in plain language.

RTMP in one paragraph

RTMP stands for Real-Time Messaging Protocol. Forget the name — what matters is what it does: it takes the video your camera captures, chops it into small pieces, and ships those pieces across the internet to a platform's servers, fast enough that viewers see it live. It's been the backbone of live streaming for nearly two decades. When you "go live," RTMP is almost always the thing carrying your video.

The two things you actually need to know

Every RTMP connection boils down to two pieces of information. That's it. Two.

1. The server URL — the street address

The server URL (sometimes called the ingest URL or RTMP URL) is the address of the platform's front door. It's where your video gets delivered.

It looks something like this:

rtmp://a.rtmp.youtube.com/live2

Think of it as a street address. You're telling your streaming app: "take my video to this building." YouTube's building, Twitch's building, TikTok's building — each has its own address.

2. The stream key — the secret password

The stream key is a long string of random-looking characters, something like:

abcd-ef12-3456-gh78-ijkl

This is what proves the video is yours. When your video arrives at the platform's front door, the stream key says "this belongs to Alfonso's channel — put it on his live page, not someone else's."

Two important things about stream keys:

  • They're secret. Anyone with your stream key can broadcast to your channel. Never post one in a screenshot, a Discord message, or a tutorial video.
  • They can change. Some platforms rotate keys regularly or expire them after a while. If your stream suddenly stops connecting and nothing else changed, generating a fresh key is the first thing to try.

Where to find yours

Every platform hides these in a slightly different spot, but the pattern is always the same: go to the live/streaming settings area of your account.

  • YouTube: YouTube Studio → Go Live → Stream settings. Your stream key is right there; the server URL is listed as the primary ingest server.
  • Twitch: Creator Dashboard → Settings → Stream. Primary stream key, one click to copy.
  • TikTok: The LIVE setup area — look for "stream key," "LIVE Center," or "go live from desktop." Note that not every TikTok account has RTMP access; our TikTok RTMP guide covers eligibility and the exact steps.
  • Instagram: Instagram Live via RTMP is set up through a similar key-based flow — see our Instagram RTMP guide.
  • Castream itself: If you stream through OBS, Castream gives you its own RTMP URL and stream key on Castream Web, so OBS knows where to send your video. Our OBS guide walks through it.

How Castream uses RTMP behind the scenes

This is where it clicks for most people. There are actually two RTMP hops in a Castream multistream:

Hop 1 — you to Castream. Your phone app or OBS sends one RTMP stream to Castream's servers, using Castream's server URL and your Castream stream key.

Hop 2 — Castream to your platforms. Castream takes that single incoming stream and forwards copies to each destination you've connected — YouTube gets one, Twitch gets one, TikTok gets one — using each platform's server URL and stream key that you saved when you set up the destination.

You only ever deal with hop 1 directly. Hop 2 happens automatically once your destinations are saved under Settings → Destinations. That's the whole magic trick of multistreaming: one upload from you, many deliveries handled for you.

A 30-second glossary

You'll bump into these terms in encoder and platform settings. Now you know enough to decode them:

  • Ingest — the platform's receiving end. "Ingest server" = the server URL. Same thing.
  • Encoder — the software or chip that compresses your video before sending it (OBS, your phone's camera pipeline, etc.).
  • CBR (Constant Bitrate) — sends data at a steady rate. What you want for live streaming; it keeps playback smooth.
  • VBR (Variable Bitrate) — data rate goes up and down with scene complexity. Great for recorded video, risky for live.
  • Keyframe (I-frame) — a full snapshot of the picture. Between keyframes, only changes are sent. The "keyframe interval" (usually 2 seconds) is how often those snapshots go out — platforms use them to let viewers join mid-stream without waiting.
  • Latency — the delay between you doing something and viewers seeing it. Typically 5–30 seconds on most platforms. Totally normal.

Why is everything still RTMP?

Fair question — the protocol is old enough to vote. Newer options exist (SRT, WebRTC, QUIC-based protocols), and some platforms use them internally. But RTMP endures for one reason: everything speaks it. Every encoder, every platform's custom ingest, every multistreaming service. When you paste a server URL and stream key into OBS, that's RTMP — and it works the same way it did a decade ago. For getting your video from point A to point B reliably, boring and universal beats new and fragmented.

Three mistakes everyone makes once

Pasting the key with a stray space. Copy-paste sometimes grabs an invisible space at the start or end. The platform rejects it silently, and you stare at a "can't connect" error for twenty minutes. If a key isn't working, retype it by hand or re-copy carefully.

Mixing up which key goes where. Your YouTube key goes in the YouTube destination. Your TikTok key goes in the TikTok destination. It sounds obvious, but when you're setting up four destinations at midnight before a morning stream, mistakes happen. Label things as you go.

Sharing your screen with the key visible. Streamers do setup walkthroughs, share their screen on a call, or record tutorials — with the stream key sitting right there in the settings panel. If that ever happens, reset the key immediately on the platform. Most platforms let you generate a new one in one click.

Do you need to understand any of this to stream?

Honestly? Not really. Castream's destination setup walks you through pasting two values per platform, and after that you never think about RTMP again — you just tap Go Live. But knowing what those two values are turns "my stream won't connect" from a panic into a five-minute fix: check the address, check the key, refresh the key if needed.

That's the entire protocol. An address and a password, doing the job they've done since before most TikTok stars were born.