Scripts for AVI recording

Post anything about MX Simulator here. Please. I'm begging you.
Post Reply
jlv
Site Admin
Posts: 14928
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Scripts for AVI recording

Post 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".
DJ99X
Posts: 15523
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: Scripts for AVI recording

Post 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.....
mace-x
Posts: 2303
Joined: Wed Jan 02, 2008 5:53 am
Team: your sister´s fan!
Location: candy planet.

Re: Scripts for AVI recording

Post by mace-x »

sounds great but..................
jusd do all that for 2 secs of filming?
:shock: :shock: :? :?

damn

anyway to fix the gamecam problem?
Image
Massacre ftw!

the human stupidity and the universe are unlimited, and im not totally sure about the universe...
DJ99X
Posts: 15523
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: Scripts for AVI recording

Post 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
Attachments
runrecorder.zip
(188 Bytes) Downloaded 291 times
jlv
Site Admin
Posts: 14928
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: Scripts for AVI recording

Post 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.
INVADEtheLINE
Posts: 552
Joined: Tue Mar 25, 2008 1:29 am
Team: Privateer
Location: New York, NY
Contact:

Re: Scripts for AVI recording

Post 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)
Last edited by INVADEtheLINE on Wed Oct 22, 2008 3:20 am, edited 1 time in total.
DJ99X
Posts: 15523
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: Scripts for AVI recording

Post by DJ99X »

It will use whatever is called mx.exe, which I'm guessing is what your Version 1.1 snapshot is called
Kawasakis
Posts: 6583
Joined: Sun Mar 16, 2008 5:32 pm
Contact:

Re: Scripts for AVI recording

Post by Kawasakis »

when i start the demo its bumpt out error ''dont send'' or something..
MXS Cup Winner
AX MX2 Champion

Image
Image
DJ99X
Posts: 15523
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: Scripts for AVI recording

Post by DJ99X »

Screenshot please
Kawasakis
Posts: 6583
Joined: Sun Mar 16, 2008 5:32 pm
Contact:

Re: Scripts for AVI recording

Post by Kawasakis »

Here...

Image
and bumpt another error with this file yuv2lav
MXS Cup Winner
AX MX2 Champion

Image
Image
DJ99X
Posts: 15523
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: Scripts for AVI recording

Post by DJ99X »

Are you following the instructions in the first post exactly?
Kawasakis
Posts: 6583
Joined: Sun Mar 16, 2008 5:32 pm
Contact:

Re: Scripts for AVI recording

Post by Kawasakis »

i think yea... okey i'm going to school now when i'm back i'll try again to do...
MXS Cup Winner
AX MX2 Champion

Image
Image
bondi18
Posts: 32
Joined: Mon Sep 22, 2008 3:15 am
Team: Privateer

Re: Scripts for AVI recording

Post by bondi18 »

Thank you mate works like a dream :)
Image
yomo
Posts: 1930
Joined: Tue Apr 22, 2008 10:00 am

Re: Scripts for AVI recording

Post by yomo »

is there a way to increase the quality of filming?
Image
jlv
Site Admin
Posts: 14928
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: Scripts for AVI recording

Post 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.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Post Reply