My son enjoys streaming to Twitch and we’ve had quite a bit of fun – and struggle – setting up a dual PC setup for streaming. Twitch has a guide available for setting this up and several other guides are available. Unfortunately, a guide and the real world are often two different things.
This setup is the one that we found works. I’m not guaranteeing that it’s the best setup, nor am I advocating it as the only setup. It’s just an illustrative story for someone else who might be working on the same sort of thing.
First, the Gaming PC needs to be whatever you need it to be. Our goal is to place 0 load on this PC, allowing it to play any and every game you normally can without concern. This PC will be referred to as the Gaming PC throughout the rest of this post. For reference, my son’s Gaming PC is:
Second, the Broadcast PC needs to be at least an i5. There are options for encoding which can offload the encoding to an nVidia video card (NVENC in OBS) and to an AMD video card (OBS VCE) but the quality of the resulting stream suffers. Even on a dedicated PC you’re going to want an i5 or i7 (or AMD equivalent, I’m not trying to push Intel chips).
The Broadcast PC is substantially under powered compared to the Gaming PC.
You’ll notice that we’re under powered compared to my recommendation of an i5 or i7. You’ll suffer a lot less with a quad core CPU than a dual core, trust me.
We’re using the Elgato Game Capture HD60 capture card which is capable of hardware encoding of H264 video, but we’re not going to be able to utilize that particular ability. This is unfortunate, and ultimately defeated the reason I went with the Elgato.
We need to direct HDMI output from the Gaming PC to the Broadcast PC. We do this using a standard HDMI cord leading out from the Gaming PC’s GeForce 970 ACX and leading to the Elgato HDMI in. We then route another standard HDMI cord from the Elgato HDMI out back to the monitor which was originally plugged into the GeForce 970 ACX.
The Elgato is a pass through device and it doesn’t appear to cause any lag on the output. However, this setup does require that the Broadcast PC be powered on in order for the HDMI signal to be passed. If the Broadcast PC is turned off the monitor on the Gaming PC will not have any output.
EDID is also passed through. If the monitor is unavailable (due to cabling issues or power) the Gaming PC will not recognize a second monitor is attached.
Once this is setup you should be able to run your capture card’s software (Elgato’s Game Capture HD) and begin previewing. The output of the Gaming PC should appear.
There are multiple ways to successfully setup the audio. The easiest solution is to activate the HDMI audio output device using the Volume Mixer in Windows. The audio will then pass through the HDMI cable along with the video and the remote software will pick it up.
The problem with this setup is the microphone output. You can route the microphone to the sound card using the line in, or you can use software to mix the microphone back into the speaker output, or with some sound cards you can choose to “listen to this device” in the audio driver setup.
Or you can go whole hog and get a hardware audio mixer like the Behringer XENYX502 5-Channel Mixer. This is the route we took. You should note that this mixer is for “professional” work meaning that the input and output jacks are 1/4″, not the 3.5mm used by most personal computer audio equipment. You’ll need two cables that convert the 3.5mm to 1/4″ – these are used to connect the Gaming PCs line out (or speaker out, if you don’t have a line out) to the mixer’s second input, and to connect the mixer’s main out to the Broadcast PC’s line in (or microphone in, if you don’t have a line in).
Using a line in/out is much better for sound quality because these are unamped (thus unmodified) by the source and destination.
The cable pumps the audio output to the Broadcast PC but you probably have external speakers you’d like to hear the sound from. You could hook the speakers up to the Broadcast PC but your sound would only function so long as something had the input signal activated. The easiest way to maintain “normal” sound output is to use a 1/4″ to 3.5mm adapter, connect the PC speakers to the adapter, and then use the phones output on the mixer.
It’s at this point you’re likely to encounter ground noise. Ground noise is “electronic noise on the ground wires or busses of an electronic circuit.” It comes and goes and has no identifiable source, but definitely qualifies as a pain in the ass if you have no idea what it is. The resolution to ground noise is a ground loop noise isolator. Insert this between the 3.5mm jack and the 1.4″ adapter and the ground noise will be eliminated.
At this point we’re left with one piece of equipment to setup.
I wish I could say I was satisfied with how we have the microphones setup, but I definitely feel like I’m missing something. First, you have to (partially) understand how microphones work.
Your standard 3.5mm jack microphone as used on a computer expects a +5V power source. Channel 1 on the Xenyx 502 has both a 1/4″ input and what’s called an XLR input. While you might expect to use an adapter like above to convert a 3.5mm to 1/4″ it won’t work because the 1/4″ input has no power to it. The mixer is meant to be used with powered microphones and speakers. (The XLR port provides +48V of phantom power for the connected microphone to use.)
So unless you’re mixing your microphone into your audio stream using one of the methods above, you’re most likely going to need a new microphone for this type of setup.
XLR microphones can get expensive quickly, but we managed to find one that was of decent quality for a decent price, the Knox USB/XLR Cardioid Microphone.
Microphone output is now connected to the Broadcast PC and your external speakers, but as we quickly found out the microphone is (of course!) not usable on the Gaming PC for whatever chat applications you’re using. The XLR microphone is hooked up later in the process.
For now my son is using his headset to communicate with other parties, with the XLR mic doing the mixing of whatever he says into the stream. The output of those other parties is already mixed into the stream, of course, by the stereo output.
The Elgato software comes with Game Capture HD. GCHD is pretty plain, with no bells or whistles to speak of. If you’re looking at streaming nothing but game output, GCHD will do a damned fine job of it for you. It is the only streaming software available which takes advantage of the Elgato’s H264 hardware encoding.
If you’re looking to customize your stream – with even so much as a webcam overlay – you’ll need to choose different software. For our case we went with Open Broadcaster Software. OBS does offer some hardware encoding – the NVENC option, or the custom build OBS FCE for AMD users.
I’m going to go over the settings screen for OBS and give an a brief explanation as to what each setting means and what it’s recommended setting is.
Install Open Broadcaster Software as you wish. Open OBS up and then go to Settings -> Settings.
Type in a profile name of your choice, then click Add. In the screen print below I’ve created the profile Game Capture HD60.
Next hit Encoding. Let’s go over these options one by one.
OBS Setup – Encoding
Encoder represents how the video is taken and compressed for delivery to the streaming service of your choice. The available options are x264, an open source encoder for the h264 standard, Quick Sync, and Nvidia NVENC.
x264 is your best choice unless your CPU is under powered as mine is and you want to offload some of the encoding to your GPU.
These options don’t appear to affect Quick Sync or Nvidia NVENC. The Quick Sync encoding options can be set in the Quick Sync Encoder menu found on the left menu; the options for the x264 video encoder are:
Video Encoding::Use CBR: Constant bit rate. This should probably be checked in most circumstances. It provides a more stable bandwidth usage, but will cause even scenes without motion to consume bandwidth.
Video Encoding::Quality Balance: This is irrelevant if CBR is enabled.
Video Encoding::Max Bitrate (kb/s): This is the target bitrate that the encoder will strive for. It’s not a constant – if the encoder ends up at this setting + 100, it will leave it at that. The recommended setting is 80% of your upload bandwidth, or 3500, whichever is less. (Twitch recommends a maximum of 3300.)
The bitrate is the number of bits used to update the stream per second. Without compression streaming video can become a tremendous strain on any system. You can compute your natural bitrate using the calculator here. Compression such as that used by h264 helps to tremendously reduce the size of these updates. For a basic explanation of how that works with video, see this PDF at vcodex.com.
Your upload speed is your biggest limiter as to what resolution you can stream and what frames per second you can achieve successfully. The easiest way to determine your upload speed in terms of kbps is to use speedtest.net. Click on settings at the top of the screen and change the speed measurement unit to kilobits. Run a speed test; in my case the result was 4,388 kilobit/sec. 80% of this was 3,510. In the screenshot you’ll see that my bitrate is set to 2,000 – this is a setting often recommended throughout the Internet for 720p encoding.
Video Encoding::Enable CBR padding: This pads a source to the target CBR when it falls underneath the target. This option should be enabled.
Video Encoding::Use Custom Buffer Size: x264 will attempt to a source using this buffer size; in most situations changing this isn’t necessary. The recommended setting is disabled. If it is enabled, the value should be equal to your max bitrate.
Audio Encoding::Codec: AAC provides higher quality at a lower bitrate. MP3 provides a lower quality with less CPU usage. AAC is the recommended settings.
Audio Encoding::Bitrate: This is the same discussion as above for video, but for audio. Setting this below 96 is not recommended; 128 is the default and recommended setting.
Audio Encoding::Format: This represents the audio sampling rate for OBS. Recommended is 48kHz. Unless you have reason to switch to 44.1kHz, you shouldn’t. (Changing to 44.1kHz can have a negative impact on viewers of your stream as they’ll have to resample your audio to output it.)
Audio Encoding::Channel: This controls whether stereo sound is encoded into the stream or mono sound. There may be a small reduction in bandwidth using mono, but stereo is recommended.
OBS Setup – Broadcast Settings
Mode: Live stream. The File Output Only option allows you to record to a file, perhaps for when you’re offline or performing a “greatest hits of…” type of broadcast.
Streaming Service: Twitch. Upon selection you may get a warning that your settings are not optimized for Twitch, and an instruction to hit the Optimize button to automatically set them. It is highly recommended to optimize if this occurs. It will prevent any bad blood from Twitch, at the very least.
FMS URL: Once Twitch has been selected choose a server as geographically close to you as possible. Team Liquid has both a bandwidth tester and Twitch ping you can run to see how your performance is against all of the Twitch servers; find the bandwidth tester here and the ping application here.
Play Path/Stream Key: This is your stream key from Twitch. To find it, login to Twitch. Then click on your username in the upper right hand corner and go to Dashboard, then click on the Stream Key option and Show Key.
Click on I Agree to the warning dialog that appears, then copy and paste your stream key from the window into OBS.
Auto-Reconnect: Fairly self explanatory. Automatically reconnect to your streaming service if something interrupts your connection. Default and recommendation is to leave it checked.
Auto-Reconnect Timeout: How long should OBS wait before automatically reconnecting. The default is 10 seconds; some recommend it 1 second. I left it at 10 because it usually takes a few seconds for whatever caused the disturbance in my connection to resolve itself.
Delay (seconds): This is how long your stream should be delayed prior to broadcast. This is useful when synching audio. The default is 0 seconds, and should be adjusted on a case by case basis.
Minimize Network Impact: This reduces how often OBS outputs data to the stream server, usually to mitigate local network impact. It’s recommended off.
Automatically save stream to file: Allows you to save your streams to a file as well as broadcast them. User choice.
Keep recording if live stream stops: Self explanatory, and user choice.
Replay Buffer length (seconds): This is useful for saving snippets of the past, limited by the number of seconds you enter here. This does consume RAM, as indicated by the estimated replay buffer memory usage.
Replay Buffer File Path: This is the file where the replay buffer will be stored once the save replay buffer hotkey is pressed.
OBS Setup – Video
Video Adapter: You want to choose your primary video adapter, in my case an NVIDIA GeForce GTX 970.
Base Resolution: Base resolution determines the resolution of your scene. Your scene includes all of the composite elements of OBS, including the stream. You’ll want to match the native resolution of your monitor. This resolution is pre-downscale. You want to avoid using the Base Resolution to resize your output as that will cause more blurriness.In my case my native resolution is 1080p, or 1920×1080 with an aspect ratio of 16:10.
Rather than statically defining a resolution you may want to use a monitor’s setting to define the resolution. Select a monitor here if that’s the case.
Resolution Downscale: You’ll be dying to stream 1080p @ 60 fps but it is highly unlikely that you’re going to be capable of that. YouTube recommends a bitrate of 12Mbps for 1080p @ 60fps. Twitch’s maximum non partner bitrate is 3500 and 3500 is not high enough to stream 1080p @ 60 fps.Most of the time you’re going to want to stream at 720p, or 1280×720. This is a 1.5 downscale of 1920×1080 and is the (imo) best balance between resolution and size.
Filter: This specifies the filter used when downscaling. Beyond my ability to explain; more details is higher CPU usage. I used Lanczos (best detail, 36 samples).
FPS: The number of frames per second to broadcast. Increasing this increases your bitrate requirements without a lot of benefit, although there seems to be a desire to broadcast at 60 fps. I left this at 30.
Bitrate and Resolution In Practice
The best way to come to grips with the impact of bitrate, resolution, and fps is to see the variances in them. Below I’ve recorded 30 seconds of gameplay in Fallout 4 with FRAPS @ 1080p and 60 fps. You’ll note I didn’t quite maintain 60 fps during gameplay.
This input file is 1.68 GB in size. This is directed into OBS using the Video Source plugin. From there we encode the file as labeled.
1080p @ 30 fps @ 3500 bits/sec (12.6Mb):
1080p @ 30 fps @ 2500 bits/sec (9.14Mb):
1080p @ 30 fps @ 1500 bits/sec (5.65Mb):
720p @ 30 fps @ 3500 bits/sec (12.7Mb) :
720p @ 30 fps @ 2500 bits/sec (9.24Mb):
720p @ 30 fps @ 1500 bits/sec (5.77Mb):
OBS Setup – Audio
Desktop Audio Device: This should be your default audio device. This is the device whose audio is mixed into the stream.
Microphone/Auxiliary Audio Device: This should be your microphone, or line in on your sound card.
Force Microphone/Auxiliary to Mono: Self explanatory; forces the microphone input to be monaural.
Show only connected devices: If your device isn’t currently active or plugged in you may have to check this box in order for it to be displayed in the drop down boxes.
Push-to-talk Delay (milliseconds): This is the delay between the key for push-to-talk being pressed and the activation of the microphone input. Setting this higher can be used to delay input if you often hit your PTT key by accident.
Desktop Boost (multiple): This represents an increase to your desktop audio. 1 is the default value; the value entered here is the multiplier applied to the desktop audio volume.
Mic/Aux Boost (multiple): This represents an increase to your microphone audio. 1 is the default value; the value entered here is the multiplier applied to the microphone input.
Mic Sync Offset (milliseconds): Delay the microphone input by this amount.
This screen is where you set hotkeys for activating the various modes of OBS. Since we’re using a two PC setup, and my son didn’t want to be worried about reaching over to another keyboard to activate one mode or another, we didn’t set any of these up.
General::Use Multithreaded Optimizations: This will use multiple threads for color space conversion, maximizing benefit from multi-core CPUs. There’s almost no need to ever turn this off.
General::Process Priority Class: Sets the process priority for OBS in the same manner as you can set a process priority through Task Manager. As encoding can consume a lot of CPU, setting this to “above normal” can sometimes be useful to ensure capturing and encoding is done in a more timely fashion.
General::Scene Buffering Time (milliseconds): Sets the amount of milliseconds the scene is buffered before being sent to the encoder. Only change this value if you know what you are doing.
General::Disable encoding while previewing: This disables the encoder while a preview is active.
Video::NVENC Preset: This is where you change the settings for the NVENC encoder. Examples were provided above for the Lossless and Streaming (2pass) presets. If you require the NVENC encoder I’d play with the various presets to see which gives you the best quality at the best price.
Video::Encoding Profile: main is the default, and recommended by Twitch to stream. You’ll note very little difference between main and high.
Video::Keyframe Interval (seconds, 0=auto): Twitch requires the keyframe interval to be set to 2.
Video::Use CFR: This is a compatibility option for editing applications by outputting duplicate frames if necessary to maintain a constant frame rate. Default and recommended is checked.
Video::Custom x264 Encoder Settings: This option should be left alone unless you’re very familiar with the x264 encoding options.
Video::Encode in Full Range: Whether to use the (default) partial color range for x264 encoding or to use the full color range available.
Video::Allow 61-120 FPS entry in video settings: This allows you to specify a frames per second higher than 60 on the Video screen. Most monitors don’t go higher than 60Hz so a framerate higher than 60 isn’t worthwhile. The recommendation is to leave this unchecked.
Audio::Force desktop audio to use video timestamps as a base for audio time: This should be left off as it is meant to fix a legacy issue which should not occur.
Audio::Global Audio Sync Offset (milliseconds): This is useful for synching your audio with the incoming video.
Audio::Use Mic QPC timestamps: When enabled OBS tries to use the Microphone QPC timestamps to synchronize your audio and video. This is especially useful in high CPU situations where the input might fall behind.
Network: All of these settings are useful only if the Minimize to Network Impact is enabled.
- Automatic low latency mode: This should not be checked.
- Latency tuning factor: This should not be checked.
- Bind To Interface: This allows you to specifically bind to a particular IPv4 or IPv6 address.
- Disable TCP send window optimization: This should not be checked.
Quick Sync Encoder
Quick Sync is Intel’s hardware video encoding and decoding technology integrated into some of its CPUs. It was unavailable for me.
The Browser plugin allows a web page to be used as a source within OBS.
Microphone Noise Gate
Most of this screen is self explanatory. A noise gate mutes the microphone input until the noise level breaks the thresholds set on this screen.
The Scene Switcher allows you to configure hotkeys which allow for switching between predefined scenes. For instance during a loading screen you could switch to a web page displaying sponsors.
Use The Source, Luke
Once the initial setup is done we’ll need to configure the Elgato Game Capture HD as a source so that OBS can use it. Click Global Sources… then click Add on the window which appears and select Add Video Capture Device from the pop up menu.
In the window titled “Please enter a name” enter whatever you’d like to name the Elgato and hit OK.
From the Device dropdown select the Elgato Game Capture device. The Elgato has both 32 bit and 64 bit drivers available, so it should be available in both versions of OBS.
On that same Device Selection screen, under Video, check Use Buffering (milliseconds) and enter 1.
Back on the main OBS screen create a Scene and name it what you’d like. Then right click the Sources window and choose Add, Global Source, and then the Elgato Game Capture device.
Once done you can click Preview Stream and your output from the Gaming PC should appear in the main window.