Confused on Steam Play and Proton? Be sure to check out our guide.
We do often include affiliate links to earn us some pennies. See more here.

I’ve had a number of requests to get a guide up on how to livestream from Linux to Twitch. It’s damn easy, so here’s how to do it.

Note: While this is aimed at Twitch, the process is exactly the same for any streaming service OBS Studio supports (apart from grabbing the streaming key of course, that's different for each service). OBS Studio supports Youtube, Twitch, hitbox, beam.pro and more out of the box.

First, download OBS Studio which on Arch is available in the repository, but for Ubuntu head to this page and follow the instructions for adding the repository and installing it.

Now, make sure you’re signed up on Twitch. Then head to the "Account Settings" available when clicking your avatar, and select the "Channel and Videos" tab with the first field being the key you need. See these images below:

Once there, hit the Show button and copy the entire thing. The Stream Key is yours and yours alone, do not share it. It's essentially the password to livestream to your Twitch channel. Make sure there’s no hidden space at the end of what you copy, as that will register as a character in OBS Studio and then your stream won't work. It's a small thing, but it has happened to numerous people.

Once you open OBS Studio, hit the "Settings" button on the right and then select the "Stream" tab on the left:

imageimage

Paste in the Stream Key I told you to copy earlier and pick a Server close to you.

Next, you need to actually sort out the video settings for what you’re going to be sending to the Twitch servers. Go to the "Video" tab on the left. You want to make sure you resolution is correctly set. Streaming at 1080p (1920x1080) can be quite demanding on your hardware, so unless you're streaming simple games or your have a powerful computer (or a capture card) you might want to start with 720p:
image
The “Output (Scaled) Resolution” is what you will be sending to your viewers. Also, you likely want it set to “30” for FPS, as having it higher is also more demanding on your system.

Next up, you need to sort out the Bitrate settings for the the video you send to the Twitch servers. This depends on your resolution and your target FPS. Here's a quick list (from here):

  • 720p 30FPS - 3000 kbps Bitrate
  • 720p 60FPS - 4500 kbps Bitrate
  • 1080p 60FPS - 6000 kbps Bitrate
image

The higher the number, the higher the quality of your video will be, but it will depend on you having a good internet upload speed. A good rule to follow for those on low-speed connections, is to set the Bitrate to about half of your maximum upload speed. So if you get 5mb/s download, a 2500 Bitrate should do. Don't go higher than 6000, as that's Twitch's current limit for normal streams.

Now that's all the work behind closed doors sorted, you need to actually show something to your audience. The best option in my opinion, is not to livestream your whole screen. Instead, I use the Window Capture option, then everything else can stay private and messages from applications you left open won't end up in the middle of the screen for all to see. Doing this is also simple! On the main OBS Studio screen, click the little + under the "Sources" panel to add it:
image
Give it a name and then you will be greeted with this:

image

Just pick which application or game you want from the "Window" dropdown box and then that will be shown to your viewers.

Once that's done, close the Settings panel and hit "Start Streaming" and that's all there is to it.

Happy streaming Linux gamers!

Article taken from GamingOnLinux.com.
Tags: HOWTO, Livestream
17 Likes
About the author -
author picture
I am the owner of GamingOnLinux. After discovering Linux back in the days of Mandrake in 2003, I constantly checked on the progress of Linux until Ubuntu appeared on the scene and it helped me to really love it. You can reach me easily by emailing GamingOnLinux directly. You can also follow my personal adventures on Bluesky.
See more from me
The comments on this article are closed.
All posts need to follow our rules. For users logged in: please hit the Report Flag icon on any post that breaks the rules or contains illegal / harmful content. Guest readers can email us for any issues.
12 comments

g000h Mar 7, 2017
Thanks for sharing. Always good to have information like this in case I'd need it.

One thing I think a lot of new Linux gaming users would like is information about setting up graphics drivers on Linux. What to do if your display manager stops working, how to install a proprietary driver (and get rid of it again), all those tricky things.
whatever Mar 7, 2017
If only I had a half decent line... I can barely watch streams at low quality lol
I can't even play games :'(
Guest Mar 7, 2017
This could be one of the situations where a Ryzen CPU would benefit with its many cores and threads.
Dribbleondo Mar 8, 2017
You may wanna send Ubuntu users to the compile page instead, or a version of OBS 17+, which doesn;t have the X11 RAM memory flooding error.
CJOR Mar 8, 2017
Great! Thanks for the Twitch Community!
Leeo97one Mar 9, 2017
Good guide, it should be on the Wiki ;-)
14 Mar 14, 2017
View PC info
  • Supporter Plus
Scaling the output resolution is more demanding on local hardware but saves on upload bandwidth. If you wanted to save on processing time, you'd need to change the resolution in your game itself.

Depending on the game you're playing, you may want to use CPU or GPU encoding... whichever has more processing power to spare.
GloriousEggroll Mar 16, 2017
side note, if you want web notifications (such as from twitchalerts), you can also install the qt webkit browser source plugin.

github source:
https://github.com/bazukas/obs-qtwebkit

arch AUR:
pacaur -S obs-qtwebkit-git

then open obs, right click sources>add browser source and paste your url

side note #2: if you have an nvidia 600 series or higher gpu with the proprietary drivers, you can use nvenc to encode your stream in obs instead of x264, which is particularly useful if you don't have a strong cpu. nvenc uses dedicated encoding hardware on nvidia maxwell gpus (and higher) which does not take away from gpu performance. this is also what nvidia uses for shadowplay. amd has something similar as well which can also be used in OBS, but i don't remember the name of it.


Last edited by GloriousEggroll on 16 March 2017 at 4:57 pm UTC
Binogure Mar 16, 2017
Is it only a gaming-community streamers, or can I stream my sketch done via Krita with the Linux-Streamers flag ? ?
Liam Dawe Mar 16, 2017
Is it only a gaming-community streamers, or can I stream my sketch done via Krita with the Linux-Streamers flag ? ?
All Linux Streamers welcome :)
Liam Dawe Apr 25, 2020
Note: Article has been updated to remove the community mention, since Twitch took that away long ago and refresh shots on where to get the Twitch stream key.
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
The comments on this article are closed.