Overview
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.
Important Info
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
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”.
Testing
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”).
OBS
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.
Done! Almost…
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.
Tweaking
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.












Affinities and Priority should be mentioned! They help a great deal.
Other than that, good stuff.
Perhaps also mention that not everybody gets better performance with dxtory compared to using -windowed so it might be worth trying even though dxtory works on your pc.
Why is this the only comment without a reply? I’d really like to know if/how I should set up affinities/priority.
Ye he’s totally right, I just haven’t gotten around to writing about them yet. Will hopefully do at some point tonight or tomorrow.
Your guide is awesome but I have one problem every time I start the DXtory recording it auto selects OBS.exe instead of staying on hl2.exe, any idea how to fix this?
Hey, ye sorry about that. It appears I missed out one super key piece of information.
In your TF2 launch options, you need to put “-nod3d9ex”. You should then have hl2.exe come up.
ive followed the guide word for word twice and tryed some other stuff myself, but everytime I add dxtory to OBS(Add Capture Device) I just get a black screen :$
am I being stupid and ive missed something? :$
- btw great guide, learnt alot from reading it thanks! x
Are you hitting the Dxtory start capture hotkey by any chance? The screen will just be black until you open TF2 and hit that. Generally it’s like, Open OBS -> Open Dxtory -> Open TF2 -> Hit Dxtory Start Capture Hotkey -> Start Streaming in OBS.
yeah I made a hotkey in dxtory to start streaming and when I press it dxtory minimizes to tray, I check OBS(preview) with tf2 in the background and its just a black screen with my cam working (followed your sequence/order of program starting too)
ill start from scratch and try again, and if its the same problem ill make a post a ss with All my settings screens so you can have a look through to see if theres something wrong <3
aghh nm, ill just use the old way I was doing it > OBS – screen capture… worked fine then, dont think i could get it any smoother anyways
thanks for the guide though, it improved my understanding and quality on OBS <3
Are you pressing the key while in game? If not that’s the problem.
im having the same issue..
Hmm, OBS looks very promising. I tried to stream without dxtory just to see how’d it go, but it didn’t go very well. Audio and gameplay was perfect, but the stream was unwatchable thanks to disconnects every 50s-3min and an unholy amount of video lag. It doesn’t seem to be related to x264 quality or speed, but I’ll have to investigate further…
Well 2 thoughts, firstly double check you set the Video Buffer correctly in the OBS video tab (it should be like 2-and-a-bit times your max bitrate there), and double check your upload speed is actually what you think it is.
Err… looks like I never tried to change the filtering setting in TF2… that seems to have been the biggest villain. Lowering it to trilinear did the trick. As for the disconnects, not sure about that. I think it just was the twitch server i chose that had problems or something.
Great advice man, didn’t even know OBS existed.
Gonna try it asap.
I have my max and buffer both set to 1300 kb/s, and vbvmaxrate=1300 in my advanced options, but OBS is using upwards of 1600 kb/s when I was streaming. ?????
Nice guide btw.
That’s an odd one. What resolution are you using? That’s a fairly low bitrate, so x264 may just be going “lol no sorry that’s not possible” and ignoring vbvmaxrate. Also remember that vbvmaxrate only affects the video, it’s still vbvmaxrate + audio bitrate. So if you have 320 set there that could be it.
My audio rate is set at 128, so that isn’t the problem. I was testing using 1080p because OBS would crash whenever I tried to scale it down. I tried again today at 720 and still had the same problem. I’ll post on the OBS forums and see what they say.
Found the solution, I needed to add OBS.exe to the ignore target list in Dxstory.
Just realized that the question I asked on the OBS forums and the one I asked you are different. I managed to fix the lag by lowering the send buffer size to the minimum setting. With it on 4096 I was able to get my bitrate up to 1800 kb/s without ping problems, which is 400 kb/s higher then I could with ffsplit or xsplit.
I have been running tf2 off of OBS and it has been working pretty well, with very minimal input lag but at times it IS noticeable. Thought I’d try out OBS w/ dxtory to see how it was, but it actually felt a lot worse. Hard to explain how, it might have been what you called “micro stutter.” it just feels very choppy, almost like a refresh rate drop with maybe a bit of mouse lag too.
I went back to using just OBS but I thought i’d ask because if dxtory really is better and gives “won’t get any input lag” I would like to find out what my the issue is.
After looking up the term “micro-stutter” I am pretty confident that is what I am experiencing. I don’t get it at all on OBS alone
Maybe a silly question, but did you remember to remove your standalone OBS source from the sources list when you added Dxtory?
Also, are you trying to stream 1080p?
yep, only one scene and still the same issue. it isn’t unplayable but still annoying. streaming at 1024×768.
Also, if you could add me to the vanillatv stream section that would nice!
every time i try to use dxtory with obs, i get an exception fault. :/
Should be no need for that method anymore(i think) – OBS has a game capture built-in now.
“every time i try to use dxtory with obs, i get an exception fault. :/”
This. Any idea?
“Incompatible hook modules were detected in the OBS process. Please make sure OBS is added to the ignore list of capture programs such as DXTory, FRAPS, etc.
After changing ignore settings you may need to restart OBS and any hook-based capture programs for changes to take effect.”
what do
ALSO it says
“Cannot initialize desktop audio sound, more info in log file.”
What is the advantage of using dxtory? OBS has a built in capture capability that will stream or record video. So why use dxtory at all?
Found this interesting note about quality, apparently 10 may not be the ideal number for low bitrate streams:
“For example, let’s say you have quality 10, but a relatively low bitrate. It will use every ounce of your bitrate to ensure the video quality is as good as possible, but when the video has sudden image changes, it will become blocky or distorted and will take some time before the quality restores itself, making the resulting quality potentially inconsistent if you’re not using a higher bitrate.”
I have followed these steps but whenever I try to stream it says something about hooking and adding to ignore list, I have done this but same problem.