I wanted to make a game play trailer for my original arcade puzzle game Futile Tiles (http://www.futiletiles.com). The game is very fast and I needed to achieve high framerate and quality for the video, which is challenging using a slow computer. Low recording frame rate can also distract controlling the game actions.
This article teaches recording game play videos with maximum resolution and framerate. The solutions presented are quite easy to code, but not very obvious at first thought.
Do not use external recording software. Instead make the video using your own code. At the end of each completed frame take a screenshot and save it to an image file (for example from 000.png to 999.png). You can later combine these images into a complete video by using FFMPEG or some commercial video editing software. Remember to make the game actions proceed the right amount of time between the frames, such as 1/30 of a second, depending on your target video framerate.
You are able to capture the video with full resolution, but the framerate can be too low while recording. If you need to interact with the game, the video can look unnatural. Also you are unable to record the sounds.
Do not take a screenshot at the end of each frame. Instead, save directions how to draw each frame to a file. It is much faster to save this data than to take the screenshots. You should save the rotation, the scale, the transparency and all the other relevant parameters of each object on the screen to the file. After you are finished recording the data of your whole movie clip, you can finally load the data and replay it on the screen. During the replay session, take the screenshots at the end of each frame.
You are able to record the video with full framerate. However, you are unable to record the sounds. You could manually add the sounds in correct locations by using some video editor, however there exists a better solution.
To solve the problem with the sounds, you need to use some software that supports adding a combination of sounds to a video clip via scripting or command line. I used Adobe After Effects scripting for this purpose. You might be able to achieve the same with the combination of Audacity and FFMPEG. When a sound is played during game play, save the type of sound clip and the time since start of recording. Make a script based on the collected information and save it to a file. Finally combine the sounds to the video with the help of the script.
These methods were used for the trailer of my game Futile Tiles (http://www.futiletiles.com). When the trailer was recorded, Youtube did not support 60 fps video. However, it seems that the support is currently being added. If you are making a similar fast-paced game, the video quality could be greatly improved with 60 fps.
What do you think about the offered solutions? If you have a better way to achieve similar results, please, share it.
Please, follow me on Twitter for more awesome tutorials and games: https://twitter.com/IndiumIndeed
8 Sep 2014: Revised language
2 Sep 2014: Initial release
This article teaches recording game play videos with maximum resolution and framerate. The solutions presented are quite easy to code, but not very obvious at first thought.
Solution A
Do not use external recording software. Instead make the video using your own code. At the end of each completed frame take a screenshot and save it to an image file (for example from 000.png to 999.png). You can later combine these images into a complete video by using FFMPEG or some commercial video editing software. Remember to make the game actions proceed the right amount of time between the frames, such as 1/30 of a second, depending on your target video framerate.
Problems with solution A
You are able to capture the video with full resolution, but the framerate can be too low while recording. If you need to interact with the game, the video can look unnatural. Also you are unable to record the sounds.
Solution B
Do not take a screenshot at the end of each frame. Instead, save directions how to draw each frame to a file. It is much faster to save this data than to take the screenshots. You should save the rotation, the scale, the transparency and all the other relevant parameters of each object on the screen to the file. After you are finished recording the data of your whole movie clip, you can finally load the data and replay it on the screen. During the replay session, take the screenshots at the end of each frame.
The Problem with solution B
You are able to record the video with full framerate. However, you are unable to record the sounds. You could manually add the sounds in correct locations by using some video editor, however there exists a better solution.
Solution C
To solve the problem with the sounds, you need to use some software that supports adding a combination of sounds to a video clip via scripting or command line. I used Adobe After Effects scripting for this purpose. You might be able to achieve the same with the combination of Audacity and FFMPEG. When a sound is played during game play, save the type of sound clip and the time since start of recording. Make a script based on the collected information and save it to a file. Finally combine the sounds to the video with the help of the script.
Result
These methods were used for the trailer of my game Futile Tiles (http://www.futiletiles.com). When the trailer was recorded, Youtube did not support 60 fps video. However, it seems that the support is currently being added. If you are making a similar fast-paced game, the video quality could be greatly improved with 60 fps.
What do you think about the offered solutions? If you have a better way to achieve similar results, please, share it.
Please, follow me on Twitter for more awesome tutorials and games: https://twitter.com/IndiumIndeed
Article Update Log
8 Sep 2014: Revised language
2 Sep 2014: Initial release