Tech, eSports, and Gaming!

  • Facebook
  • Twitter
Showing posts with label starcraft2. Show all posts
Showing posts with label starcraft2. Show all posts
Posted by _ - - 40 comments

I get asked all the time about my stream and how it's quality is so high.  In a future post I may explain my specific setup, but for now this post will attempt to explain what factors affect your stream quality and hopefully provide some insight on to what you should be looking at when you configure your stream. I'm not going to advocate any particular way of streaming since there are too many factors to consider, but hopefully this provides some basic information on to what you should be looking at when configuring things.

There are three main factors when streaming:

  • Quality
    This is how your stream looks to your viewers.
  • Bandwidth
    The "internet power" your stream uses. Streaming requires a high upload bandwidth for best results.
  • CPU Usage
    If you're playing SC2 or another game on the same PC as you're streaming on, you have to balance it so neither your stream nor the game starts suffering from lack of CPU power.


Quality
It's important to note that quality is not directly related to any single factor - eg cranking the resolution to 1080p and claiming that's the best possible quality is simply not true. There are many factors involved with how good your stream will look. Here are some:

  • Codec
    Most streaming software uses either H264 or VP6. The codec is a piece of software that converts the 50MB+/sec of raw image data into a compressed video format suitable for Internet data rates. H264 / MPEG4 is the more modern codec. However there are many implementations and variations in the way codecs can be programmed, such that some encoding software is better than others despite using the same standard.

    Popular software that uses H264 includes Adobe Flash Media Encoder and XSplit. XSplit uses the x264 encoder which is regarded as being the highest quality whereas FMLE uses MainConcept. VP6 is an older codec that is available to users of Adobe Flash Media Encoder. It requires a higher bitrate (more upload) for the same quality, but has some benefits in that it recovers from scene changes faster than FME's H264.

    It's also worth mentioning under the Codec section (but really it's a software issue) that XSplit's internal source scaling will always result in a blurrier output than a Adobe FMLE stream due to a scaling bug in XSplit (Hi SplitMedia please fix this, I've sent in a bug report already!). This becomes very noticeable if you have text or other sharp elements on your stream and is one of the main reasons I personally dislike XSplit.
    2011-08-18: XSplit's scaling issue is fixed when resizing from the same aspect ratio to the same aspect ratio.  Example being 16:9 resized to 16:9.  However, if you resize from a 16:10 source to 16:9, the scaling bug is still there.
  • Frame Rate
    The higher the frame rate, the more frames the codec will need to process and the smoother your stream will look. A good frame rate to target is around 25 FPS. Some streamers use 20 FPS and as long as it's a consistent 20 FPS this is fine, however below 20 FPS your stream will become noticeably jerky and unpleasant to watch. Going above 25 FPS does not yield many benefits while taking additional CPU to encode.

    The main thing to aim for with the frame rate is consistency. A consistent frame rate is good, a frame rate that jumps up and down is very noticeable and annoying to a viewer. Frame rate correlates pretty directly with the codec - the quickest way to reduce CPU usage if you're having trouble is to reduce the frame rate as a 20% reduction in frame rate results in 20% less work for the codec.
  • Resolution
    While you may think the higher the resolution, the better the quality will be, this isn't necessarily true. Very few people will have the CPU and Internet bandwidth to support a high quality 1080p (1920x1080) stream at a decent frame rate. It's much better to have a lower resolution stream at a steady and consistent frame rate than to try and push the resolution as high as it goes.

    Codecs work on a variable bit-rate and more complex scenes can require more time to encode. While your stream might seem fine at 1080p@30FPS while looking at the SC2 menu, come a big battle and you may find your stream turns into a slideshow as the codec can't keep up with all the data.

    Try to pick sizes that are exact 2:1 reductions for best quality, eg if your SC2 is at 1680x1050, try streaming at 840x525. To change the resolution you can either set your SC2 to play in a lower resolution or set your streaming software to resize the input / output. Generally though you will want SC2 to run at your native monitor resolution with either a full size or half size resolution for your stream.
  • Bitrate
    The bit rate is the approximate amount of kbps that the codec will try to produce. However the H264 format is a variable bit rate format, so even if you specify 2000kbps, if the codec tries to encode something and it happens to come out at 2500kbps for that particular instant, it's going to either use it or drop it. It's important to pick a bit rate that is well below the maximum upload speed of your Internet to account for bursts like this. If you have 2mbps upload and stream at 1900kbps, come a burst of 2500kbps your stream is going to lag or drop frames (both equally bad).

    Lagging can become cumulative to the point where if your upstream never manages to recover and "catch up" to the live point in the stream (eg an average of 2.1mbps trying to go out of a 2mbps upstream), your stream will simply not work. Dropped frames are also bad as if a key frame is dropped, it can take 5 - 10 seconds before another key frame is generated, during which time your viewers will have no video.

    On the flip side, too low of a bitrate and your stream will look terrible. Codecs can't work magic - it's impossible to turn 1920x1080 @ 25FPS into a decent looking 1mbps stream for example.

The above four factors are the most important things to consider when setting up your stream. Some streamers prefer a higher resolution with a lower frame rate. Others take a more conservative approach and use a low resolution with a high frame rate and bit rate. This is actually very good option to start with since it guarantees no bitrate quality issues and doesn't usually use much CPU. I would personally recommend going for the lower resolution with higher bitrate/fps, it will look better.

Bandwidth
I've touched on the topic of bandwidth in the quality section, but it deserves its own section for clarity. First of all, streaming is tough on your connection. Any packet loss or jitter can cause your data to arrive late at the streaming provider which will discard it due to the timestamp being late. Worse still, your throughput may be reduced by retransmissions to the point where your stream buffer backs up and no new data ever makes it to your viewers.

When determining your bitrate, a good rule of thumb is to leave about 25% of your upstream unused. If you have a 2mbps upload speed, set your stream bitrate to 1500kbps. This leaves enough room for the occasional burst of data from the codec as well as for background applications such as any VoIP software and of course SC2 itself.

When determining your upstream speed, it's important to perform a realistic test. If you go to www.speedtest.net and pick the closest server to you, you're not going to get a realistic result. For users in the US, I would suggest picking a server on the East or West coast, whichever is furthest from you as a good baseline. If you're still using Windows XP, you will need to apply some registry tweaks to be able to get good performance to sites with higher latency, but that's beyond the scope of this guide.  Maybe a future guide. :)

Depending on your connection type, your upload speed may vary during the day as more users get online. Crowded cable networks and especially using wireless can be a big issue. Run tests at the time you would usually be streaming for accurate results. One final thing to keep in mind is some ISPs offer "boost" technology where for the first X seconds of a transfer, upload/download limits are relaxed slightly to provide for better looking results in speed tests.

For those of you on capped connections with a limited amount of transfer per month, you may want to avoid regular streaming. It can very quickly add up to a lot of bandwidth and may cost you additional fees from your ISP.

Finally, keep in mind that when you set your bitrate to X, your viewers need approximately X + 500kbps for a reliable streaming experience. If you can upload at 10000kbps then that's great, but don't expect many people to be able to watch your stream. (Side note: Justin.TV provides a service to transcode your stream into a lower resolution / bitrate if you are a partnered account. Contact them for details.  With this you can pump your bitrate as high as you want and still be optimal for everyone.)

Here's some very rough example bitrates you should be looking at for a nice quality stream at 25 FPS (these will vary depending on encoder used and other factors, with XSplit you can get away with a lower bitrate for the same quality for example):

480p (720x480): 750-1000kbps
720p (1280x720): 1500-3000kbps
1080p (1920x1080): 3000-5000kbps+



(note: 1080p can fully utilize 10,000kbps+)

Most of you will not be playing in a resolution that matches one of these exactly, so you'll likely want to resize your stream down to a matching aspect ratio.

CPU Usage
Here comes the fun part. Streaming requires lots of CPU. So does SC2. If you stream at too high a quality, both your stream and your game will start to lag. You need to find a balance between quality and how much the stream impacts your game performance.

First, if you have anything less than a quad core processor, you may as well forget about streaming in any kind of decent quality for now. SC2 itself can easily almost max out a dual core CPU, leaving no room for streaming.

Ideal CPUs:
Core i5 2500k / i7 2600k
Core i5 / i7 8xx / 9xx Series
AMD Phenom X4 / X6



*I personally use an i7 950 overclocked to 4.4ghz.

Unfortunately anything less than these including older Core 2 models are showing their age and you won't be able to reach the best results. Streaming and SC2 are extremely CPU dependent, your graphics card has a very minimal impact on things so don't go out and buy an expensive GPU in the hope it will fix things.

The codec you choose (which is influenced by which program you stream with) has a very big impact on CPU. Adobe's Flash Media Encoder has a pretty standard H264 encoder but it uses a lot of CPU. One benefit is that is multi-threaded, meaning it can take full advantage of multiple cores and benefits from i7 CPUs. XSplit on the other hand produces a higher quality output but appears not to benefit from multiple cores very well, so your CPU speed becomes a factor (one reason why the 2500k and 2600k work so well is they can easily hit 4.5+GHz with overclocking). There are other programs such as VLC (very difficult to setup) and Dynno (suffers from macroblock artifacting) but the two main programs most people will be looking at are XSplit and FME.

2011-05-21: If you use XSplit, make sure you check out this thread. It's essential for multi-core in XSplit.  SplitMedia claims they have included the updated x264 library in their latest T3 version, but I've tested it and this just isn't the case.  Follow the instructions in the link, it will help a lot.

2011-08-18: XSplit has updated the x264 library.  The above fix is no longer needed!

How you get your SC2 into the streaming program also has a big impact on CPU usage and in-game lag. Most screen capture options such as XSplit's internal capture and VHScrCap use a significant amount of CPU and rely on GDI which causes your game to lag even if your CPU isn't near maximum. The best option by far is to use DXTory which rips the screen directly out of your video card after it has been rendered by intercepting DirectX calls. This has almost zero overhead associated with it, however DXTory is not free - it will set you back around $50 and will not allow you to capture anything other than games. The next best appears to be SCFH, a GDI based screen capture. Even if you use XSplit, you aren't forced to use XSplit's internal capture - you can easily add a camera source of DXTory or SCFH.

Programs such as XSplit offer a virtual set where you can add overlays and other effects. Keep in mind - especially if you use transparency - that the cost of these effects can add up in terms of CPU usage. High-quality resizing is also an expensive operation for CPUs, so for the lowest possible CPU use, try to match your screen size with your stream size (XSplit users can ignore this since XSplit seems to scale everything regardless of it matching the output size).

Something you will want to do is to address your core loads.  You have two options to do this.  You can set your affinity on your cores so that your streaming program and SC2 run on separate CPU cores or you can set SC2.exe (or whatever game .exe) to High Priority in task manager or whatever application you use. Keep in mind that each person would determine the better option for their setup.  If your game only uses 1 core, then you will want to set affinities.  If your game uses more than 1 core AND each core isn't used at 90%+ cpu usage, then you will want to use the High Priority method.


Another thing if you use Vista / Windows 7 to do is to disable Aero (the fancy translucent desktop effects etc). To do this, right click on the shortcut to your streaming program or SC2 and under Compatibility, tick the "Disable desktop composition" box. This especially helps when using GDI capture methods.

Final Thoughts
One reason I like to use Adobe FMLE over XSplit is the status window. XSplit offers you pretty much zero feedback - it doesn't tell you the current FPS, whether there is any local buffering, if there are any input or output dropped frames, etc. It's pretty much just luck - try some settings and see if your stream lags, if you get buffering just restart and hope it's better, etc. FMLE on the other hand offers you very useful statistics - dropped frames, current bitrate (remember it's variable) and more.

Input drops mean your capture source such as DXTory or SCFH isn't providing input fast enough - this can happen in big battles where your SC2 FPS drops below your desired stream FPS. Output drops are the ones to watch for - this means output frames were dropped because they couldn't be encoded in time. Any amount of output drops means your stream will lag and you should re-adjust your settings. If you see publishing buffer or frame drops at non-zero values, this indicates your upload is too slow or the connection to your streaming service is failing.

Remember to test things with a realistic load - simply looking at the SC2 menu is easy for a codec to encode and won't provide accurate feedback. Watch some replays and move the camera around etc (but don't run replays on 2x or higher since that will use more CPU than a realistic game).



As a final note, I want to make sure you guys know that either FMLE or XSplit are perfectly acceptable solutions.  Each have their own strengths and weaknesses and will require being setup properly.  I may update this guide in the future with additional separate sections for FMLE and XSplit that explain specific detailed settings that are optimal.




Source(s):
R1CH from TeamLiquid
[ Read More ]

Posted by _ - - 47 comments


"How does IdrA do 2-2-2 worker splits so perfectly?"
"HuK is multitasking a 3 pronged attack on 3 different bases, how has he not misclicked once?"


Ok, so, I could have split this into 2 different posts, but I'm going to put it all into one.  If you are a gamer, this info is essential.  Trust me I've spent years researching and as time passed re-researched to keep myself up to date.  There are many things to learn on this topic but for any competitive gamer it's a must-have. Now, mice are kind of an interesting thing because there's quite a bit of preference that goes into play on the way that people hold their mouse, configure it's sensitivity in Windows/games, and how people configure the dpi on the laser or mouse optics. There's a right way of doing things aside from the personal preference specifics though. I will be covering topics such as the mouse itself (Logitech G9X), grip styles, and specific Windows/driver settings for both Windows and also StarCraft 2 for those that play. 


The sources for this post are very important and should all be looked over in depth. I'm explaining the overall "juice" of the respective topics, but if you want very detailed and specific info beyond what I'm going over in this post, you will want to refer to the sources as you'll find the answers there.  There's only so long of a post I can write before people 'TL;DR', lol.


Ok let's dive right in...


Part I: Logitech G9X Review


Logitech is a respected mouse manufacturer.  They've made quality mice for years and hundreds of gamers I know personally love Logitech mice.  Right now the G9X is widely considered their #1 mouse for coorded mice.  And seriously, what gamer in their right mind would use a coordless mouse? lol.  The G9X features a whopping 5700dpi, 1000hz polling rate (allows your computer to check for movement updates 1,000 times per second), includes two different exterior grip shells ("wideload" and "precision" - I personally prefer wideload), on-board memory that allows saving your dpi/sensitivity/etc profile settings, 2 scroll wheel options (clicks on each notch or just fully rolls with no clicks), side scrolling on the scroll wheel, weighting system (up to 28 grams / 1 oz), and high quality braided USB 2.0 cable that's made to last.


As we all know, preference is a big factor when it comes to what mouse is best for each person.  Although, most people don't know there are different grip styles and certain mice are made for each respective grip style. (Grip Styles explained more in Part 2)  I personally use a Fingertip grip, and the G9X is excellent for this grip.




Part II: Grip Styles


There are three widely used mouse grip styles, Palm, Claw, and Fingertip.  With the grip style, it's purely personal preference.  Over my 13+ years of gaming, I've used all 3 styles and have personally found Fingertip to be by far the best grip for me, and many friends of mine have found it to be the same. 


Typically, Palm grip is the least fatiguing.  It also has proven to be the least accurate.  If you need to make a very small and precise movement, it will be most difficult with this grip.  The key to the palm grip is that like the name hints, your palm rests fully on the mouse.


I've found the Claw grip to be the least popular of the three grips for gamers.  Although, some powerhouse gamers I know swear by it and perform very well, so who knows.  It's almost a hybrid between the other two grips.  Your palm slightly rests on the mouse but your fingers are in a more upright position.


The Fingertip grip is by far my personal favorite as well as a few of my close friends.  Many believe it to be the most fatiguing of the three grips.  With this grip, your palm does not touch the mouse at all.  You have full control of your mouse with just your fingertips.  If you are trying out this grip, make sure you have your thumb on one side of the mouse and your ring finger and/or pinkie firmly on the other to give you full control of the mouse for precise movements.


Part III:  Configuration - Hardware and Software



The G9x comes with the Setpoint software which is easy enough to navigate in. There is an option in it to allow your OS (Operating System) to handle your sensitivity settings instead of Setpoint; I recommend doing this. I configured the 5 custom dpi settings to levels that vary from 1600-5700. Using the small - and + button below the left click and above the LED display I can switch between the 5 custom levels. Though, I pretty much use 5000 dpi all the time.

As for software-side configurations, here's where things are going to get rather specific.

* As a competitive gamer, what is important to me is an un-accelerated predictable cursor moving on a 1:1 mouse movement to cursor movement ratio. What this means is that my mouse moves one pixel at a time, all the time. This is the only way I know to achieve ultimate precision in mouse use.  For those that are familiar with muscle memory, this is how you achieve it in gaming *

Boycott of MOUSE ACCELERATION. DO NOT USE IT! Learning how to use the mouse consistently will be extremely difficult unless you turn mouse acceleration off. The reason that mouse acceleration is bad is that it changes the distance traveled by the cursor based on the speed of your mouse flick. Specifically, your mouse's cursor speed will not be constant.  For example, let's say you were to move your mouse 1 inch on your mouse pad slowly, it would move 500 pixels.  But if you moved your mouse the exact same distance but at a faster speed, maybe it moves 1000 or 1500 pixels. In order to develop a sense of muscle memory with your mouse, a mouse flick of a certain distance on your mouse pad always needs to result in the same distance moved on your computer or in-game. As Antigen states:

"For example, you might move the mouse 6 inches to turn 180 degrees, then you move the mouse 6 inches another time, and depending on how fast you move the mouse you might turn 100 degrees, you might turn 270. This uncertainty in mouse response inevitably limits everyone's potential." 

To check your mouse acceleration in Windows 7 go to >> Control Panel\All Control Panel Items\Ease of Access Center\Set up Mouse Keys.

The next boycott is against ANY notch in the sensitivity settings that isn't 6/11 - or the very middle notch on the level selector.  6/11 is the only way to get 1:1 movement ratio, every other notch will change your pixel ratio, the different notches effect ratio as such. Huge sensitivity adjustments will mean that you will either skip whole pixels every time you move your mouse or extra pixels will be added that you didn't move your mouse for, and that's not precision.

Each notch in the sensitivity will yield the following movement ratios.
Mouse:Computer
  1. 32:1     (0.03125)
  2. 16:1     (0.0625)
  3. 4:1     (0.25)
  4. 2:1     (0.5)
  5. 4:3     (0.75)
  6. 1:1     Ratio 1.0 - Perfect!
  7. 2:3     (1.5)
  8. 1:2     (2.0)
  9. 2:5     (2.5)
  10. 1:3     (3.0)
  11. 2:7     (3.5)


If you're interested in seeing if you have mouse acceleration on or if your mouse is moving at a 1:1 mouse to cursor ratio, let's dive into the world that is MarkC's Mouse Fix Pack. 

If you think you have configured everything in Windows correctly, you might be fine! Open up MouseMovementRecorder.exe (after downloading/extracting the mouse fix pack) - it will show you exactly what pixel ratio you are experiencing right in cmd prompt. (For anyone paranoid, this pack has been checked for virus/trojan/spyware/etc by 20+ people, it's clean) If your ratio is correct you won't see any green or red bars.

If you do see red and green bars (indicating imbalanced pixel movement ratios), double check your windows mouse settings - if everything appears to be correct run the Mouse_Fix_Builder.vbs - that should set you up just fine. That is MarkC's method of forcing non-accelerated mouse into the windows settings (I think via registry?) Any other issues email/tweet/skype me we'll work on it.

"So Apoc, if I'm not allowed to change my sensitivity in windows and I'm not allowed to use mouse acceleration, how the hell do I increase my mouse speed/sensitivity?"

DPI is how! DPI is now the only way you can make your mouse move faster without distorting your mouse inputs. That's why you buy the hardcore gaming mouse with high rates of DPI! Higher DPI or (dots per inch) changes the amount of pixels you will move over a given distance of mouse travel. High DPI would mean shorter movements with more pixels traveled by your cursor while low DPI means you need longer mouse movements to move the same distance on screen.

Part IV: StarCraft 2

Great, you've configured your mouse settings in Windows successfully, woot! So now you open SC2 (with your mousemovementrecorder.exe on to test it) and younotice you're getting green and red bars again, wtf! Starcraft2 ignores mouse sensitivity settings from Windows. Instead of 11 notches in SC2, we have 20 notches... despite the fact that there are 100 different % notches, the only changes in sensitivity occur between the increments of 5, e.g. in SC2 1-5% is notch 1, 6-10% is notch 2, etc.


"umm, Apoc, so what notch do I want use in StarCraft II?"

I'm going to use a direct quote from hide.X's post on TeamLiquid.net to summarize this complex and rather mathy answer:

"for 1:1 ratio of mouse movement to cursor movement, set your in-game sensitivity to anything between 51%--54% [with "enhance pointer precision" turned off in windows] -- not 50% as people previously thought (although it sort of is 50%; it's just that you can't see what the decimal point on the number is so it's safer to use 51--54) (that is, 51%, 52%, 53%, and 54% are all exactly the same mouse speed)."

So if you followed this guide correctly, set your sensitivity in SC2 to somewhere between 51% and 54% and you will be on the correct notch.

Conclusion:

If all of this is new to you, it may take some adjusting.  But it won't take too long to adjust and you will notice a drastic increase in your performance in games.  If you're skeptical, just give it a try and see for yourself.  I'll end this on a quote from bananaconda who followed my guide before it was a written guide and it was just me helping friends on ventrilo:

"As a musician, I respect the power of muscle memory - and without disabling mouse acceleration and getting a 1:1 ratio your muscles aren't going to be able to find the consistencies they need to memorize mouse movements. After switching to a whole new mouse and config, it has taken a lot of grinding to get acclimated but, the differences in accuracy and consistency are absolutely 100% noticeable and worth it. While the most important thing to gamers is finding a config that makes one comfortable, I strongly support giving these settings a try." -bananaconda of bananaconda.net

Also a big thanks to bananaconda for taking some of the pictures used in this review/guide.


Downloads:

Sources:
           Explains mouse sensitivity and how it works in Starcraft II, important.
           An old post (about CS 1.6) but an important one. Explains and illustrates some of these concepts deeper than I could fit into this post.
[ Read More ]