Restreaming
While a stream plays on your own site, Cardinal can send it on to up to five other services at once — YouTube, Twitch, Facebook, or anything that takes RTMP or RTMPS. Your encoder sends one stream to Cardinal; we copy it to each service.
How it works
Section titled “How it works”- The video goes out exactly as your encoder sends it. We copy it to each destination without re-encoding, so it reaches them at the quality you send, with nothing added. That also means your encoder settings must suit every service you send to — see Encoder settings.
- Destinations follow the broadcast. Add them before you go live or while you are live. Sending starts when the stream goes live and stops when it ends. If a service drops the connection, we reconnect on our own.
- Use RTMPS where the service offers it. It encrypts the stream on its
way to the service. A plain
rtmp://destination receives the stream unencrypted.
Adding a destination
Section titled “Adding a destination”Each destination needs the service’s server URL and your stream key from that service:
curl -X POST "https://api.cardinalstreaming.com/v1/streams/$PLAYBACK_ID/destinations" \ -H "Authorization: Bearer $CARDINAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{"name": "YouTube", "url": "rtmps://a.rtmps.youtube.com/live2", "stream_key": "…"}'The stream key is a password for your channel on that service. We store it encrypted, never show it again — the API returns only its last four characters — and delete it an hour after the broadcast ends.
Pause a destination with PATCH …/destinations/{id} and {"enabled": false},
and remove it with DELETE. See Restreaming in the API
reference for every field.
Watching a destination
Section titled “Watching a destination”Each destination reports a status:
| Status | Meaning |
|---|---|
idle |
Waiting for the broadcast to go live. |
connecting |
Connecting to the service. |
live |
The service is receiving the stream. |
failing |
The service refused or dropped the stream; last_error says why, and we keep retrying while the broadcast is live. |
A paused destination ("enabled": false) sends nothing until you turn it back
on.
A refused stream key reads “the service refused the stream; check the stream key and that the service is ready to go live.” Most services also refuse a stream until you have set up the live event on their side.
YouTube
Section titled “YouTube”- Your channel must be allowed to live stream: verify it with a phone number, then turn on live streaming in YouTube Studio. The first time can take up to a day, so do it well before the broadcast.
- In YouTube Studio, choose Create → Go live → Stream.
- Copy the Stream URL — choose the secure (RTMPS) one — and the Stream key, and add them as a destination.
YouTube asks for H.264 video with a keyframe at least every 4 seconds (2 is recommended) and AAC audio.
Twitch
Section titled “Twitch”- Turn on two-factor authentication for the Twitch account. Twitch requires it before you can stream.
- In the Twitch Creator Dashboard, open Settings → Stream and copy your Primary Stream key.
- Add a destination with the server URL
rtmps://ingest.global-contribute.live-video.net/appand that key.
Twitch’s broadcasting guidelines call for a 2-second keyframe interval and
top out at 1080p at 60 frames a second, 6,000 Kbps. Send Twitch a
standard_1080p broadcast within those limits.
- Facebook allows live streaming from a Page or professional profile once the account is at least 60 days old and the Page or profile has at least 100 followers.
- In Live Producer, choose Streaming software. Turn on Use a persistent stream key if you want the same key to work every week; otherwise a key works for one live video.
- Copy the Server URL and Stream key and add them as a destination. Facebook accepts RTMPS only.
Facebook asks for H.264 video with a keyframe every 2 to 4 seconds, AAC audio, and limits a broadcast to eight hours.
Encoder settings that suit every service
Section titled “Encoder settings that suit every service”Because each service receives your encoder’s stream as it is, set your encoder to what every destination accepts. These settings suit YouTube, Twitch and Facebook together, as well as Cardinal’s own player:
| Setting | Value |
|---|---|
| Video | H.264, constant bitrate (CBR) |
| Resolution | 1920×1080 at 30 or 60 frames a second |
| Video bitrate | 6,000 Kbps or less |
| Keyframe interval | 2 seconds |
| Audio | AAC, 48 kHz, stereo, 128–160 Kbps |
See Encoder settings for where each one is in OBS and common hardware encoders.
Each destination is billed per destination-hour while it is live: $1 an hour for a 1080p stream, $3 for 4K, rounded up to the minute once per destination per broadcast, with no minimum. Time spent connecting, failing or paused is never billed, so a destination that never connects costs nothing.