How to get your YouTube stream key and RTMP URL
A plain-English setup guide for streaming to YouTube.
Skip the setup. Stream to YouTube 24/7 from the cloud.
Upload once, paste your stream key, and StreamZop keeps it live around the clock with automatic restarts.
- No PC or OBS
- Live in ~2 minutes
- Auto-restart 24/7
- Free plan, no card
A YouTube stream key is a unique, secret code that lets streaming software or a service broadcast video to your channel over RTMP. You find it in YouTube Studio under Create, then Go Live, then the Stream tab: the key sits at the top-right of the live preview, labeled Stream key: Default stream, with its own Copy button. The matching RTMP ingest URL rtmp://a.rtmp.youtube.com/live2 is just below, in the Stream settings tab. The key and the URL work as a pair: the URL tells your encoder which server to reach, and the key tells YouTube which channel the video belongs to. Every channel shares the same ingest URL, so the key is the part that routes your broadcast to you. It comes in two forms, a single-use key that expires after one broadcast and a persistent key that stays the same for every stream, which is the one to use for an always-on channel. Keep the key private, because anyone who has it can stream to your channel.
Where to find your YouTube stream key
At studio.youtube.com, click Create (top right), then Go live.
In the Live Control Room, choose Stream (not Webcam). This is the encoder path 24/7 tools use.
At the top-right of the preview, find Stream key: Default stream and click Copy. (The Stream settings tab only holds the URL.)
Add the key to your stream, upload a video, and go live 24/7 from the cloud. No PC required.
Where to find your YouTube stream key
Open YouTube Studio
Go to studio.youtube.com and sign in to the channel you want to stream to.
Start Go Live
Click Create in the top right, then Go Live. The first time you enable live streaming, YouTube can take up to 24 hours to activate it, and your account must be verified with a phone number.
Choose the Stream tab
In the Live Control Room, pick Stream rather than Webcam. Stream is the option used for encoders and services that send pre-recorded or external video.
Copy your stream key
At the top-right of the live preview, find the Stream key selector (labeled Stream key: Default stream) and click Copy. The Stream settings tab below holds the Stream URL, rtmp://a.rtmp.youtube.com/live2.
Paste it into your encoder or StreamZop
Enter the stream key and URL in your software, or paste the key into StreamZop, and start broadcasting.
YouTube RTMP URL (primary and backup)
YouTube's primary ingest server is rtmp://a.rtmp.youtube.com/live2. If you want a failover, the backup ingest server is rtmp://b.rtmp.youtube.com/live2?backup=1. Your encoder sends video to that URL using your stream key, and YouTube shows it as your live broadcast. The same pair of values works in any RTMP encoder or cloud service, so once you have chosen your live encoder settings you never have to touch the ingest address again unless you reset the key.
Is it safe to share your stream key?
No. Treat your YouTube stream key like a password. Anyone who has it can broadcast to your channel, so do not paste it into public posts, Discord servers, or screenshots. A leaked key can be used to stream content you did not upload under your channel's name, which is why it is worth resetting the moment you suspect it has been seen. If it leaks, reset it from the Live Control Room. When you use it in StreamZop, the key is encrypted where it is stored and never shown back to anyone.
Do you need 1,000 subscribers to stream?
No. The 1,000-subscriber threshold applies only to live streaming from the YouTube mobile app. Streaming through a desktop encoder or a cloud service over RTMP has no subscriber requirement, so a brand-new channel can get a stream key and go live, including running a video 24/7.
Persistent versus single-use stream keys
YouTube offers two kinds of key. A single-use stream key is generated for one broadcast and stops working afterwards, while a persistent stream key stays the same across every stream, which is what you want for an always-on channel. A persistent key is also what lets you schedule a live stream that reuses the same details each time. If you plan to loop a pre-recorded live stream, choose the persistent key so the same details keep working after a restart, and paste it into your encoder or cloud service just once.
Using the key in encoder software versus the cloud
In desktop software like OBS, you paste the ingest URL into the Server field and the stream key into the Stream Key field, then start streaming. A cloud service works the same way but runs on remote servers, so you enter the key once and it keeps broadcasting even when your own machine is off. Both paths use the identical key and URL; the only difference is where the encoding happens.
Use your stream key to stream 24/7
Once you have your stream key, you can broadcast a pre-recorded video to YouTube around the clock without leaving a computer on. Paste the key into StreamZop, upload a video, and it loops 24/7 from the cloud, restarting itself automatically if the connection ever drops.
Put your video live 24/7, without a PC.
Upload once, paste your stream key, and StreamZop keeps it live around the clock with automatic restarts.
- No PC or OBS
- Live in ~2 minutes
- Auto-restart 24/7
- Free plan, no card
Frequently asked questions
What is a YouTube stream key?+
A YouTube stream key is a unique, secret code that lets an encoder or a streaming service send video to your channel over RTMP. It identifies your channel to YouTube's ingest servers so your broadcast appears as your live stream.
What is YouTube's RTMP URL?+
YouTube's primary RTMP ingest URL is rtmp://a.rtmp.youtube.com/live2. The backup ingest server is rtmp://b.rtmp.youtube.com/live2?backup=1. Your full stream target is that URL followed by your stream key.
Why can't I find my stream key?+
If you do not see it, live streaming may not be enabled yet. Verify your account with a phone number, and note that the first activation can take up to 24 hours. Once active, the stream key is at the top-right of the live preview in the Stream tab, labeled Stream key: Default stream, with a Copy button.
Do you need 1,000 subscribers to get a stream key?+
No. The 1,000-subscriber requirement applies only to live streaming from the YouTube mobile app. Streaming from a desktop encoder or a cloud service over RTMP has no subscriber requirement, so any verified channel can get a stream key.
Is it safe to share your YouTube stream key?+
No. Your stream key works like a password for your live channel: anyone who has it can broadcast to your channel. Never post it publicly or leave it visible in screenshots, and reset it if it leaks.
How do I reset my YouTube stream key?+
In the Live Control Room, open Stream settings, select the stream key menu, and choose to reset or create a new key. The previous key stops working immediately.
What is a persistent stream key?+
A persistent stream key stays the same across every broadcast, unlike a single-use key that stops working after one stream. A persistent key is the right choice for a 24/7 or recurring stream, since the same details keep working after each restart.
Can two encoders use the same stream key at once?+
No. YouTube accepts one active connection per stream key at a time. Sending video from two sources to the same key causes conflicts, so stop one before starting another, or reset the key.
