So you want to stream your TF2 gamings? Great! Historically if you wanted to stream a game you would use XSplit. No More. A few weeks ago a guy released a piece of software he’d written entirely in his spare time called “Open Broadcaster Software”, or “OBS” for short, and to be honest it’s blown away everything SplitMediaLabs have accomplised in 3 years of having a team of full time developers working on XSplit. The performance is astronomically better, the UI is far cleaner, it has a much lower memory footprint, and has a far higher degree of customization. It’s a little lacking in features right now, but they’re being added a blistering pace so I doubt this will be the case for long. Hopefully this guide should be everything you need to know. The focus of this guide will be on achieving the best quality possible while minimizing FPS drops, input lag and micro stutter, i.e. how to keep your game playable.
So first you need to note down a few bits of information:
- Upload Speed – Fairly obvious, you need to know what that maximum bitrate you can achieve is. SpeedTest is a good site to find this out.
- Screen Resolution – The resolution isn’t that important, so much as the Aspect Ratio. Generally it’s going to be 16:10, 16:9, 4:3 or 5:4.
- CPU – Obviously this is very flexible, but if you have a desktop computer, anything below a first gen i5 (i5 750) isn’t really going to cut it.
Dxtory is an amazing bit of software. Effectively what it does is capture your game video by hooking directly into the game executable and grab frames directly from the DirectX frame buffer. In simple terms, what this means is that you won’t get any input lag at all, and only very minimal frame drop. Unfortunately this won’t help too much with micro stutter, that happens due to OBS/XSplit hogging the shit out of your CPU. Unfortunately Dxtory is extremely picky about what machines it will run on. Since you don’t know right now, just install it and follow through this tutorial. If it doesn’t work, you will simply get “hl2.exe has stopped working” when you try to load TF2 with Dxtory running. Dxtory has an incredibly large number of options. Luckily for us the vast majority of the defaults are acceptable. I’ll run through each tab and highlight what to do:
- Profile: Make sure that this is set to hl2.exe on every tab. If it is not an option yet, just pick “Default”. It will be an option after the first time you load TF2.
- Again, make sure this is ticked on all the tabs we’ll be changing.
- Start/Stop Movie Capture: Click the button and then press a key youwant to use as an on/off hotkey for Dxtory’s capturing functionality. I’d suggest one of your F-keys, it’s something you’ll only hit once when you start streaming and once when you stop, so it’s not too big of a deal.
- Frame Rate: In this box, you want to set the frame rate that you intend to stream at. Remember that if you put 30fps now and want to do 60fps in the future, you will need to go back and change it, vice versa also applies. Having 60fps in this box will impact your FPS a little more than 30fps, so don’t just put 60fps here without thinking about it.
- Output: File Output should not be ticked, “DirectShow Output” should be ticked. As a note, the “File Format” box below doesn’t actually do anything unless you have File Output ticked, so don’t worry.
- Scaling: Percent and 100%. Always. Never change this.
- Processing Threads: Set this to the number of CPU cores you have (including Virtual Cores, i.e. set this to 8 if you have an i7). The highest setting will do.
- Click this button to get up the next window…
- Everything in this window should be unticked.
- Width/Height: This is the res that Dxtory will actually output to OBS. This is the resolution you will actually be streaming at. You want to use something with the same aspect ratio as your screen resolution. If you’re playing on a 16:9 resolution (e.g. 1280×720, 1920×1080, etc), just put 1280×720 thus giving you 720p. If you have a 16:10 resolution (i.e. 1280×800, 1680×1050, 1920×1200), then put 1280×800. If you have a 4:3 resolution,
buy a new monitorput 1024×768.
- Again, put the FPS you plan on streaming at here. It’s either going to be 30, 45 or 60fps.
- Make sure this is set to “Stretch”.
Now we have to test that Dxtory actually works with your computer. The first thing to do is make sure Dxtory is open. You must always open Dxtory before TF2, sometimes it’ll work, but most of the time you’re going to be met with “hl2.exe has stopped working” the second you open Dxtory. Dxtory minimises to tray, so if you need to bring it back up to close it just go to your tray and double click the icon. Enter into your TF2 launch options ”-nod3d9ex”. You should now notice this little thing in the top of your window upon loading. Hit the “Start/Stop Movie Capture” hotkey you specified on the hotkey tab in dxtory and it should change to something like this. If it gets annoying, you can go to the overlay tab in Dxtory and change the colour/transparency. Don’t worry this won’t show up on your stream. The “video” number is just printing the FPS same as net_graph, the second number is the FPS that Dxtory is passing along to OBS. It’s a little funny in my screenshots because i’m at the menu and taking screenshots, but with a good computer this should never drop below ~55 as long as your game FPS is staying above that too. If you’ve reached this point, great! Dxtory is working perfectly. If not, don’t worry, I’ll explain in the next section how to use the regular OBS screen capture method (which is still a vast performance improvement over XSplit’s basic “Add Screen Region”).
So now we need to start configuring OBS. If you don’t already have it, go hereand click on “Installer”. Once it’s open, you’ll be at the main OBS window:
If you’re familiar with it, you’ll notice this feels a lot simpler than XSplit’s mishmash of black and gray buttons and windows. Don’t be deceived! What OBS lacks in horrendous UI design it more than makes up for in configuration options. You’ll notice I have a few scenes set up here already, these are just my own personal ones, I’ll go through the process of creating them. The first thing we want to do is go to the “Settings” toolbar and click Settings.
- Quality: This is a number between 1-10 that bassically specifies how much effort (CPU Time) x264 is going to put into encoding each frame. Higher setting = higher quality. If you put the number too high your stream will drop a lot of FPS/frames, however if you set it too low the picture will quality will be terrible. Generally you want set it something between 6-10. 8 is a good number to use as a default starting point for now.
- Max Bitrate: This is actually quite misleading. I don’t know why it’s been called this, it’s the target bitrate, i.e. what OBS is aiming to use. I’ve have seen OBS jump to nearly twice this number on occasions. Set this to what you’d like OBS to be using. Give this some thought though, if you don’t have a particularly great CPU (i.e. less than 2500K) chances are your CPU won’t be able to go too high, and having a high bitrate will just result in making your stream incredibly laggy for viewers. First concern is your upload speed. if it’s below ~5-6mbit it’ll be the limiting factor, otherwise your CPU will be the problem. I can’t really suggest a value for this since it varies so wildly depending on upload/CPU, but anything between 1000 and 5000 could work.
- Buffer Size: You want to set this to about twice-and-a-bit your Max Bitrate.
- Audio Codec: AAC. Always. No discussion required.
- Bitrate: If you have a PC that can stream TF2 and still be playable, use 192. If you are trying to squeeze as much quality out of a low upload connection, dial it down to 128.
- Mode: Live Stream
- Streaming Service:Twitch or own3d, whichever you plan on using.
- Play Path/Stream Key: Ok so you need to login to TwitchTV or own3d to get this. For Twitch, go to your Dashboard, then click “Streaming Apps”, then click “Show Key”. Paste the key from there into this box. For own3d, sign in and click on your username in the top right, then “My Livestreams”. Add a livestream if you haven’t already, then click on it in this list. Go down to “FMS Stream” and click Show. Paste the string given here. As a suggestion, paste this into notepad first so you can delete any spaces off the start and end.
- Server: For own3d just pick EU or NA and forget about it. For Twitch it’s a little more complicated. If you are in NA you should be fine just picking the nearest location to you. If you are in EU, pick either Frankfurt of London Secondary. If you are in Asia or Oceania, pick Singapore, gather all of your lucky charms and make sure not to walk under any ladders. Twitch are very touchy with servers outside of North America.
- Dashboard Link: Paste your twitch/own3d dashboard URL here if you want. It’s entirely optional.
- Auto-Reconnect: **ticked**
- Save to file: Tick this and pick a file/folder if you want to record locally. This is handy if you want to upload vods to youtube since Twitch vods lose a lot of quality when you upload them to youtube with Twitch’s own system.
- Hotkeys: Set some hotkeys for starting/stopping your stream if you want. Totally optional.
- Base Resolution: Tick “Custom” and enter the resolution you plan on streaming at. This should be the same as what you entered for width/height in the Dxtory Video Settings window.
- Resolution Downscale: None.
- FPS: Again, just the FPS you plan on streaming at, same as in Dxtory Video Settings.
- Disable Aero at Startup: If you aren’t happy with the playability of you game, try going back and ticking this when you are tweaking. For now just leave unticked. It bassically just turns off the windows fancy glass graphics when OBS loads. You will have to restart the program to make it apply.
- Microphone/Auxiliary Audio Device: Fairly obvious, Just pick the microphone you use for mumble/skype/TS/Cam girl stuff/whatever.
- Push to Talk: If you use push-to-talk for mumble or just don’t want your mic transmitting to internet strangers permanently, you could always use this if you want. Totally optional.
- Force Microphone/Auxiliary to Mono: **Unticked**
- Mic/Aux Boost (multiple): 1
- x264 CPU Preset: Veryfast. I’m putting this in bold because it is categorically the most important thing to change the entire program. For some reason “Fast” is the default. It is not possible to build a computer capable of streaming reliably with Fast.
- Custom x264 Encoder Settings: This is probably about as advanced as things get with tweaking. You can put some really fancy things in here, but the only one I would suggest you put is “vbvmaxrate”. As I said earlier, “Max Bitrate” in the video tab isn’t really your max bitrate and the actual bitrate can vary wildly. Using this (as shown in the screenshot) allows you to put a hard lock on the bitrate which it will never exceed. As a rule of thumb you want this ~500-1000 below your max internet upload speed so that streaming won’t affect your ping.
- Send Buffer: Ticked, and leave the default value.
Don’t worry, you’re almost there now. All you need to do is create the scene which is incredible easy. Close the Settings window now and go back to the main window.
First you need to create your blank scene. To do this right click anywhere in the scenes list and Select “Add Scene”. You then enter a name for the scene, this can be anything you want (something sensible might be “TF2 in-game”), it’s just a visually displayed name for the scene. Now select your scene and look at the sources list. This is where things will be different if Dxtory didn’t work for you. Assuming it did, right click in the list and click “Add Video Capture Device”. You’ll again be asked for a name, you can put anything you want, I’d suggest putting “Dxtory 1″. You’ll then be prompted with a few more options. On the Device Dropdown list, you’ll want to find “Dxtory Video 1″. Resolution and FPS will automatically set themselves to whatever you set in Dxtory’s video options window, so just hit Ok.
If Dxtory didn’t work, again right click in the Sources list, but this time select “Add Software Capture Source”. Enter any name you want here (“tf2″ for example). Pick “Window Capture” and find your TF2 window in the list. Make sure “Inner Window” is chosen. Note: This method will only work if you are playing -windowed and/or -border. For fullscreen you will need dxtory. Feel free to also add webcams and images to your scene to personalize it a little.
Now that you’ve got your scene created, hit “Preview Stream” to make it display in the OBS Preview window. If the game window isn’t correctly to scale, right click it in the sources list and click “Fit to Screen”. Once you are happy with it, stop the preview and click “Start Streaming”.
Congratulations, you are now a streamer.
So you’ve got your stream working, great. Now you’ll want to tweak it to death to get the best middle ground between stream quality and playability. As a rule of thumb, the only things you will need to change will be the “Max Bitrate” and “Quality” in the OBS Settings Encoding tab, then of course FPS. The FPS is a little more complicated and needs to be changed in all the following places:
- OBS: Settings: Video Tab
- Dxtory Movie Tab: Frame Rate
- Dxtory Video Settings Window: Frame Rate
I want to make my stream quality higher, where should I start?
Generally it’s just a case of incrementally making numbers bigger, however there’s a bit of logic to the order and amounts you’ll do it by. Follow through in this order.
- Try increase “Quality” under the Encoding tab in OBS settings up to 10, only increasing by 1 at a time.
- Try increasing “Max Bitrate” in the same menu. I wouldn’t increase it by any more than 300 at a time. Remember to increase the Buffer size too while doing this so it’s roughly 2-and-and-a-bit times your max bitrate.
- If you are getting diminishing returns, try increasing the FPS. If you started at 30, go to 45, then 45 to 60. Remember to turn down your quality to and max bitrate setting when increasing the FPS, and iterate through the above steps again.
- If you happen to be reading this guide several years in the future, try going to the Advanced tab in OBS and knocking down the CPU Preset to a slower setting, i.e. “Faster” or “Fast”. Again, go back to the start on the above 3 steps when doing this.
Getting lag? Here’s a list of things to check:
- Close any web browsers you have open (flash/having streams open can destroy your FPS).
- Make sure Windows Aero is enabled (this can cause serious issues on some computers).
- Try turning off any anti virus software.
- Do a general clean out of all running software in the task tray.
- Check your machine isn’t overheating.
- Check you only have 1 TF2 source on a scene (i.e. don’t have Dxtory AND the “Add Software Capture” method). It grabs both even if you can only see one of them.
- Double check you set x264 Preset to “Veryfast” in the Advanced tab under OBS settings.
- On Twitch, check you are using one of the servers I suggested.
- Re-run a speedtest.net check to make sure that “vbvmaxbitrate=” in the Advanced tab under OBS has plenty of clearance from your actual upload speed.
- Check you haven’t accidentally set an incredibly high “Max Bitrate” in OBS under the encoding tab as a typing error.
- Try turning down your Max Bitrate setting and vbvmaxbitrate= significantly.
- Try turning down Quality to 6 (if it isn’t already). You shouldn’t really have to go lower than this.
If you have any questions, feel free to leave a comment. I will try to reply. I hope this guide helps you!
Also if you’d like your stream featured on VanillaTF2, ETF2L, and the Twitter bot, don’t worry, I personally admin these. The easiest way to get it there is to go to this thread on reddit and make a post.