Instructions for using Quake Capture are similar for all engine modifications. Following this general section you can read specific additional notes on Quake1 and Quake2 engines.
There are four new console variables: capture_mode,
capture_codec, and capture_fps.
capture_modeavi
and screenshot.
capture_codec0 always represents some appropriate default value.
avi mode: 0 is uncompressed, or use
the fourcc ("four character code") of the required installed codec.
E.g. divx is the fourcc of the popular DivX set of
codecs.screenshot mode: the 0 default does
the same as tga, the only currently recognised
value.capture_fpshost_framerate in Quake1,
fixedtime in Quake2. Setting the variable back to
0 removes its effect. See engine-specific notes for more
details.
capture_dirThe resolution of the capture is the same as that of the main Quake window. Set this using existing Quake menu or command-line options.
You may wish to set the speed of console movement so that the console
toggles instantly and does not interfere with capture. To do this, use
e.g. scr_conspeed 999999.
There are three new console commands: capture_start,
capture_stop and capture_demo.
capture_startcapture_start filename begins capturing to the
named file. A default extension depending on capture mode and/or
codec will be applied if necessary.
capture_stopcapture_stop ends capture and writes the file.
capture_democapture_demo demoname plays a demo recording,
but captures an appropriately named file from this demo, and exits
on completion. Uses 15fps if user has not set their own fps.
demoname may include a path, including access to
files in a PAK, but output is always a file in the current working
directory.
Designed for such things as batch use from the command-line, e.g.
glquake.exe -window -width 640 -height 480 +capture_fps 15
+capture_mode avi +capture_codec divx +capture_demo
demo1quake2.exe +gl_mode 3 +capture_fps 15 +capture_mode avi
+capture_codec divx +capture_demo demo1
capture_fps is implemented under the hood using
host_framerate, which sets a frame duration in
seconds. Remember that id misnamed the variable - capture_fps
10 will set host_framerate 0.1 for a frame
time of 0.1s, and hence a framerate of 10fps.
capture_fps 15 will set host_framerate
0.0666666666667.
Note that the Quake1 will drop very fast frames entirely, imposing a
maximum framerate of 72. In the event this matters for you it would be
necessary to amend the implementation of Host_FilterTime
in host.c.
Also, the console variable _snd_mixahead should be set to
something greater than the frame time to allow the engine to generate
the audio in time for it to be captured.
The engine will warn you if either of the above potentially troublesome circumstances occur.
capture_fps is implemented under the hood using
fixedtime, which sets a frame duration in
milliseconds. capture_fps 10 will set fixedtime
100 for a frame time of 100ms and hence a framerate of
10fps. Quake2 always interprets fixedtime as an integer
value, so not all framerates can be represented exactly. For example,
capture_fps 15 sets a rounded fixedtime 67,
giving an exact framerate of 14.92537...
Unfortunately, Quake2 considers use of fixedtime by the
client to be a cheat. Hence, by default it will prevent one from using
it in a multiplayer setting. Stupidly, this includes playback of
recorded demos of network play, where cheating is clearly irrelevant!
But for capture to work we do need to be able to reliably set a
fixedtime. So...
...Quake2 has a cheats console flag to allow cheats in
multiplayer. In the original engine, fixedtime is not one
of the re-enabled cheats, but in the patched engine, it is. So setting
capture_fps also forces on cheats 1 in order
to work in multiplayer settings.
Quake2 imposes minimum and maximum client framerates. In the event
that this matters for you, the maximum is controlled by the variable
cl_maxfps, whilst the minimum is hardcoded to 5 in the
released id codebase, with an earlier implementation using
cl_minfps having been commented out - it is easy to
re-enable.
In the original Quake2 engine, using fixedtime negates
the effect of timescale (the usual relationship between
gameclock time and real time.) Quake2 machinima sometimes uses
timescale, either for slow-motion or as part of a hack to
clip "swoosh-pan cut frames". From August 2004, QuakeCapture applies a
small patch to qcommon/common.c intended to allow
timescale to continue working under use of
fixedtime, and thus to enable capture of such machinima.
Also, the console variable s_mixahead should be set to
something greater than the frame time to allow the engine to generate
the audio.
The engine will warn you if any of the above potentially troublesome circumstances occur.