]> de.git.xonotic.org Git - xonotic/xonotic.wiki.git/blob - Democapture.md
b9d6458b7567c30bca03e0955dbc060ecd2d5355
[xonotic/xonotic.wiki.git] / Democapture.md
1 h1. Capturing video clips
2
3 Capturing video clips in Xonotic is easy, and does not need any external tools such as screen capturing software. You can choose to capture with either the (lossy) Ogg Theora codec or alternatively to an uncompressed avi file. Beware that capturing while playing is a bad idea, as this will result in very choppy video. Always record a demo of what you are going to capture before rendering it to a video file. Enabling auto recording of demos is a good idea, which can be done via the menu (Multiplayer -> Demos -> [X] Record demos while playing). Playing them back can be done from the same menu.
4
5 h2. cl_capturevideo
6
7 To capture a demo to a video clip you first start playing the demo and toggle the cl_capturevideo cvar. When it's on (1), the engine will start capturing screen frames and save them as either ogg or avi. The engine will slow down the demo enough to be able to capture all frames, which it can't do if you are recording while playing. Toggling the cvar to 0 will stop recording.
8
9 To work around the problem of a visible console in the beginning and end of a recording, you will have to bind cl_capturevideo to a key as follows:
10 <pre>
11 bind x "toggle cl_capturevideo"
12 </pre>where x can be any key (any letter or number (0-9), pgup, pgdn, alt etc.)
13 Note that the 'toggle' command simply toggles the value of cl_capturevideo. This means that recording starts the first time you hit the key and stops when you hit it again.
14
15 To switch between Ogg Theora and avi, use one of the following commands:
16 <pre>
17 // enable encoding to ogg theora
18 cl_capturevideo_ogg 1
19
20 // use uncompressed avi instead (beware of huge files!)
21 cl_capturevideo_ogg 0
22 </pre>
23
24 h2. Other useful cvars:
25
26 <pre>
27 // increase the framerate of the captured clip (eg. to 60)
28 cl_capturevideo_fps 60
29
30 // quality setting for ogg theora (video if recording to ogg, eg. 32 (default))
31 cl_capturevideo_ogg_theora_quality 32
32
33 // quality setting for ogg vorbis (audio if recording to ogg, eg. 3 (default))
34 cl_capturevideo_ogg_vorbis_quality 3
35 </pre>
36
37 h2. Fast forwarding
38
39 To fast forward, play a demo and type eg. "slowmo 50" into the console to fast forward 50 times faster. Set slowmo back to 1 when you want to start recording to return to normal speed. As of yet there's unfortunately no way to rewind other than restarting the demo, which kind of sucks (!). Hope that'll be fixed in the future...
40
41 h1. Using the demo camera
42
43 The demo camera can be enabled with
44 <pre>
45 camera_enable 1
46 </pre>It will by default follow the player and let you move the camera around.
47
48 h2. Camera modes
49
50 h3. Chase mode (default)
51
52 ** Can be enabled with: camera_free 0
53 ** Allows you to chase the player, and by default rotate and move the camera freely
54 ** You can smooth out the camera path with: camera_chase_smoothly
55 ** You can have the camera aim at the player with: camera_look_player
56
57 h3. Free fly mode
58
59 ** Can be enabled with: camera_free 1
60 ** Allows you to move and rotate the camera freely, and does not follow the player
61 ** You can have the camera aim at the player with: camera_look_player
62
63 h2. Changing speeds
64
65 ** Change the treshold for ignoring small mouse movements: camera_mouse_treshold
66 ** Change the camera rotation AND camera movement attenuation (why are these both in one cvar?): camera_speed_attenuation
67 ** Change the camera movement speed in chase mode: camera_speed_chase, and free mode: camera_speed_free
68 ** Change camera roll speed: camera_speed_roll
69
70 The camera can be moved with the same keys as you move with in the game, as well as +moveup, +movedown, +roll_left and +roll_right. These keys can be bound to a key as follows (eg):
71 <pre>
72 bind x +moveup
73 </pre>
74
75 To reset the camera, use:
76 <pre>
77 toggle camera_reset
78 </pre>(to mand1nga: why is this a cvar, not a command?)
79
80 You can get a list of all camera cvars and their descriptions by typing "camera_" into the console and then hitting tab. You'll also see the current value as well as the default value inside brackets, so don't be shy to fiddle around with them :)
81
82 h1. Advanced capturing
83
84 There are a couple of tricks which you can do to eg. change shooting angle of the camera and hide HUD elements.
85
86 h2. Changing shooting angles
87
88 To change the angles of the camera you'll have to create many video clips which you later have to merge in a video editor, but luckily you don't need to restart the demo for each angle. Instead you could use some simple scripting to "pause" the demo exactly at the moment you stop recording a clip. (and vice-versa)
89 The console commands to accomplish this look something like this:
90 <pre>
91 bind x "slowmo 0;cl_capturevideo 0"
92 bind y "cl_capturevideo 1;slowmo 1"
93 </pre>This'll make the x key stop recording as well as pause the demo, giving you time to set up the next shooting angle and settings for the camera. The y key will start recording and immediately unpause.
94 Don't forget you can put all commands and cvars into an autoexec.cfg file (which you might have to create!) in your data/ directory. Then they will be set at each startup of Xonotic, you can simply copy & paste them from here and don't need to type them in manually each time.
95
96 h2. Hiding HUD elements
97
98 ** r_letterbox -1 hides most HUD elements, including the kill messages.
99 ** If you instead only want to hide the HUD, use viewsize 120 (100 is default)
100 ** To hide the weapon, use r_drawviewmodel 0
101 ** To hide the crosshair, use crosshair 0
102 ** To hide waypointsprites, use cl_hidewaypoints 1