Explore GameReplays...

Company of Heroes

203 users online in the past 15 minutes
185 guests and 18 members

Streaming Company of Heroes on Justin.tv

By Inverse - 15th April 2011 - 16:29 PM

IPB Image

If you have been following Company of Heroes at all over the past year, chances are you've visited hicksi's excellent broadcast site and/or broadcasted yourself with Xfire's Live Video broadcasting feature. Watching broadcasts is an excellent way for newer and more experienced players alike to steal little tips and techniques from the ways other players micro and control their units, while broadcasting your games is a great way to interact with the community and help newer players improve.

Of course, those of you who viewed or streamed games on Xfire's broadcast feature understand, and have experienced, its many imperfections. Luckily, improvements in video streaming technology have led to the development of a variety of streaming alternatives, such as own3d.tv and Justin.tv. While both excellent platforms for streaming games, Justin.tv (hereby referred to as JTV) has gone above and beyond by automatically archiving footage and taking steps to integrate video quality options and basic revenue sharing. And thanks to hicksi's recent broadcast site relaunch, the community will be able to locate both JTV and Xfire streams from one central portal.

Of course, despite the higher stream quality, greater flexibility, and reduced in-game performance impact, streaming games over JTV does not have the one-button simplicity that Xfire broadcasting enjoys. This guide aims to make the process of streaming your Company of Heroes matches over Justin.tv as painless as possible.

The Basics

The two things you're going to need in order to get started are a Justin.tv account and XSplit, the broadcasting client. Because there are already a number of guides online dedicated to setting up your XSplit settings for JTV, I will forgo that information for simplicity's sake (this guide does a good job of explaining first-time setup, while this guide suggests some quality settings relative to the strength of your machine). This guide will focus on the specifics of streaming Company of Heroes over Justin.tv.

Setting Up Company of Heroes

Once you have XSplit all set up and good to go, you're going to want to configure Company of Heroes for streaming.

IMPORTANT: XSplit does not officially support streaming full-screen games currently. While some are able to stream in full-screen with little or no issues, others (such as myself) experience graphical flickering if we attempt full-screen streaming. In order to avoid technical issues, this guide recommends streaming in windowed mode.

In order to smoothly stream Company of Heroes over Justin.tv we are first going to want to run the game in windowed mode. "But Inverse," you might be saying, "windowed mode is ugly, annoying, and immersion-breaking!" Do not fear; with a little tweaking, and some clever scripting, we'll be able to nearly replicate full-screen appearance.

Your first order of business is to tell the game you want it to run windowed. Doing this is simple; just right-click on your Company of Heroes desktop icon/shortcut, navigate to Properties, find the Target textbox (should be pointing to RelicCoH.exe), and add the following after the block of text enclosed in quotation marks:

-window -lockmouse

Own Company of Heroes on Steam? Want to stream the beta? Have no fear! Just find the game in your library, right-click on it, select Set Launch Options, and paste the above code into the given box.

IPB Image

This tells the game to run in windowed mode and restrict the mouse to the game's window, meaning you can mouse scroll around the map like you would if you were playing in full-screen mode. If we stop here, the game will function completely fine; however, if we were to play right now, we would notice the title bar intrusively occupying window space. The next section of this guide will address that problem.

Playing in windowed mode means you must play the game at your desktop's resolution. If this is a problem for you (because of performance issues or some other factors), broadcasting on Justin.tv will be extremely difficult.

So we have the game in a window, but we want it to look pretty. As it turns out, this is super easy. All we have to do is download and install AutoHotkey and run the following script (special thanks to pingtoft for this sexy updated version):

WinSet, Style, -0xC40000, a
WinMove, a, , 0, 0, % A_ScreenWidth, % A_ScreenHeight

Simply copy the above code and paste it into a Notepad file, then save the file as an AutoHotkey script (something like Broadcast.ahk or PrettyWindow.ahk). When saved, double-click on the .ahk file in order to load the script (to make things easier, I copied mine to the Startup folder so it loads automatically every time I start my computer).

With the script loaded, boot up Company of Heroes and hit CTRL+ALT+Z.

Hitting Ctrl+Alt+Z
You will have to hit CTRL+ALT+Z every time you start up Company of Heroes in order to resize the screen. When the game is closed, the window settings are lost.

What was this:

IPB Image

Is suddenly this:

IPB Image

Alternatively, you can download the above script compiled as an executable file. Simply run the .exe and hit CTRL+ALT+Z when in-game.

Other Programs
There are other third-party programs, such as ShiftWindow, that offer comparable services. However, I found this AutoHotkey script to be the easiest and best-looking solution for my needs and preferences.

Tweaks and Refinements

At this point, you can technically start streaming your games over Justin.tv. However, getting things set up is only half the battle; once everything is up and running, it's going to take some trial and error in order to find the correct combination of in-game and stream quality settings that provide the best viewer experience with the least in-game performance impact. Although these tweaks will differ on a case-by-case basis, I'll provide some general pointers and guidelines here.
  • If you're experiencing performance issues/stuttering either on your end or the viewer's end, considering dropping your in-game settings and make sure you close any unnecessary background programs in order to give the game and the broadcaster the most CPU time as possible.
  • Unless you have a state-of-the-art PC, chances are you will not be able to broadcast your monitor's full resolution at 30FPS. For Company of Heroes, broadcasting at 15FPS is completely sufficient, and will drastically improve performance. In terms of resolution, fiddle around until you find one that works, but try to keep it at the same aspect ratio as your native resolution (be it 4:3, 16:9, or 16:10).
  • In my experience, it seems that the order in which you run applications while broadcasting affects both stream performance and in-game performance. I've found that closing all non-essential programs, then running XSplit and beginning to broadcast, and then opening any other programs (such as the chat or Company of Heroes) will ensure optimal performance. This is completely subjective, and could in fact have no impact on performance whatsoever, but it's something to keep in mind if you experience stuttering.
  • When setting a bitrate for your stream, keep in mind your connection's upload speed (you can check with SpeedTest). Make sure you leave ample bandwidth for game traffic and any background applications (such as TeamSpeak/Ventrilo) that might require it.


At this point, you should have a fully functional Justin.tv stream up and running. Congratulations! You're well on your way to impressing the world with your insane Roo micro and masterful trolling of Siou in GameReplays chat. Don't forget to sign up on hicksi's newly relaunched broadcast site so the world knows when your stream is online! And, last but certainly not least, be sure to leave any questions in the thread linked at the bottom of this guide. If I like your question, I'll include it in the guide!

I hope this little project has helped you set up Company of Heroes broadcasting on Justin.tv. Happy streaming!