Record demo movie

Started by
5 comments, last by sirob 19 years, 4 months ago
Hi! I am working on a 2d/3d-engine, and I would like record films from it, but I would like it to generate it directly, and not just dump a bunch of screenshots that I'll have to put together in another program. I suppose I can use directshow, but I'm not sure where to look. Any suggestions or tutorials? Thanks!
Advertisement
You could use Windows Media Encoder 9 but I think it would be slow to run your engine and record at the same time. However if you have 2 computers you could output your monitor signal to another computer and record it there, if you have the necessary hardware that is...

The other solution would be for you to create a DirectShow filter and send frames to a video encoder through it, but I guess you don't have much experience with directshow, otherwise I think you would have done it already. So I suppose you should not go this way unless you're willing to spend time learning directshow.

Hope I helped.
Try FRAPS. It's the best solution that I could find, after a lot of searching.
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
I suppose if you had some sort of preconfigued path, so to speak, for your engine, which wouldn't require input, you could set the engine to run a frame at a time, while setting a time interval between frames... This would let you take as much time as you need to actually output the movie.

I suppose you could just output the frames to bmp files and use a program to turn them to a movie. This would provide high quality and is fairly simple. Hope this helps.
Sirob Yes.» - status: Work-O-Rama.
I have the engine set up to render each 1/x seconds (where x is the framerate :)).. so that's not the problem. I can use as much time as I need rendering one frame.

Right now I output one frame at a time, saving the front buffer with D3DXSaveSurfaceToFile, and then render a video using another program. But that requires me to save each picture, and I would prefer to output it all directly to a movie format.

So I should either use "Windows Media Encoder 9" or "DirectShow".. any suggestions to which of them, or any good tutorials for one (or both) of them?

Thanks for the help so far :)
Well, as far as I remeber with Windows Media Encoder 9 you can save your video output in .wmv format only (I could be wrong here), but with DirectShow you can output to any video format as long as the O.S. running your app has the codecs that your app needs.
But, Windows Media Encoder 9 is a complete program and all you need to capture your video is some mouse clicks, but I think it is impossible to synconise your app with it because you never know how much time is it going to take to process a frame, unless you only render at 1 frame per second and hope that WME9 won't take more than that to process each frame. In this case you'd be possibly wasting unnecessary time to capture your video.
In DirectShow you can know when to render your next frame to send it to processing, so your video capturing can run at full-speed. The only disadvantage I see here is the time you take to code your own directshow filter to send the frames to a video encoder filter, and if you don't know much about directshow it can take a while...

So, if you want to go with Windows Media Encoder 9, download it here and test it to see if it fits your needs.
If you want to go with DirectShow take a look at it's documentation and use the base classes that are included with you DX SDK.
BTW, if you have DX9.0c SDK installed you probably don't have the DirectShow Docs, you need to download the SDK extras here.

[Edited by - Kamikaze15 on December 5, 2004 7:31:21 AM]
From my personal experiances with WMEncoder 9 , it isn't what you need. It's far far far too demanding to run a 3d app and capture using that program.

I'd look into DirectShow some more or maybe into some other library that lets you output the movie directly from your app, like an mpeg4 library.

Also, if you don't need the movie already in a space-saving format, perhaps you could write your own code to dump the frames into an uncompressed avi/mpeg, without using a codec for it (this would produce very large movie files). You could then encode those large movie files with another program (you could use a WMEncoder object to convert a movie file to .wmv format -- though it's time consuming).
Sirob Yes.» - status: Work-O-Rama.

This topic is closed to new replies.

Advertisement