Important thing to note is that Unreal is a 32-bit game, so you need 32-bit recording software. Which can be quite a hassle to find these days! Thankfully, the Simple Screen Recorder (SSR) has a library called ssr-glinject that can also be built in 32-bit (and is built in openSUSE at least, in the Packman repository).
However, Unreal isn't very cooperative and will immediately segfault if you try to record it regularly. It seems to not like things being in its LD_PRELOAD for some reason, and to get accelerated recording, an OpenGL hook is needed.
The good thing is that the Linux version of Unreal actually allows you to specify the name of the OpenGL library to load! So you can specify to load the ssr-glinject library like this:
Code: Select all
[OpenGLDrv.OpenGLRenderDevice]
OpenGLLibName=libssr-glinject.so
Don't forget to set the Working Directory to your Unreal/System directory (UnrealLinux.bin isn't smart enough to figure out where it resides in, unfortunately).
So that's the short version. It will work just as well as it does recording any other program when set up that way.
However, there are some extra things I personally need that SSR doesn't handle. First, I have two monitors, and SDL by default puts the game on the wrong one. That can be solved with an additional environment variable.
Second is mouse acceleration. SDL by default doesn't do anything to change it, it uses the desktop settings (which means you get mouse acceleration). The optimal way to toggle it is to use `xinput` to first disable it and then re-enable it.
Third is sound. SSR lacks a way to record more than one sound stream at the moment. And I need to record both the game audio and the microphone... There's a workaround for that too: http://www.maartenbaert.be/simplescreenrecorder/recording-game-audio/
So in the end I made myself two scripts to handle it all. One script for launching SSR (have to set up the audio before launching it), and one for launching Unreal with all those extra features. The first one looks like this at the moment:
Code: Select all
#!/bin/sh
pactl load-module module-null-sink sink_name=duplex_out
pactl load-module module-null-sink sink_name=game_out
pactl load-module module-loopback source=game_out.monitor latency_msec=1
pactl load-module module-loopback source=game_out.monitor sink=duplex_out latency_msec=1
pactl load-module module-loopback sink=duplex_out latency_msec=1
simplescreenrecorder
pactl unload-module module-loopback
pactl unload-module module-null-sink
In my case, somehow Unreal refused to get remapped to the Game sink... No idea why, setting it simply didn't do anything. But thankfully there is another environment variable, called PULSE_SINK, that controls which sink the program should output the sound to.
The Unreal launcher script ended up being this:
Code: Select all
#!/bin/sh
MOUSE_NAME="The full name of your mouse"
cd /path/to/Unreal/System
xinput set-prop "$MOUSE_NAME" "Device Accel Profile" -1
PULSE_SINK=game_out SDL_VIDEO_FULLSCREEN_HEAD=0 LD_PRELOAD="" ./UnrealLinux.bin
xinput set-prop "$MOUSE_NAME" "Device Accel Profile" 0
Also note that profile 0 is the default profile. If you use a different profile, use the profile number you want at the second command there.
To get SSR to execute this, I have in OpenGL Settings [ch8594] Command `bash ~/bin/unreal-ssr.sh` (the latter is of course the path to the script above). As a bonus, since I have that `cd` statement in my script, I no longer need to enter anything into Working Directory.
So after that everything works very nicely. And the person who made SSR is working on a nicer way to record multiple inputs, so I'll be able to drop one of the scripts once that is done.