Post subject: Encoding AVIs
Joined: 2/15/2005
Posts: 246
Location: Torquay, England
I'm making a game which I want to record, but I've never had any luck with screen recorder software, cameras are too lossy in quality, and I don't want to buy another tv capture card. So I would like to be able to encode an AVI (or another format) from scratch within the game (which is written in VB2008). Obviously you guys know how to do it because AVI dump options exist in Gens and IIRC VBA. I've googled with no success at all, except for finding the windows media encoder, but that crashes with a DEP error, and I can't disable it as, well, you can't really do that for *.vshost.exe. So, how can I encode an AVI, or other media format? If worst comes to worst, I could have it dump all the frames into a bunch of .pngs and then spend absolutely forever joining them in wmm, but I really don't want to do that. And yes I am an experienced programmer, just because I use VB does not mean I suck at coding, so no flames plz >_>
Post subject: Re: Encoding AVIs
Editor, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
What you should do depends on your requirements. ― Portable (i.e. runs on not just Windows)? Then you cannot use VFW (video for Windows) routines. ― Want codec selection support? If you do, then in Windows you will probably use VFW (see above), and on other systems, delegate work to MEncoder. ― Want support for files over 2 gigabytes? I think VFW doesn't support that. ― Is depending on an external program (such as MEncoder) an option? ― Do you want compressed video output or raw? If raw is okay, then you can even create the AVI encoder yourself for most portable code and least dependencies. The AVI format is rather simple really. ― If limiting the video output to say, x264, is okay, you could still create the AVI writer yourself but link to the x264 library. This would still make it portable while achieving a high quality compression. ― Similarly for audio: MP3? Ogg? Or anything installed in the system? Or just raw? And finally, do you know how to capture single display frames? :) I.e. taking screenshots. Without invoking a library routine called "TakeScreenshot" that you don't know how it really works.
Joined: 3/7/2006
Posts: 720
Location: UK
Note about the 'capturing to individual frames' thing... VirtualDub easily converts a bunch of similarly named PNGs (and probably other image types) into an AVI, I've used this feature extensively.
Voted NO for NO reason
Joined: 6/28/2008
Posts: 2
If by chance you could post some example scripts for MEncoder to encode N64 videos such as super mario 64?
Banned User, Former player
Joined: 12/23/2004
Posts: 1850
Normally I'd say right here, except that page should be a red link. Feh. Your best bet is looking at any other pages on Making AVIs. If you know how to record and playback desyncless Mupen movies, it is a lot easier.
Perma-banned