Guide · Facebook Live RTMP URL

Facebook Live RTMP URL and stream key: where to find them and how to use them

By the LoopStream Live team 6 min readUpdated
Quick answer

The Facebook Live server URL is rtmps://live-api-s.facebook.com:443/rtmp/. Facebook only accepts secure RTMPS on port 443. Get it and your stream key in Live Producer (facebook.com/live/producer): choose Streaming software as the video source and copy the Server URL and Stream key into your encoder. If Live Producer shows a different server address, use that one.

No server URL to copy: pick Facebook, paste your stream key and go live from your phone.
Start streaming
Facebook Live server URL (RTMPS)
rtmps://live-api-s.facebook.com:443/rtmp/
Alternative used by OBS's Facebook preset
rtmps://rtmp-api.facebook.com:443/rtmp/

To go live on Facebook from an encoder, a camera app or a cloud tool, you need two things: the server URL and a stream key. The server URL is Facebook's ingest address and is the same for everyone. The stream key is private and tells Facebook which profile, Page or group the video belongs to. This guide shows where to find both, which settings Facebook expects, and what to check when the stream won't connect.

Why Facebook needs RTMPS, not RTMP

Facebook only accepts live video over RTMPS, the encrypted version of RTMP, on port 443. An address that starts with rtmp:// (no s) or uses port 1935 will not connect. That is why every Facebook server URL starts with rtmps:// and contains :443. RTMPS also gets through most office, school and hotel networks, because port 443 is the same port normal websites use.

Live Producer sometimes shows a regional server address instead, for example one ending in fbcdn.net:443/rtmp/. Those are Facebook's own ingest servers too. Always use the exact Server URL Live Producer gives you for that live video.

How to find your Facebook stream key and server URL

  1. 1

    Open Live Producer

    Go to facebook.com/live/producer on a computer, or click Live video in the post box on your profile or Page and choose to create it in Live Producer.

  2. 2

    Choose where to post

    Pick where the live video goes: your profile, a Page you manage, or a group.

  3. 3

    Select Streaming software

    Under the video source, choose Streaming software instead of Webcam. This is the option for encoders and streaming tools.

  4. 4

    Copy the Server URL and Stream key

    Facebook now shows a Server URL and a Stream key. Click Copy next to each one. Turn on Use a persistent stream key in the setup options if you want a key you can reuse.

  5. 5

    Start the stream, then go live

    Paste both into your streaming tool and start sending. When the preview appears in Live Producer, add a title and click Go live.

Persistent stream key vs a one-time key

By default Facebook gives you a new stream key for each live video, and it stops working after that broadcast. A persistent stream key stays the same, so you can save it once in your encoder or cloud tool and reuse it for every live video on that profile, Page or group.

  • Use a persistent key for anything you go live with often, or for a looped stream you start again and again.
  • A persistent key carries one live video at a time.
  • Treat it like a password. Anyone with it can stream to your Page. If it leaks, reset it in Live Producer and paste the new one into your tools.

Facebook Live encoder settings

Meta's Live Video API reference lists these requirements for live video. Stay inside them and the stream is far less likely to be rejected or to buffer for viewers.

ResolutionFrame rateVideo bitrate
1920x108060 fps4,500 to 9,000 Kbps
1920x108030 fps3,000 to 6,000 Kbps
1280x72060 fps2,250 to 6,000 Kbps
1280x72030 fps1,500 to 4,000 Kbps
854x48030 fps600 to 2,000 Kbps
  • Video: H.264, with a keyframe every 2 seconds (never more than 4). Aim for a 16:9 frame.
  • Audio: AAC, stereo, 44.1 or 48 kHz, 128 kbps (up to 256 kbps).
  • Send both audio and video. A stream with no audio track can be rejected.
  • Length: a single Facebook live video can't run longer than 8 hours.

Where to paste the URL: OBS, FFmpeg and cloud tools

  • OBS Studio: open Settings, then Stream. Choose Facebook Live as the service and paste your stream key, or choose Custom and paste the Server URL and the key into their own fields.
  • vMix, Streamlabs, camera apps and hardware encoders: look for a Custom RTMP option and use the same two fields. Check that it supports RTMPS.
  • FFmpeg: join the server URL and the key with nothing in between (the URL already ends in a slash), as in the example below.
  • LoopStream Live: pick Facebook as the platform and paste your stream key. The app fills in Facebook's server for you.
ffmpeg -re -stream_loop -1 -i video.mp4 \
  -c:v libx264 -preset veryfast -b:v 4000k -maxrate 4000k -bufsize 8000k \
  -pix_fmt yuv420p -g 60 -c:a aac -b:a 128k -ar 48000 -ac 2 \
  -f flv "rtmps://live-api-s.facebook.com:443/rtmp/YOUR-STREAM-KEY"

This loops video.mp4 and sends it to Facebook as 1080p-ready H.264 at 4,000 Kbps with a keyframe every 2 seconds at 30 fps. It only runs while the computer running it stays on. To loop a video without leaving a computer on, see how to loop a video on a live stream.

Facebook Live RTMP not working? Check these first

  • The URL starts with rtmp:// instead of rtmps://, or is missing :443. Facebook only accepts RTMPS on port 443.
  • Your encoder doesn't support RTMPS. Update it, or switch to a tool that does.
  • The stream key was a one-time key from an earlier broadcast. Copy a fresh key, or turn on a persistent key.
  • The key is pasted into the URL field as well as the key field. Keep them in separate fields.
  • The preview arrived but you didn't click Go live in Live Producer. Facebook waits for that click.
  • The live video hit Facebook's 8-hour limit and ended. Start a new live video to keep going.
  • There's no audio track, or the keyframe interval is longer than 4 seconds. Fix the encoder settings above.

Going live on YouTube too?

YouTube uses a different server and plain RTMP is still allowed there. Here are the YouTube RTMP URLs, primary and backup, and how to find your YouTube stream key.

Go live on Facebook without copying server URLs: pick Facebook, paste your key, Go Live.
Start streaming

Frequently asked questions

What is the Facebook Live RTMP URL?

rtmps://live-api-s.facebook.com:443/rtmp/. Facebook requires the secure RTMPS version on port 443. If Live Producer shows a different Server URL for your live video, use that one.

Where do I find my Facebook stream key?

In Live Producer at facebook.com/live/producer. Choose where to post, select Streaming software as the video source, and copy the Stream key.

Does Facebook Live support plain RTMP?

No. Facebook only accepts RTMPS, so the server URL must start with rtmps:// and use port 443.

What is a persistent stream key on Facebook?

A stream key that stays the same for every live video, so you can save it in your tools once. Turn it on in Live Producer's setup options. It carries one live video at a time.

How long can a Facebook live stream be?

Up to 8 hours for a single live video, according to Meta's live video requirements. After that, start a new live video.

What bitrate should I use for Facebook Live?

For 1080p at 30 fps, Meta lists 3,000 to 6,000 Kbps. For 720p at 30 fps, 1,500 to 4,000 Kbps. Use H.264 video with a keyframe every 2 seconds and AAC audio at 128 kbps.

Can I stream a pre-recorded video to Facebook Live?

Yes. Any tool that sends video over RTMPS with your stream key can stream a recorded video, including a looped one. Facebook shows it to viewers like any other live video.