Linux Format

Further, faster, free-er streaming

Discover what else OBS can do, then cut the corporate cord and host your own stream with Owncast.

-

Now that we’ve got basic streaming covered it’s time to look further at what OBS can do. We won’t tell you how to make a good broadcast. To be honest we don’t know , but if it’s anything like making a good feature, then plan what you’re going to cover and probably don’t wing it all at the last minute (–Ed).

We’re big fans of DistroTube on Twitch, so if you’re planning a Linux-themed channel you could do a lot worse than following his example. Clicking in the Scene Collection box is easy during live broadcasts, so if your Scenes are all set up nicely before you start you won’t have to fumble around switching between sources and clumsily reposition­ing them on the fly. Once you’ve got the hang of Studio View then it’s easy to do smooth inter-scene transition­s on the fly, too.

To see what that’s about, hit the Studio View button and you’ll see two panes. Preview, on the left, shows the Scene that you’re planning, and Program on the right shows what you’re streaming (if indeed you’re doing that). Some basic transition­s (Cut, Fade and Fade to Black) are available by clicking the cog icon next to the Transition button. Add some transition­s, then rearrange some sources in the preview window. Use the slider to overlay the new scene manually, or hit the button to do it smoothly. Simple. We haven’t covered what kind of other media sources you might be fading into or out of, so now would be a good time to look at that.

You can add sources by clicking the + in the Sources panel. The simplest source is Text (Freetype2) which enables you to add captions to your videos. Choose that option, select Create New, give the source a sensible name (the text of the caption itself is reasonable), and then type in some text. And format it to your heart’s content. If you use Comic Sans then someone somewhere will judge you for it, but please, stick to your guns. The chat log mode enables recent IRC (or other) logs to be displayed, but if your streaming platform might has its own chat platform this can be added through View>Docks>Custom Browser Docks. Alternativ­ely, if you set up Owncast (which we’ll get to in a moment) then that has its own chat interface.

It’s also possible to capture your desktop, or a particular window and use that as a source in OBS. To capture the whole screen, use the Screen Capture (XSHM) source. You can capture individual screens or (in the advanced settings) a separate X server entirely. To capture a window, use Window Capture (Xcomposite). You can crop captures arbitraril­y, which is useful for showing the currently playing Scene. Remove any sources you don’t need with the minus button, and use the Scene Collection to collate sources into chapters.

Thanks to OBS’s plugin architectu­re, it’s easy to add custom features too. If you wanted to jazz up your game stream have your favourite search engine look up “OBS overlays”, which will provide you with all kinds of jazzy borders for your sources. You might be concerned that all these sources sound very X-centric and might not work on Wayland. In the latest release you don’t need to worry about this. OBS runs using XWayland, but behind the scenes Pipewire (and the slightly mythical sounding Desktop Portals) is used to make the magic happen.

Host your own stream

Proprietar­y streaming platforms (and their copious bandwidth) are all well and good, but we’re fans of selfhostin­g here. So we went hunting for something that

would enable us to take our broadcasts in-house, and it didn’t take us long to find Owncast, which is fantastica­lly simple to use. The demo on its website (https:// owncast.online) shows how you can be up and running in less than a minute. We’re more than happy to show you something similar here.

Owncast comes with its own online installer, which you can invoke with

$ curl -s https://owncast.online/install.sh | bash

It’s good practice to check scripts before running them, but since this one installs locally and doesn’t use the root account it’s less of a concern. The script will also install FFMPEG if it’s missing, because that’s what’s going to be doing all the transcodin­g. Owncast will now be installed in your home directory and you can start it as follows:

$ cd owncast

$ ./owncast

Now you can point your browser to http:// localhost:8080 (or the hostname or IP of the remote machine you installed it on). You should see the Owncast

interface, complete with chat. The first thing you should do is change the default streaming key (it’s abc123 ), otherwise anyone on your network could hijack your channel before it’s even begun. Or anyone on the Internet if your machine is accessible from there. So go to the admin page at http://localhost:8080/admin and change the stream key (which is also the password) in the Server Settings section. You can also change the site’s name, logo and descriptio­n to suite your personalit­y or purposes.

In order to get OBS talking to it, go to OBS’s Settings, and in the Stream section set the service to Custom. For the server use rtmp://localhost/live (replacing localhost with wherever Owncast is running) and use the stream key you set up earlier. Now if you start streaming in OBS, and head over the Owncast page, you should see yourself. Plus you’ll get some idea of the latency you’re dealing with.

Speaking of which, you can configure latency in

Owncast’s settings panel – it’s tempting to turn everything down to microsecon­ds, but unless you have a very low-latency connection to your viewers this will result in buffering. For most purposes it really doesn’t matter that things happen a few seconds before the internet sees them. You’ll get used to people in the chat taking a while to respond to your superbly delivered jokes and witticisms (we’re still waiting).

In order for viewers to connect to your stream, port 8080 of the machine running Owncast will need to be open. This means that you’ll need to brave your home routers settings here. Port 1935 needs to be open for OBS to connect to it over RTMP. You can change these in the settings, but remember that we’re running Owncast as a user here, so you’re not allowed to claim port 80.

If you want HTTPS – and you probably do for anything other than testing purposes – then it’s a little complex. The recommende­d way is to use a reverse proxy. You might already have one set up, but if not you’ll find instructio­ns for doing so on Apache and Nginx at https://owncast.online/docs/sslproxies. It’s also possibly to use the Site.js server administra­tion tool to install Owncast as a service with a simple flourish at the command line.

Exactly how many users you can stream to depends on your bandwidth and chosen resolution. We found that a 1,500kbps (kilobits, not kilobytes) stream was sufficient for our purposes, and since we allegedly have a 20Mbs upload speed (fibre is good, traffic-shaping policies might not be) that should accommodat­e a dozen or so users. That turned out fine for our party, but if you have more than 12 friends (What do you mean by ‘if’? – Ed), or would like to stream more bits to them and faster, then you can install Owncast on a VPS and have OBS connect remotely to it. Owncast also supports object storage providers, so (for a small investment) you can outsource the heavy lifting to the likes of Amazon S3, Backblaze or Digital Ocean Spaces.

 ??  ?? Adding a transparen­t BPYTop window to your stream is perhaps not the best monitoring solution, but it looks cool.
Adding a transparen­t BPYTop window to your stream is perhaps not the best monitoring solution, but it looks cool.
 ??  ?? It’s so easy to get started with Owncast – even your garden variety kitchen goblins can do it.
It’s so easy to get started with Owncast – even your garden variety kitchen goblins can do it.
 ??  ?? Use ProjectM to produce glorious visualisat­ions
(à la Winamp) for your audio.
Use ProjectM to produce glorious visualisat­ions (à la Winamp) for your audio.
 ??  ??

Newspapers in English

Newspapers from Australia