author | Wuzzy |
Thu, 16 May 2019 18:50:50 +0100 | |
changeset 1874 | 048c71a203c8 |
parent 763 | d500b178f871 |
child 2095 | 7adbd97442fd |
permissions | -rw-r--r-- |
763
d500b178f871
VideoRecorder: Copy-editing, add title, fix header levels
Wuzzy
parents:
687
diff
changeset
|
1 |
#summary How to use the video recorder |
224 | 2 |
|
763
d500b178f871
VideoRecorder: Copy-editing, add title, fix header levels
Wuzzy
parents:
687
diff
changeset
|
3 |
= Video-recorder = |
d500b178f871
VideoRecorder: Copy-editing, add title, fix header levels
Wuzzy
parents:
687
diff
changeset
|
4 |
== How to use it == |
224 | 5 |
|
763
d500b178f871
VideoRecorder: Copy-editing, add title, fix header levels
Wuzzy
parents:
687
diff
changeset
|
6 |
Options can be set in special page, you can access it using button left to 'game settings' button. Currently, it contains only options, but later it will also contain list of recorded videos. To record video you must press ‘R’ during playing a game or watching a demo; then press ‘R’ again to stop recording. Recorded videos are saved to `<user data path>/Videos` (`~/.hedgewars/Videos` or `%USERPROFILE%\Hedgewars\Videos`). Note that video encoding does not happen in real-time; actually, it will occur after you have closed game engine; it takes some time so you must not close frontend after you have closed game engine or you may get damaged video files. |
224 | 7 |
|
763
d500b178f871
VideoRecorder: Copy-editing, add title, fix header levels
Wuzzy
parents:
687
diff
changeset
|
8 |
== How it works == |
224 | 9 |
|
763
d500b178f871
VideoRecorder: Copy-editing, add title, fix header levels
Wuzzy
parents:
687
diff
changeset
|
10 |
Video recording does not happen in not real-time. Instead it works as follows: |
d500b178f871
VideoRecorder: Copy-editing, add title, fix header levels
Wuzzy
parents:
687
diff
changeset
|
11 |
When you play game or watch a demo press ‘R’, game then will start to record camera positions to `VideoTemp/?.txtout` and sound to `VideoTemp/?.sw`. Press ‘R’ again to stop recording. After you will close game engine, `QTfrontend` will rename `?.txtout` to `?.txtin` and run an invisible instance of game engine which will actually encode video using prerecorded camera positions and sound; during encoding video file will be in `VideoTemp` and after encoding, it finishes it and moves it to `Videos/` and the files `?.txtin` and `?.sw` will be automatically removed. |
224 | 12 |
|
763
d500b178f871
VideoRecorder: Copy-editing, add title, fix header levels
Wuzzy
parents:
687
diff
changeset
|
13 |
== Notes == |
224 | 14 |
|
252
4c9881425131
Edited wiki page VideoRecorder through web user interface.
unC0Rr@gmail.com
parents:
225
diff
changeset
|
15 |
* If you press ‘R’ multiple times during one game, you will get several videos. They all will be encoded simultaneously, and each instance of game engine will use hundreds of megabytes so be careful. |
763
d500b178f871
VideoRecorder: Copy-editing, add title, fix header levels
Wuzzy
parents:
687
diff
changeset
|
16 |
* It is supposed to use H.264 (MPEG-4 AVC) video codec. Binaries of `ffmpeg` for Windows include it. However, on GNU/Linux you may have stripped `libavcodec` without `libx264`, then different codec will be used which will generate several times larger files. For Ubuntu, this may help: http://ubuntuforums.org/showthread.php?t=1117283 |
d500b178f871
VideoRecorder: Copy-editing, add title, fix header levels
Wuzzy
parents:
687
diff
changeset
|
17 |
* Logs from ffmpeg/libav are written to game log (`Logs/game0.txt`). |
d500b178f871
VideoRecorder: Copy-editing, add title, fix header levels
Wuzzy
parents:
687
diff
changeset
|
18 |
* Tested only on Windows and GNU/Linux. |
d500b178f871
VideoRecorder: Copy-editing, add title, fix header levels
Wuzzy
parents:
687
diff
changeset
|
19 |
* For offscreen-rendering, the OpenGL FAQ (http://www.opengl.org/wiki/FAQ#Offscreen_Rendering) suggests the following: |
d500b178f871
VideoRecorder: Copy-editing, add title, fix header levels
Wuzzy
parents:
687
diff
changeset
|
20 |
“_Some people want to do offscreen rendering and they don't want to show a window to the user. The only solution is to create a window and make it invisible, select a pixelformat, create a GL context, make the context current. Now you can make GL function calls. You should make a FBO and render to that. If you chose to not create a FBO and you prefer to use the backbuffer, there is a risk that it won't work._” |
224 | 21 |
SDL 1.2 does not allow to create invisible window, that’s why glut library is used. (SDL 1.3 allows it) |
763
d500b178f871
VideoRecorder: Copy-editing, add title, fix header levels
Wuzzy
parents:
687
diff
changeset
|
22 |
* Video recorder relays on framebuffer extension or auxiliary buffer for offscreen rendering. If your OpenGL implementation has none of these, then video recording may not work for you. Although, framebuffer extension must be common nowadays. |
225
770f7cffcb45
Edited wiki page VideoRecorder thru web user interface.
stepik-777@mail.ru
parents:
224
diff
changeset
|
23 |
* Setting large resolutions for video may not work due to limitations in your OpenGL implementation. At least resolutions not exceeding your screen resolution should work. |