I thought it might be nice to have an easy to follow guide for capturing HoN footage in Linux (this guide is geared towards Ubuntu specifically). If you've ever used/seen FRAPS in windows, we're going to accomplish the same thing in Linux.
Installing the Recording Program
The best program I've found is called GLC; it doesn't use much in the way of resources, is easy to install, and it's easy to use.
To install in Ubuntu:
Install these packages first:
On 64 bit these commands will also be necessary:
sudo apt-get install build-essential cmake libx11-dev libxxf86vm-dev libgl1-mesa-dev libasound2-dev libpng12-dev
Then follow this build script, leaving everything at default (and saying No to git):
sudo apt-get install gcc-multilib
sudo ln -s /usr/lib32/libGL.so.1 /usr/lib32/libGL.so
sudo ln -s /usr/lib32/libasound.so.2 /usr/lib32/libasound.so
sudo ln -s /usr/lib32/libXxf86vm.so.1 /usr/lib32/libXxf86vm.so
sudo ln -s /usr/lib32/libX11.so.6 /usr/lib32/libX11.so
sudo ln -s /usr/lib32/libpng12.so.0 /usr/lib32/libpng.so
*make sure to install glc into it's own directory for simplicity. I put it in ~/glc
Capturing and Playing the Video
chmod a+x glc-build.sh
Now that GLC is installed you could start capturing video right away by running "glc-capture ./hon-x86_64" (for 64 bit) from your HoN directory. Once in game you press shift+f8 to start (and stop) recording, which would create a .glc file with the video. This file can be viewed with "glc-play filename" in a terminal, but it gets very big extremely quickly and will eat up you hard drive space (as well as slow down your computer writing to the hard drive). To record a lot like this would use tons of space, and is also not ideal for streaming, so we're going to encode it on the fly before creating the files.
Encoding on the Fly
To accomplish this we're going to use the concept of named pipes to transfer the data between glc-capture and glc-play without actually writing it into a large video file like before. To do this we create the pipe with the command "mkfifo fifo.glc", and then we will send the output to that pipe by adding "-o fifo.glc" to glc-capture. We then start glc-play with the input file of fifo.glc like so "glc-play fifo.glc", and this will read the data as glc-capture inputs it.
Now we can send the glc-play output to mencoder in order to encode this video on the fly. The command would look something like this (this can change a lot depending on the mencoder settings, which you can tweak to your liking):
This sends the output of glc-play to standard out (the -), and then pipes it (the | ) to mencoder, and mencoder then reads the input from standard in (again the -). Mencoder reads the stream (of type y4m) and encodes it (-ovc lavc, this will encode to mpeg4). Lastly mencoder outputs this file as video.mpeg which will be much much smaller than the unencoded video file would be. In my experience it tends to grow at about 100 kb/s, or 1 megabyte for every 10 seconds, which isn't too bad although it will get big if you leave it on for a long time.
glc-play fifo.glc -o - | mencoder - -demuxer y4m -ovc lavc -o video.mpeg
All of this together in a shell script would like like this:
The -s in the glc-capture line makes it start capturing the second you launch the game. There are also many other options available for glc-capture which you can see here.
glc-capture -o fifo.glc -s $@ &
glc-play fifo.glc -o - |glc-play fifo.glc -o - | mencoder - -demuxer y4m -ovc lavc -o video.mpeg
If you were to save this in a file, say something called glc-start, and put it in your HoN folder then you would start HoN by using this:
This would automatically record the entire time you play and save it to a file called video.mpeg in your HoN folder (obviously you can move the output to wherever you want).
./glc-start hon-x86_64 (for 64 bit)
So that's it, you can now record HoN while you play and automatically encode it at the same time. Keep in mind though that even with a great computer this will still cause a big drop in performance, and it might be prudent to take steps to reduce some of the stress:
Offload Encoding to Server
Another thing you might be able to do, depending on your situation, is offload the encoding to another computer. I have a personal server do my encoding which greatly reduces the performance hit I take while playing HoN. In order to do this just run the mencoder command over ssh like so:
You'll need to use keys with ssh to do this (so it doesn't take a password), and you can read about setting that up here.
glc-play fifo.glc -o - | ssh username@server mencoder - -demuxer y4m -ovc lavc -o video.mpeg
Live streaming using this method is also possible, but I haven't ironed out all the kinks yet myself so I won't illustrate how here just yet. Once I get it working a little better, I'll edit this post with how to live stream. I've gotten streaming through VLC working just fine, but I haven't managed to get it to upload correctly to justin.tv without re-encoding the file which is pretty dirty. If anybody has experience with this please let me know.