Stream live on Twitch with Open Live
Open Live is a live production studio in the cloud. You mix cameras, graphics and guests in your browser with Open Live Studio, and Open Live publishes the finished programme to Twitch, YouTube or Facebook. Nothing heavier than a laptop is needed at the venue.
This guide takes a camera to a live Twitch stream in five steps. Open Live Ingest, a small tool on the computer your camera is plugged into, sends the camera to Open Live and adds it as a source in Studio. Open Live then publishes your programme to Twitch over RTMP.
Before you start
-
An Open Live instance, and access to Open Live
Studio. Copy its address, for example
https://<name>.eyevinn-open-live.auto.prod-se.osaas.io. - A Mac or a Linux computer with your camera. A built-in or USB camera works, and so does a capture card such as a DeckLink. Windows is not supported.
- An Open Source Cloud Personal Access Token. Create one in the OSC web console under Settings, API. It lets Open Live Ingest add your cameras as sources.
- Your Twitch stream key. In the Twitch Creator Dashboard, open Settings → Stream and copy the Primary Stream key. Treat it like a password.
- Upload bandwidth comfortably above the bitrate you send. Open Live Ingest sends 6000 kbps by default, so plan for more than 6 Mbit/s up.
- Outbound UDP from the camera computer to Open Live's Strom server, on the SRT ports that setup shows in step 2 (47110 to 47129 on Open Source Cloud). Nothing inbound is needed. Some corporate networks block outbound UDP.
Step 1: Install Open Live Ingest
One command installs Open Live Ingest and the Strom release it is built against. Strom is the media engine that captures and encodes your camera on this computer.
curl -fsSL https://raw.githubusercontent.com/Eyevinn/open-live-ingest/main/install.sh | sh
It ends with
Done. Next: open-live-ingest setup, then open-live-ingest up.
Check both tools:
open-live-ingest --version
strom --version
On a Mac, use Strom 0.8.1 or later. Strom 0.8.0 drops frames from Mac cameras, and the installer currently brings 0.8.0. Replace it in the same folder, then check the version:
curl -fsSL https://raw.githubusercontent.com/Eyevinn/strom/main/install.sh | AUTO_INSTALL=true VERSION=v0.8.1 SKIP_GSTREAMER=true SKIP_GRAPHVIZ=true INSTALL_DIR="$(dirname "$(command -v strom)")" bash
strom --version
The last command should print strom 0.8.1.
Other Mac notes:
-
If the installer stops on the Xcode license and GStreamer is already
installed, run it again with
SKIP_GSTREAMER=truein front ofsh. - Run Open Live Ingest from the Terminal app. The first time it opens the camera, macOS asks for camera access. Allow it, or the camera sends nothing.
Step 2: Connect it to Open Live
Put it in the environment, then run setup with a name for this computer and your instance address. The name prefixes every source it adds, so pick something you will recognise in Studio, such as the venue.
export OLI_OPEN_LIVE_API_KEY='<your Personal Access Token>'
open-live-ingest setup --non-interactive --name "Studio A" --open-live-url "https://<name>.eyevinn-open-live.auto.prod-se.osaas.io"
Every line under Gateway, Open Live, Uplink and Capture should start
with ✔, including
reached Open Live; feeds will go to its Strom at <host>.
A line under Local Strom that says nothing listening is
normal: Open Live Ingest starts its own Strom. The last line says
where the settings were saved. Setup stores it there, so you only
export it once.
If setup says Open Live publishes no SRT port range, add
--port-range 47110-47129 and run it again. Any other
Error: line names its own fix.
Then list the cameras this computer can see:
open-live-ingest devices
Step 3: Start the camera and add it to a production
-
Try the link first with a test pattern and tone:
open-live-ingest up --testA test pattern source appears under I/O → Sources in Studio. Press Ctrl-C when you have seen it arrive.
-
Start your camera.
upstarts every camera it finds, so name the one you want:open-live-ingest up --devices "FaceTime"Use any part of the name that
open-live-ingest devicesprinted. To send several cameras, list them separated by commas. - Each camera appears under I/O → Sources, named after this computer and the camera.
- Open your production and assign the camera to an input under Setup → Sources.
Keep the terminal open while you are live. Closing an SSH session does not stop the feed. A Mac's built-in camera sends picture only, so take the show's sound from another source.
Step 4: Add Twitch as a destination
- In Studio, go to I/O → Outputs and click + New Output.
- Name: for example
Twitch. - Type: RTMP.
- Platform: Twitch. Open Live fills in the Twitch ingest URL itself, so you never type it.
- Stream key: paste your Twitch key. The field is masked. After you save, Studio only shows (a key is stored) and never shows the key again.
- Click Save.
- Open your production. Under Setup → Outputs, add an output slot and choose Twitch.
- Under Configuration, set the encoder before you activate. These settings cannot be changed while the production is live:
| Setting | Recommended for Twitch |
|---|---|
| PGM Resolution | 1280×720 |
| PGM Frame Rate | 25 fps |
| PGM Encoder Bitrate | 6000 kbps |
The same programme encode also feeds your recordings and SRT outputs, so it sets their quality too. You can add YouTube and Facebook outputs the same way and stream to all of them at once.
Step 5: Go live and check it on Twitch
- On the production card, click Activate. Publishing to Twitch starts straight away, and whatever is on programme goes out, so start on a test pattern.
- Start Open Live Ingest if it is not running yet (step 3). The camera tile on the multiviewer shows your picture within a few seconds.
- Open the Twitch Stream Manager and wait for the preview to appear.
- Go back to Open Live Studio and cut the show. Twitch viewers see programme a few seconds behind you.
- To end the show, click Deactivate on the production card. That stops the Twitch stream.
-
Then press Ctrl-C in the terminal. Open Live Ingest stops the camera
and removes its sources from Studio.
open-live-ingest downdoes the same from another terminal.
The Twitch row under I/O → Outputs
shows a status badge while you are live. It reports only whether the
connection is up, so use Twitch's Stream Health view for bitrate and
dropped frames. On the camera computer,
open-live-ingest status shows each camera's upload rate
and round-trip time.
Troubleshooting
| What you see | What to check |
|---|---|
Setup says needs a credential, or that the
credential has expired
|
Export a current Personal Access Token (step 2) and run setup again |
up stops with no free SRT port left |
More cameras than SRT ports. Name the cameras you want with
--devices. In the setup without a Personal Access
Token, each camera needs its own source and port
|
| The camera sends nothing on a Mac |
macOS has blocked camera access. Open System Settings → Privacy
& Security → Camera and allow Terminal, then start
up again
|
| The camera tile stays black |
The production is active, and the camera is assigned to an
input. open-live-ingest status shows no upload until
something receives the feed
|
| The picture stutters or freezes on a Mac | strom --version shows 0.8.1 or later (step 1) |
| Picture is fine in Open Live, but nothing reaches Twitch | The Twitch output was assigned before you activated. The key is current: resetting it in Twitch invalidates the stored one, so paste it again under I/O → Outputs |
| Twitch warns about bitrate or buffering | Lower PGM Encoder Bitrate to 6000 kbps or less, deactivate, and activate again |
| The activation error mentions the Twitch output | Read the message on the production card. It names the block and the reason |
Without a Personal Access Token: a source you create yourself
If you cannot use a Personal Access Token, create the source in Studio and point Open Live Ingest straight at it.
-
In Studio, go to I/O → Sources, click
+ New Source, choose MPEG-TS/SRT,
Direction Listener, and save. Copy its
Ingest address, which reads
srt://<host>:<port>?mode=caller. - Assign the source to an input in your production.
-
On the camera computer, set Open Live Ingest to send to that host and port without adding sources itself:
open-live-ingest setup --non-interactive --name "Studio A" --open-live-url "<instance address>" --no-register --uplink-host <host> --port-range <port> -
Activate the production, then start one camera with
open-live-ingest up --devices "<camera>". One port carries one camera.
When you stop with Ctrl-C, the source stays in Studio, because you created it.
Known limits
- Encoder settings are not tuned per platform. Twitch Inspector showed the 2-second keyframe interval Twitch asks for at 25 fps. The encode is VBR, not CBR, but Twitch's Stream Health raised no warning.
-
The Twitch ingest is fixed to
rtmp://live.twitch.tv/app, which picks a nearby server for you. For a specific Twitch server or RTMPS, use Platform: Custom RTMP with your own URL. - Destination status reports only the connection, not bitrate or health.
- Open Live Ingest captures cameras and capture cards, not your screen or a game. It runs on macOS and Linux only. For screen or game streaming, OBS is the better tool.
- Twitch figures in this guide are approximate. Check Twitch's broadcasting guidelines for current limits.
Sources
- Open Live Ingest README and quickstart: install, setup, commands
- Open Live Studio user guide: sources, outputs, configuration
- open-live#319: RTMP output with YouTube, Twitch and Facebook presets
- strom#1183: Mac camera frame drops, fixed in Strom 0.8.1
Ready to go live on Twitch?
Subscribe to Open Live, connect your camera with Open Live Ingest, and add Twitch as an output in Studio.