Easy Linux Game Streaming with OBS

by Alan Pope on 26 September 2019

For many, watching other people play games has long taken over from TV as the favoured source of entertainment content. As a creator, whether you stream via YouTube, Twitch.tv or Mixer, Open Broadcast Software (OBS) Studio is the swiss-army knife to do it. The OBS snap makes this a breeze, whichever Linux distro you’re playing on, and simplifies hardware-accelerated video encoding. Let’s take a look at the setup.

OBS snap

Drivers be driving

Put that NeoMagic and 3dfx Voodoo2 away, and bust out your gaming rig! As with other platforms, grabbing the latest video driver for your card is a good place to start. Whether you’re on team red or green, getting the latest video drivers on Linux has recently become a lot easier. 

Rolling distros based on Arch Linux, such as Manjaro, have up to date builds for nVidia, AMD and Intel users alike. Users of those distros can be confident they’re up to date by following the comprehensive Arch Wiki https://wiki.archlinux.org/index.php/Category:Graphics

Those on Ubuntu-based distributions built on 18.04 Long Term Support (LTS) and newer, can get their driver fix directly from the Ubuntu repositories. The ubuntu-drivers autoinstall command makes it easy to get the latest and greatest driver from the official archives

The Kernel of the Matter

Ubuntu LTS users can also optionally grab the Hardware Enablement Stack (HWE), which provides a newer, battle-tested Linux kernel to compliment the freshest X stack and associated libraries. For the full skinny on HWE, check out the wiki https://wiki.ubuntu.com/Kernel/LTSEnablementStack, but this one command should typically be sufficient

sudo apt install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04

OBS in one line

On any system that has support for snaps, obtaining OBS is a simple one-liner:.

sudo snap install obs-studio

That’s it.

If your system is missing snap support, never fear, we have beautiful distribution-specific instructions just for you. Simply follow the links at the bottom of https://snapcraft.io/obs-studio and you’re all set

Enable Encoding Everywhere

In the OBS settings pane, under the “Output” section, the “Advanced” Output Mode option hides the juicy hardware encoding options. For streamers with Intel based GPUs, enable “FFMPEG VAAPI”. Nvidia users can enable “nvenc”

Going Live

Now you’re all setup and ready to stream! If everything is working correctly, while streaming, take note of the CPU status in the lower-right of the OBS window. The CPU utilisation percentage should be significantly lower than when using software encoding. 

We welcome snap-specific issues over on the github issue tracker for the OBS snap, and wider discussion on our friendly snapcraft forum. Happy streaming!

Header photo by Franck V. on Unsplash

Newsletter Signup

Related posts

Snapcraft 8.0 and the respectable end of core18

‘E’s not pinin’! ‘E’s passed on! This base is no more! He has ceased to be! ‘E’s expired and gone to meet ‘is maker! ‘E’s a stiff! Bereft of life, ‘e rests in peace! If you hadn’t nailed ‘im to the perch ‘e’d be pushing up the daisies! ‘Is software processes are now ‘istory! ‘E’s […]

Creating Snaps on Ubuntu Touch

This article was written in collaboration with Alfred E. Neumayer of the UBports Project. Tablets, phones and current technology’s capabilities are phenomenal. Who would have thought a thin, light, barely 10 inch device would provide all the power necessary to run Virtual Machines, wherever one desires while powered on battery? That a sma […]

Managing software in complex network environments: the Snap Store Proxy

As enterprises grapple with the evolving landscape of security threats, the need to safeguard internal networks from the broader internet is increasingly important. In environments with restricted internet access, it can be difficult to manage software updates in an easy, reliable way. When managing devices in the field, change management […]