Last Updated: 18/02/2013
So you’re Dendi? That’s pretty cool. Well for years if you’d wanted to streaming yourself feeding as drow ranger or failing every hook, the go-to solution would have been XSplit, but no longer. A fine gentlemen going by the alias of “Jim” has spent the last few months of life writing an amazing piece of kit called “Open Broadcaster Software”, or OBS for short. Essentially what he’s managed to do is take the same product that a team of full time developers backed by great company have taken 3 years to create, and produce something that works much better in just a few short months. It’s still lacking a little the way of features (although this has improved significantly since I wrote my TF2 streaming tutorial just 3 weeks ago), but the core of the software itself is infinitely better and the missing features are things that shouldn’t ever be a concern for player streams. It puts out better quality, the UI is cleaner, it handles high FPS (i.e. streaming at 45fps+) far more easily, and it does all this while have much less of an effect on your game’s performance.
As with the previous tutorial I’m not going to baby sit you through exactly what to type in each setting. What I am going to do is walk you through every single option in the program, explain what it does, and give some suggestions as to what sensible settings would be. Everyone has wildly different computer setups, internet connections, and opinions on what the best ratio between quality and playability is. The focus of this is going to be on giving you the best possible quality while having as minimal of an effect as possible on your game’s performance.
Here’s a quick example video. That was streamed using exactly the settings shown in the all of the screenshots below.
So first you need to note down a few important bits of information.
- Upload Speed: SpeedTest.net is a great site to find out what your upload speed is. This will help us decide what bitrate you can use for streaming. As a rule of thumb, the lowest you’d ideally have for streaming Dota 2 is 1.5mbit. If it’s lower than that you may still be in luck, but I’d suggest dropping below 720p since viewers tend to prefer smoothness/quality over high resolution.
- Screen Resolution: It’s not so much the resolution that is important, but your Aspect Ratio. For example 1920×1080 (aka 1080p) and 1280×720 (aka 720p) both have an aspect ratio of 16:9. It’s essentially the ratio of width against height. If it’s 16:9 you’re all good, if it’s 16:10 you might want to consider playing the game in a window for your viewers benefit, or they’ll most likely have black bars left and right when they watch your stream. To find it out, check this table.
- CPU: In terms of performance, your CPU is going to be the main deciding factor. Your graphics card, RAM, etc, simply need to be good enough,your CPU is going to be the part bearing most of the extra loaded generated by encoding and broadcasting a video stream. Assuming you have a desktop, a first gen i5 is the lowest you would really want to attempt to stream with. If you have a 2nd or 3rd gen i5/i7 CPU, that’s ideal. I’d suggest overclocking your CPU to whatever you are comfortable with before going ahead.
Dota 2 Configuration
One of the nice things about Dota 2 compared to SC2 and other pretty looking Triple-A titles is that it’s actually not that intensive on a computer. There’s always a line to be drawn on whether a computer can or cannot run the game, but you don’t have to be too far above it to start cranking up the graphics settings and maintaining solid performance. This becomes quite evident when you start running it on current generation gaming machines. Although it’s always anecdotal to use your own machine as an example, my system (i5 3570K, 16GB RAM, GTX 660) can quite comfortably churn out a great looking 60fps 1080p stream while maintaining 90fps+ even in late game team fights while having an almost imperceptible effect on the game to you as a player.
However I do realise that the vast majority of people reading this guide won’t have just spent hundreds purchasing/upgrading their computer yesterday. Just like your stream setting, you may very well need to change Dota 2′s graphics settings. The benchmark I would use is to leave them on whatever you currently play at and continue through the rest of this guide. If you are still not happy with the performance of your game after tweaking the stream settings in OBS, I would go back to Dota 2 and turn everything down to the lowest possible setting (excluding Resolution and Render Quality), and start to increase them until you find a happy medium.
It’s important to realise just how much you are asking of a computer when you try to stream a modern video game. Not only are you asking it to run some of the most complex pieces of software ever written, you’re asking it to simultaneously capture the output in a way that was never intended and encode that output using one of the most computationally intensive compression algorithms ever invented. If you are having problems, your computer is doing it’s best. Try to be nice to it.
There are a few launch options I would recommend. The following are what I would suggest using (replacing WIDTH and HEIGHT with your resolution):
-windowed -noborder -w <WIDTH> -h <HEIGHT> -console -novid
“-windowed” will tell it to run in windowed mode and “-noborder” tells it to, strangely enough, have no border. This gives the illusion of running the game in fullscreen while still being windowed. OBS can now capture a game in fullscreen mode, however when you alt tab, from your viewers perspective, the picture is completely frozen which can confuse them and give the impression there is something wrong. Playing with window noborder is a good way around this. At this point I might as well mention that “-console” allows you to bring up the in-game console just like in other Source games (for some reason there’s no regular option in the GUI for it like in TF2, CS, etc). “-novid” just tells it not to bother with that creepy valve turning head video that I’m sure everyone who’s loaded the game more than 3 times just skips past anyway.
So let’s get familiar with OBS. If you don’t already have it, you can download it here.
As you can see it’s fairly simple and much cleaner than XSplit. The only thing we’re concerned about right now however is the settings window conveniently indicated in this screenshot. I’m going to go through every tab in the settings and explain what you should be typing in and how to choose the ones that vary from person to person.
One of the nice things about OBS is the ability to set up profiles. So for example since I’m mainly streaming either Dota 2 or TF2. I have 4 profiles, 2 for each game, 1 for when i’m at uni with a massive upload speed, and another for when I’m at home with a limited upload and need to use a lower bitrate. To make a profile you just type a new name into the Settings Profile box and hit Add. Done! The changes you make in all the other settings tabs will only affect the profile currently selected. Even if you don’t think you’ll need to use this feature I’d still suggest creating one called “Dota 2″ or something along those lines.
So there’s a few things here that you’re going to need to work out. When you come back to tweak your settings this tab will be the one you change the most.
- Quality: This setting is a little bit non-obvious. Bassically what it does is specify how much of your bitrate should be kept spare incase a lot starts happening on your screen. Setting it to 10 makes it use all of the available bitrate to make the current frame of video look as sexy as possible, however if a lot starts happening on your screen (you start moving your camera around, big explosions/spells/etc), then the picture will look a little blocky. Setting it to something lower makes the picture quality on average look a little worse, but if a lot starts happening the image won’t pixelate nearly as much. For Dota 2, generally anything from 7-10 is a good number, although I would advise against 10 unless you are using a really high bitrate. The example video at the top of the post is using 4000 bitrate with quality 8 to give you some context.
- Max Bitrate: I need to note that this setting isn’t very well labelled. It is infact the “target max bitrate”. In other words, you will 80% of the time never go over this number, but when there is a lot happening on the screen, it will go over, so give yourself some room and don’t just set this number to whatever your upload speed is. The number you actually want to specify for you bitrate is highly dependant on other factors such as CPU, Quality, x264 Preset, upload speed, etc. Assuming you are just doing a bog standard 720p 30fps stream, 2000kbps is a good place to start. Higher FPS/Resolution = higher bitrate needed to achieve the same picture quality.
- Buffer Size: The x264 codec uses what is known as the VBV model for encoding/decoding. Unless you really feel like playing around, stick to keeping Buffer Size the same as your Max Bitrate setting.
- Audio Codec: AAC. Always. You should never change this.
- Bitrate: As a rule of thumb, you want to use 128-192 for audio bitrate. If you’re seriously pushed for bandwidth dropping to 96 is advisable, but bear in mind that viewers will much more happily put up with bad video compared to low quality audio. Also the bitrate requirements are so small compared to video that there is little reason to set this to a low value.
The subject of choosing your Quality and Max Bitrate is comfortably worthy of an article by itself. The overall quality of your video stream is basically defined by the Trifecta of your Max Bitrate, Quality and x264 Preset with no one setting being more or less important than the others. The particular combination of those settings being related to your Stream Resolution and FPS. For the purposes of a PoV player stream, I don’t buy the argument given by many that the x264 Preset is something worth changing. While there is no debate on whether it improves the image quality of the stream, it comes at such a heavy cost on your game performance and the “smoothness” of your stream that I honestly feel setting it to anything higher than “veryfast” on something short of a brand new $2k monster machine is a net loss. This might not be the case when the 4th/5th gen i5/i7 chips come out, but right now that’s my take on the debate.
This tab tells OBS where to send your
horrific feeding stream to.
- Mode: Live Stream. Obviously. (Unless of course you’re just locally recording so you can upload these videos to youtube, which is totally cool too).
- Streaming Service: At the time of writing, TwitchTV are the only streaming provider. HashD were just announced yesterday but are still in a beta phase, I presume if you are reading this at some point in the future HashD will be an option here. If you legitimately needed to pick Custom here then you probably don’t need to read this guide.
- Play Path/Stream Key: You need to find this on the Twitch site. This graphic should show you where to go. I’d suggest pasting this into notepad first to make sure there aren’t any spaces at the front or back.
- TwitchTV: Europe – Use London Secondary or Frankfurt. North America – use whichever is geographically closest. If you are in Asia or Oceania, choose Singapore and pray you have good routing.
- Auto-Reconnect: Ticked. This will automatically restart your stream if your internet drops out for some reason or you lose connection.
- Save to file: Allows you to record a local VOD to the File Path specified below. This is particularly useful if you plan on also uploading the vods to youtube.
This tab just contains the basic video settings.
- Base Resolution: So this is another setting that takes a little thought. This is the resolution your stream will be broadcast at. The higher the resolution, the higher the bitrate will need to be to maintain the same picture quality. With most games viewers tend to prefer the smoothness of a 60fps 720p stream over the image quality of a 1080p 30fps stream, however MOBA/ARTS seems to be something of an exception to this rule. Personally I think the reason is that there is usually much less going on on the screen compared to an SC2 pro with dozens of units and APM in the hundreds from start to finish, and FPS where it is much easier to follow the action with a high framerate. Simply put: Higher resolution = higher system load and higher bitrate requirements.
- Resolution Downscale: After much debate, the OBS devs assure me that it is best to set Base Resolution to your actual screen resolution and then use this setting to lower the stream resolution. After much testing, I personally can’t find any objective, observable difference either way but I see no reason not to take their word on this.
- FPS: 30fps minimum. As I said above 60fps is coming into vogue and becoming more popular by the day. One of the nice things about OBS over XSplit is that XSplit is not capable of putting out true 60fps, OBS is. If your machine can’t output a stable 60fps, try turning it down to 50, 45, 40. If you have a solid current generation machine, you should be able to output 60fps no problem.
- Disable Aero at startup: Aero is a funny thing. On some computers turning it off helps a lot, on others it gives a massive decrease in performance. Try playing around with this setting.
This tab just contains a few basic audio settings.
- Desktop Audio Device: Here you can set where OBS gets your computer’s sound from (i.e. where it gets the sound coming out of your speakers). Leave this setting on “Default” and it will just grab your speaker sound unless you have a specific reason to choose otherwise. This is a better method than using a piece of software like Virtual Audio Cables.
- Microphone/Auxiliary Audio Device: As you may have noticed on the main window there are 2 audio bars. One is for the capture of your headphone/speaker output, the other is your microphone. Just choose the same microphone you use in Skype/Mumble/Teamspeak/Raidcall/etc.
- Use Push-to-talk: Again, fairly straight forward. It’ll only record/transmit your voice while this key is held down.
This tab contains some of the more complex settings in OBS.
- Use Multithreaded Optimizations: Oh god yes. Why would you ever untick this?
- Process Priority Class: This setting allows you to tell windows to give OBS more CPU time than other programs. You can sometimes get things working better with this, but generally leave this on “Normal” unless you know what you are doing.
- x264 CPU Preset: See the explanation further up just below the encoding tab. tl;dr: Use “veryfast”.
- Use CFR: Leave this unticked.
- Use CBR: CBR = “Constant Bit Rate”, I.e. your bitrate will not vary like it does. There’s some merit to fiddling around with this setting, but I wouldn’t tick it without at least having a quick google for the difference between CBR and VBR encoding.
- Custom x264 Encoder Settings: This should be unticked. If you have read a previous version of my guide, I retract the suggestion that I gave regarding this setting.
- Use Send Buffer: This setting is no longer in newer versions of OBS. If you are using a version which has the option, update! (If you’re feeling lazy, leave it unticked).
Now that we’re done configuring your stream settings, it’s time to go set up the scenes! A Scene is a combination of videos and pictures that are placed together and can be thought of almost as slides. For example looking at JoinDOTA, they will likely have a scene which consists of a background picture, with Tobi’s camera on top and then some editable text underneath. Then another scene for the “next match coming up” video, and another for in-game which consists of the game itself, with the overlay (“Casted by Tobiwan” etc) on top. You can switch between these scenes and even set up hotkeys to switch between them (ALT + 1, 2, 3, etc is quite a popular combination). In SC2 the community went as far as to produce a tool which would detect when a game started and finished, and then switch between 2 scenes automatically.
So let’s build ourselves a scene. Go back to the main OBS window and right click on your empty “Scenes” list. Click “Add Scene” and type a name, any name. I’m going to create one called “Pre-game”. At this point it would be a good idea to click the “Preview Stream” button which will make our scene appear in the preview window. It’s black since we haven’t added anything to it yet! In the “Sources” list, right click. You’ll see a few different options appear.
- Software Capture Source: Capture a program’s window. i.e. Dota 2 or a web browser.
- Bitmap: Any arbitrary image file. For example a background picture or overlay.
- Image Slide Show: Exactly what it says on the tin.
- Text Source: This allows you to add text to your scene. Another cool feature of this is that it allows you to take the text from a file. This can be used to do pretty cool things like show the song you currently have playing by using a plugin for winamp to write the song name/artist to a .txt file.
- Video Capture Source: Any DirectShow device. Mostly this is just going to be webcams.
- Game Capture: Capture any DirectX or OpenGL game or Program. Use this if you can.
So I’m going to make a scene with my game in a window on top of a pretty looking background that I made for a friend and some text saying “brb 5 mins”.
So let’s take a look at this scene.
So as you can see we have our Scene titled “Pre-game”, and then 3 sources within it. I first added the background by going to Add Bitmap, and then choosing this png image file. At this point I click “Start Preview”, then right clicked on the source and chose “Fit to Screen”. This makes it stretch the full size of the stream. I next added Dota 2 itself by going to Add Game Capture and using the settings shown below. I then toggled on the “Edit Scene” button to drag the Dota 2 window over the black area on the background image and resize it. Lastly I chose Add Text Source and typed in that little message, again toggling on Edit Scene to drag it into position. NOTE: You need to increase the font size in the Text Source properties if you want to make it larger, don’t try to resize it with Edit Scene.
So everything’s set up and working, great! Unless you’ve won the lottery multiple times, the chances are you’ll want to tweak your settings a little. Either for better stream quality, or for smoother gameplay. Here’s a list of the things you’ll want to tweak:
- Video: Base Resolution
- Video: FPS
- Encoding: Max Bitrate
- Encoding: Quality
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 increasing Quality under the Encoding tab up to 10, only increasing by 1 at a time.
- Try increasing Max Bitrate in the same tab. 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 and Max Bitrate settings when increasing the FPS, and iterate through the above steps again.
- If you are still getting diminishing returns, try increasing your Base Resolution, going back to
- 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.
Your guide is rubbish! My game is lagging all over the place!:
- 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.
- 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.
- Try reducing your Base Resolution.
If you have any questions, feel free to leave a comment. I will try to reply. I hope this guide helps you!
- Uploaded new Example Video.
- Rewrote the launch options part to point out that it is no longer mandatory due to Game Capture.
- Updated a number of screenshots to reflect newer versions of OBS.
- Rewrote Explanation for quality/max bitrate/buffer size.
- Added explanation for using “veryfast” x264 preset.
- Rewrote explanation of Resolution Downscale.
- Added explanation for “Desktop Audio Device”.
- Added explanation for a few of the new options in the Advanced Settings tab.
- Edited Suggestion for “Custom x264 Encoder Settings”.
- Edited explanation for Send Buffer.
- Added a bit about Game Capture.