X (formerly Twitter) supports live video broadcasting through its Media Studio platform. You can connect X as a streaming destination in Castr using custom RTMP and multistream to X alongside YouTube, Facebook, and other platforms simultaneously.
ℹ️ Prerequisite: You need an X Premium or Premium+ subscription to access Media Studio and go live via RTMP on desktop. Mobile users with public accounts can broadcast without Premium, but streaming through an encoder (OBS, Castr, etc.) requires a paid X Premium subscription.
Step 1: Get Your RTMP Stream Key from X
Sign in to your X account
Go to X Media Studio at studio.x.com (or access it from the X sidebar menu under More → Media Studio)
Click on the Sources tab
Click Create Source — give it a name, ensure RTMP is selected as the source type, and select the closest Region to your location. Then click Create
You'll now see your RTMP credentials:
RTMPS URL (recommended — more secure than RTMP)
RTMP Stream Key
Next, go to the Broadcasts tab and click Create Broadcast
Enter a name and select a category for your live stream
Under Source, select the source you just created
⚠️ Note: X has a limit of 100 sources per account. You can delete sources you no longer need.
Step 2: Add X as a Platform in Castr
Log in to your Castr Dashboard
Open an existing livestream project or create a new one
Click Add Platform
Select Custom RTMP (X may also appear as "Twitter" in the platform list)
Paste the RTMPS URL into the Stream Server field
Paste the Stream Key into the Stream Key field
Click Add Platform to save
You can now add more platforms for multistreaming to broadcast to X and other destinations at the same time.
Step 3: Go Live
Start sending your stream to Castr from your encoder (e.g., OBS Studio, Wirecast, vMix, or a mobile app like Larix)
Once Castr receives your stream, it will forward it to X and any other connected platforms
Important: Go back to X Media Studio → Broadcasts and click Go Live (or Start Broadcast) to make your stream visible to your audience on X. Simply sending the RTMP feed is not enough — you must manually start the broadcast from Media Studio.
⚠️ Note: If you scheduled your broadcast, it will go into a TIMED OUT state immediately if no RTMP stream is being sent at the scheduled start time. Make sure your encoder is actively streaming to Castr before the broadcast start time.
Recommended Stream Settings for X
Setting | Recommended | Maximum |
Video Codec | H.264 / AVC | — |
Resolution | 1280×720 (720p) | 1920×1080 (1080p) |
Frame Rate | 30 fps | 60 fps |
Video Bitrate | 9,000 Kbps | 12,000 Kbps |
Audio Codec | AAC | — |
Audio Bitrate | 128 Kbps | — |
Audio Sample Rate | 48 kHz | — |
Keyframe Interval | 3 seconds | — |
Troubleshooting
Stream not appearing on X: Make sure you clicked Go Live or Start Broadcast in X Media Studio after your stream is connected. Castr sends the RTMP feed, but the broadcast must be manually started on X's side.
"No access to Media Studio": You need an X Premium or Premium+ subscription to use Media Studio and go live via RTMP. Check your subscription status in your X account settings.
Broadcast shows "TIMED OUT": This means X did not receive a stream at the scheduled broadcast time. Make sure your encoder is sending a stream to Castr and that Castr is forwarding to X before the broadcast start time.
Stream disconnects or fails: Double-check that your RTMPS URL and Stream Key are entered correctly in Castr. Use the RTMPS URL (not plain RTMP) for a more secure and stable connection. Also ensure the source region in X Media Studio is close to your physical location.
Poor video quality: Use H.264 encoding at the recommended 9,000 Kbps bitrate. Avoid using H.265/HEVC as X does not support it for RTMP ingest.
For further assistance, please reach out to Castr 24/7 Support — we are always happy to help.
