![]() ffmpeg -i gameplay-cut.avi -vf "fps=30,palettegen=stats_mode=diff" -y /tmp/palette.pngĪn important setting here is palettegen=stats_mode=diff - this tells ffmpeg to give priority to the moving parts of the gif (which will be your player, enemies, etc.) and less priority to static elements (such as backgrounds). As gifs are limited to 256 colors, and we want to use colors from our footage, we need to first create a color palette from our clip. To create a gif from our extracted clip we again use ffmpeg. It is important to use the -codec copy option, as this ensures no conversion or changes are made to the actual video, and its quality is kept intact. This basically says input the gameplay.avi video, then start the clip at 30s and cut out a 10s segment, and save that segment as gameplay-cut.avi. ![]() ffmpeg -i gameplay.avi -ss 30 -t 10 -codec copy -y gameplay-cut.avi To extract a clip from gameplay footage we use ffmpeg. Setup Kazam to record as Lossless JPEG so no quality is lost, and with at least 30 frames per second (any lower and gameplay may appear choppy). Check out this article for some tips on how to install and use it. Sample gif we created using this process - see it on twitter Recordingįor recording footage of your game, there are many options but we like Kazam - its simple and works really well. This is very important, as Twitter will heavily compress your gif on upload, and any loss of quality that already exists will be amplified.
0 Comments
Leave a Reply. |