capture game screen to gif

Started by
5 comments, last by KulSeran 17 years, 12 months ago
I use direct3d do a game. I wanna capture some screen (maybe a few sceond long) to memory or disk. I wanna be real time as quickly as possible. but read from buffer is very slow, but I found some game screen capture software can work real time. for example wow mmorg ,many people capture screen to teach other to beat boss.how to capture quickly?
Advertisement
Fraps is probably what you want. You'd then use some offline processing to convert that to an animated GIF if you want.

Doing it ingame is quite complex and depends on how you render. Assuming Direct3D, you'd just take multiple screenshots (possibly at lower resolution), and then compile them into a video or animated GIF.
You could also do it in two phases. In the first phase, the real-time capture, you simply capture user input and other info such as RNG seeding and audio output. Then once that is done, you can play back the game at any rate using the captured parameters, and capture the rendered frames from the front buffer. Then you can use any one of the available libs for stitching the frames and audio into mpeg, avi or gif (obviously no audio with gif) files. Personally, for a game I would encode it to a mpeg file unless there was some critical reason it needed to be a gif file.
.
Quote:Original post by derek7
I use direct3d do a game. I wanna capture some screen (maybe a few sceond long)
to memory or disk. I wanna be real time as quickly as possible.
but read from buffer is very slow, but I found some game screen capture software can work real time. for example wow mmorg ,many people capture screen to teach other to beat boss.how to capture quickly?


Not to derail the topic... but how do you get a rating of "User Rating: 0" without really trying...
I am working on a project. many model store in a pc server, a mobile phone can watch it by wireless. so when a mobile send a instruction to pc. pc can render it and send rendered animated-gif back to mobile.

to capture and convert it to gif on pc is a must.


Evil Steve give a good capture software, but it do not supply sdk to use.

logical: render to buffer, read buffer to memory, and convert it to gif, send it to mobile.


any other logical that can achieve the purpose are very welcome.
I test fraps ,and found it is capture video card data into harddisk.
if I use 800x600 ,it run at 180 fps, it can capture 13 fps.
if I use 400x300 ,it run at 700 fps, it can capture 50 fps.

so I think the bottle-neck should be in harddisk.
edit: I just found a funy thing .13x4~=50 (400x300) x 4 ~= 800x600

so the bottle-neck should be getting data from vide card.because how much size do you change ,you can only get a definite number of data from video card.,and that captured data in harddisk is different.one(800x600)is 13m one (400x300)is 30m.

how can reading from vide card be more slow than write data to harddisk?

it is funny, isn't is? why?

[Edited by - derek7 on April 20, 2006 10:27:49 PM]
Mainly the issue is that the video card has a very large one-way pipe.
Where a hard-disk may be able to read/write at 60Mb/s both ways, a video card is designed to run more like 119Mb/s into and 1Mb/s out of (made up #'s).

And, depending on how your game is set up, .kkapture could work too.
It may not run, but assuming you do get it to work, it hooks the timer and output functions of your code, so it can force 60fps recording.
(not going to work with anything interactive, since it came from the demo-scene for recording scenes)

This topic is closed to new replies.

Advertisement