OBS (and derivates) streaming 101

in #streaming4 years ago

Here's a long post on streaming to any/all streaming services online.
OBS (and derivates) streaming guide 101

This guide is intended for windows users but linux/mac users should find settings extremely similar and easy to adapt to their own interface. What matter most are core concepts and general ideas. Once you grasp those, you can adapt anything to your needs.

The setup:
You have a PC. You want to stream a presentation, to make a live howto-guide, a coding tutorial, a blender donut video or to stream a game to twitch.

On your PC you need to run a piece of software that captures, encodes and sends the stream of video data to a website like twitch. There are many such pieces of software. Most popular ones are OBS and Streamlabs OBS.
Difference between OBS(open broadcaster software) and Streamlabs OBS is that the first one is rather general purpose and the latter is Gaming tuned and gaming specific. We’ll explain things using OBS in this guide but the general concepts apply to any other software, especially Streamlabs since it’s basically an OBS fork with a cool skin applied.

Capturing and encoding your game or your screen is where the magic happens.
Generally speaking your target parameters should be :

Encoder: x264 (Either CPU or Amd/Nvidia GPU - explained below)
Resolution: 1920 x 1080
Framerate: 60
Bitrate: at least 6000
Keyframe interval : 2 ( most providers want this set to 2, see yours at the bottom for specifics)

Now, regarding the encoding parameters, the best possible quality that I have tested/seen is encoding using the CPU with
CPU preset: fast or medium
Profile: high
Bitrate: 8000

This should work on an 8core/16 thread cpu. Ideally NOT the same one that you also play your games on.

GPU encoding is another story as as it is at the moment, nvidia really is the only viable option, and you need a turing encoder enabled card for the best image quality/performance. The cheapest one is a certain variant of 1650.
Full chart here: https://developer.nvidia.com/video-encode-decode-gpu-support-matrix
However, only GDDR6 models with TU106/TU116 GPUs have Turing encoder. Refer to this great techpowerup list to identify and buy only the models with TURING encoders.
https://www.techpowerup.com/gpu-specs/geforce-gtx-1650-super.c3411 (couldn’t find any non super variants that are still available at stores, but follow the tu106/tu116 requirement if you find any at your local retailer)

The cheapest PC that can PLAY and STREAM at 1080p 60FPS 8000kbit/s can be anything with said gpu above alongside anything 4core/8threads and up.
GPU encoding settings in obs should be as follows:
Encoder: Nvidia Nvenc h.264
Rate Control: CBR (means constant bitrate)
Bitrate: 8000 (youtube, twitch, dlive allow this even if twitch recommends 6000. 6000 just looks bad unless you can CPU encode with a separate dedicated powerful encoding only pc)
Keyframe :2 (as recommended bu most providers)
Preset : Max Quality (it’s hardware encoding so you should just as well max it all out)
Profile: high
Check look-ahead and psycho-visual tuning. Mouseover help suggests it improves visual quality at the cost of performance. I did not notice any performance difference so you should squeeze as much quality as possible.

That being said you should generally be set with a ONE pc gaming and streaming setup. And for streaming anything else other than fast paced games, it should be perfectly fine to handle it. Quite overpowered in case of presentations, coding/3d tutorials etc.

If you want a dual pc gaming setup and you dont want to invest money in a video capture card, You need a plugin called obs-ndi and your pcs connected via a gigabit ethernet connection. Don’t even think of trying this over wifi. Just don’t.
That plugin works exactly like this :
From your gaming pc, using obs, via plugin, you transmit over the local network an almost(maybe 100%?) lossless stream as if it was captured by your capture card.
On the encoding(aka streaming pc) another instance of obs with this plugin installed receives all that massive stream from your gaming pc at very low latencies which is somewhere around 3-400 megabits per second and shows it as a source in obs. That stream can be put on the canvas as if it was a monitor capture or a game capture, etc. Then you put on all your overlays as usual. This process is very low on resources and all that’s needed are 2 ethernet cables and one ethernet gigabit switch. You can use any of the ports of your gigabit router since most home routers have 4 gigabit ports in a switch mode configuration anyway.

Bugs/problems/stutters/etc:
Frame problems:
Missed frames: rendering frames lags, thus frames are missed.
Skipped frames: this happens when your gpu or cpu can’t handle the massive workload that you put on. For example even an RTX titan can be overloaded if you configure obs to stream 4k@120FPS (yes, you can, you can stream at however many FPS you want. As long as your computer is powerful enough). Skipped frames mean you really need to upgrade your CPU or lower your encoding settings. You most likely won’t see this anyway if you’re encoding using the new nvidia turing enabled gpus as described above. If you opt to encode on CPU, make sure the system is silent meaning no other programs are running (including windows update/defender etc. Check o&o shutup10 https://www.oo-software.com/en/shutup10 and install it on your streaming pc and disable all windows updates/antivirus etc) make sure obs runs with elevated priority (Settings - Advanced - Process priority - High) and make sure your cpu is actually powerful enough. An 8core/16thread cpu can do fast/high 1080p60fps even while gaming but the experience won’t be amazing.
Generally speaking, if you have a turing encoded stream you won’t drop frames.

Dropped frames: This means network problems. They are vast but generally make sure your network drivers are properly installed (sometimes windows default drivers are ok, other times especially on realtek/killer lan you may need the drivers from the manufacturer. I personally had issues even on intel network adapters) Then check your router. Make sure nobody is messing your network by throttling with torrents or steam downloads or 4k youtube videos. When you are streaming, the network should prioritize your stream above all other packets.

What about stutters and weird drops?
Are you running any OSD software like msi afterburner ? exit it and check again. Are your stutters and frame drops evident on stream but obs reports zero skipped and dropped frames ?
You may need to limit your game to 60fps or if it’s an esports title to multiples of 60 like 120 180 etc. if you’re playing csgo and your framerate is all over the place with lows at around 60 and highs at around 250 then your stream may seem very stuttery because at times the encoder gets just about what it needs for a 1-1 frame encode, other times it gets 250 frames each second instead of 60 so, it has to drop one frame every 4.16 frames to keep your stream at 60fps. That creates visual discrepancies that look like stutters. Also, as reported by a mod on obs forums this could also be caused by a windows bug but I just can’t find the link to that post at the moment.

Streaming suggested parameters by each streaming site:
Dlive https://help.dlive.tv/hc/en-us/articles/360039326311-How-to-Stream-On-DLive
Twitch https://stream.twitch.tv/encoding/
Youtube https://support.google.com/youtube/answer/2853702?hl=en
Facebook https://www.facebook.com/help/1534561009906955
mixer is gone.

Multistreaming:
check https://restream.io
It's pretty and it's nice. And it works. Some features will cost a monthly premium. IF you are into multi streaming, this is the way to go. Or the most popular one anyway.
Basically it manages (albeit not perfectly) your stream information, description and synchronization on multiple platforms so that you can stream your game to twitch, youtube, dlive, facebook all at the same time. Also has chat integration and is builtin obs itself.

Coin Marketplace

STEEM 0.23
TRX 0.25
JST 0.038
BTC 95511.18
ETH 3313.19
USDT 1.00
SBD 3.30