Page 1 of 9

Scripts for AVI recording

Posted: Mon Jul 28, 2008 3:05 am
by jlv
Update 2011-12-23: This is obsolete. For a better script go here.

I went and found Windows versions of the MJPEG tools and SoX, which are what I use to make AVI movies. I've never used gamecam or anything but I believe this should work better since it records at a fixed 30 frames/sec no matter how slow your computer is.

Here is a zip which contains the required MJPEG programs, SoX, and some .bat scripts:
http://mxsimulator.com/scripts/mjpeg4mxsim.zip

To use it:

1. Unzip it somewhere.
2. Open the folder where you unzipped mjpeg4mxsim.zip.
3. Start up MX Sim, put it in windowed mode and quit.
4. Double click "mxavi".
5. The game should now start running in a 640x480 window with the video going into v.avi. Now play whatever demo you want to turn into an AVI and quit.
6. Double click "joinavi".

You should now have a mjpeg encoded file called "movie.avi".

If you want to use the command line instead, do this:

1. Start up MX Sim, put it in windowed mode and quit.
2. Open a command prompt. (start/run and type "cmd.exe")
3. Type "CD c:\wherever\you\unzipped\mjpeg4mxsim".
4. Type "mxavi".
5. The game should now start running in a 640x480 window with the video going into v.avi. Now play whatever demo you want to turn into an AVI and quit.
6. Type "joinavi".

If you have MX Simulator installed somewhere besides "c:\Program Files\MX Simulator" you will have to edit the path in "mxavi.bat".

Re: Scripts for AVI recording

Posted: Mon Jul 28, 2008 4:32 am
by DJ99X
JLV, that is absolutely fantastic. I was a bit skeptic when you said it records at a fixed rate of 30fps, especially when the game was saying 10fps, but sure enough, the video ran very smooth. Its good how it stops recording when you press pause. But my videos don't have sound? Is that how it is supposed to be or did I do something wrong?

EDIT- Ah, the joinavi bit.....

Re: Scripts for AVI recording

Posted: Mon Jul 28, 2008 4:50 am
by mace-x
sounds great but..................
jusd do all that for 2 secs of filming?
:shock: :shock: :? :?

damn

anyway to fix the gamecam problem?

Re: Scripts for AVI recording

Posted: Mon Jul 28, 2008 4:52 am
by DJ99X
Nah man, its easy as. And the results are so much better than what Gamecam gives. Just edit this .bat file with something, and change the path to whereever your folder is, then save it. Now all you have to do to run it each time, is run this bat file. Simple (oh, and don't forget to put the game in windowed form before you run it). And run joinavi.bat which is also in the folder, after you finish

Re: Scripts for AVI recording

Posted: Mon Jul 28, 2008 6:21 am
by jlv
If you don't want to open a command prompt you can just double click mxavi.bat or joinavi.bat. The only downside is the command prompt window disappears after it finishes when you start it that way, which will prevent you from seeing the error messages if there were any. Plus it's just more manly to use the command prompt.

Re: Scripts for AVI recording

Posted: Wed Oct 22, 2008 3:12 am
by INVADEtheLINE
Is there a way to make it so that when you record it uses the latest snapshots? I noticed that it defaults to Version 1.1 instead...

Otherwise this is perfect!


**EDIT** Nevermind, I just figured it out. Just rename it to mx.exe (Duh)

Re: Scripts for AVI recording

Posted: Wed Oct 22, 2008 3:20 am
by DJ99X
It will use whatever is called mx.exe, which I'm guessing is what your Version 1.1 snapshot is called

Re: Scripts for AVI recording

Posted: Wed Oct 22, 2008 4:16 am
by Kawasakis
when i start the demo its bumpt out error ''dont send'' or something..

Re: Scripts for AVI recording

Posted: Wed Oct 22, 2008 4:18 am
by DJ99X
Screenshot please

Re: Scripts for AVI recording

Posted: Wed Oct 22, 2008 4:26 am
by Kawasakis
Here...

Image
and bumpt another error with this file yuv2lav

Re: Scripts for AVI recording

Posted: Wed Oct 22, 2008 4:29 am
by DJ99X
Are you following the instructions in the first post exactly?

Re: Scripts for AVI recording

Posted: Wed Oct 22, 2008 4:30 am
by Kawasakis
i think yea... okey i'm going to school now when i'm back i'll try again to do...

Re: Scripts for AVI recording

Posted: Fri Jan 02, 2009 1:58 pm
by bondi18
Thank you mate works like a dream :)

Re: Scripts for AVI recording

Posted: Fri Jan 02, 2009 2:09 pm
by yomo
is there a way to increase the quality of filming?

Re: Scripts for AVI recording

Posted: Sat Jan 03, 2009 12:28 am
by jlv
Edit mxavi.bat. To set the jpeg quality, add -q [quality] to the yuv2lav command where quality is between 24 and 100. E.g:

mx --record-audio a-stereo-88320.ub --record-video --lock-fps 30 --width 640 --height 480 | ppmtoy4m -F 30:1 -S 420jpeg | yuv2lav -o v.avi -f a -q 100

You can set some other things too. Change --width 640 --height 480 to whatever resolution you want. You can also set the framerate. Try --lock-fps 60 and -F 60:1 and you will get more temporal resolution for doing slow motion effects.