VideoRecorder.wiki
changeset 252 4c9881425131
parent 225 770f7cffcb45
child 687 fe70504acfc2
equal deleted inserted replaced
251:103e54e77c6f 252:4c9881425131
    44 Video recording is not real-time. Instead it works as follows:
    44 Video recording is not real-time. Instead it works as follows:
    45 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* -> *?.txtin* and run 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 finishes it will be moved to *Videos/* and files *?.txtin* and *?.sw* will be automatically removed.
    45 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* -> *?.txtin* and run 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 finishes it will be moved to *Videos/* and files *?.txtin* and *?.sw* will be automatically removed.
    46 
    46 
    47 = Notes =
    47 = Notes =
    48 
    48 
    49  * If you will press ‘R’ multiple times during one game then 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.
    49  * 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.
    50  * It is supposed to use H.264 (MPEG-4 AVC) video codec. Binaries of ffmpeg for Windows include it. However, on 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
    50  * It is supposed to use H.264 (MPEG-4 AVC) video codec. Binaries of ffmpeg for Windows include it. However, on 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
    51  * Logs from ffmpeg/libav are written to game log (Logs/game0.txt).
    51  * Logs from ffmpeg/libav are written to game log (Logs/game0.txt).
    52  * Tested only on Windows and Linux.
    52  * Tested only on Windows and Linux.
    53  * For offscreen rendering OpenGL FAQ (http://www.opengl.org/wiki/FAQ#Offscreen_Rendering) suggests the following:
    53  * For offscreen rendering OpenGL FAQ (http://www.opengl.org/wiki/FAQ#Offscreen_Rendering) suggests the following:
    54   _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._
    54   _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._