Gw Temp


Tutorial - 'Encoding movies for RM2k/3' by Koji-Kabuto

An item about RPGMaker 2000 posted on


Koji-Kabuto tells us how to encode movies for smaller filesize!


Getting your movies encoded for RM2k/3
By Koji-Kabuto

Ok, so you’ve grabbed RPG Maker 2000/3 and have begun your game; everything goes fine, the story seems to be going along cool and the custom systems work wonderfully. But suddenly, you want to make a cool cut-scene, you want to portray a very dramatic and important moment into your game, or you simply want to make a cool introduction and you start to realize those little 24x32 charsets are not up to the job. Bearing the emotions and feelings you want to add to the scene may need more space, and pictures are just too static. So, you have decided to make a movie. But as soon as you go post on a forum, everyone flames you and yells “For fucking god’s sake, don’t”, “You’ll only be boosting the filesize needlessly”, “Anything you can make in a movie can be made with pictures or even events!”, etc, etc… and most of the time this is true, but sometimes, however, a movie can be a nice touch.

So, I’m here to teach you how to add your movie to the game, without boosting up your game 200MB! I am here to show you the wonders of video compression!

First, for example, let’s suppose you already have your movie done, you just need to add it to the game. The first thing we’ll be doing is getting a proper codec. You’ll want to head to Koepi's Media Development Page,

From there you will need to download the latest XviD binaries. Once you have downloaded them, you will need to install them of course. You can install them anywhere you please, and once you are done with that, we will be need two more programs; VirtualDubMod which can be found here: Sourceforge: VirtualDubMod

And finally we need CDex, which can be found here: CDex's Homepage

(I suggest downloading the zip bundle CDex, but if you want the installer, it’s all up to you.)

So, now you have all the necessary tools. What we will be doing first, is re-sampling the audio to an appropriate format and bit-rate. For this, you need to open VirtualDubMod and load your movie file:

Now, open the Streams Menu and go to Stream list, the following window will pop up:

Now what you want to do here is Demux it. Most probably, the audio will be in WAV or MP3 format. Save it to some folder in the corresponding format and open CDex.

CDex should look something like this:

Now, open the Options menu and go to Settings, and this window will pop up:

So, first thing here, leave the Thread Priority at normal, the encoder should be set to Lame MP3, and the options have to be MPEG 1. (I suggest 128 or 96kbps, anymore is just not necessary for a video file.) Make sure the Quality is set to “High( q=2 )”, and to check the “On-the-fly MP3 Encoding” option. Save and close the Settings window. Now, go to the Convert menu;

Depending on the format of your audio file, press either Re-encode Compressed Audio File(s), or Convert WAV file(s) to Compressed Audio file(s).

Whatever option you choose will pop this window up:

Just press on the “…” button and go to the location of your audio file. When you’re done, just select the file, and press Convert.

Simply wait until it’s finished - once the sound has been encoded, it should be located in “CDex\ my music” which is the default folder where CDex puts encoded files.

Now, go back to VirtualDubMod, and open your video again.

Go back to the Stream list and press the “Disable” button. Now click on “Add” and find your newly-encoded audio file. After you’ve done all this, it should look like this:

Now, press OK, and this time go to the Video menu-

Be sure it’s set to “Full processing mode”. Go to Compression, and a list of available codecs should be displayed, here:

Select the XviD MPEG-4 codec you installed earlier, and press Configure.

This window will pop up:

Go to Zone Options and select both “Begin with keyframe” and “Chroma optimizer enabled”, then press Ok.

Now, where it says “Encoding type”, select Twopass – 1st pass, and click on “more…”

Be sure “Full quality first pass” is unchecked and “Discard first pass” checked. Click the “…” button, and select any folder to save the statsfile for your video (What this does is analyze the video frame by frame and decide the optimal bitrate for each frame so you get an optimal video on the Size/Quality curve).

Now press OK, and go to File –> Save As:

Just save the video as 1stpass, and make sure the “Don’t run this job now; add it to job control so I can run it in batch mode.” option is checked, then press “Save”.

Now, go back to the Compression menu and the XviD configuration, and this time select “Twopass – 2ndpass” and press “more…”

This window should pop up:

The program should automatically refer to the statsfile you previously specified, if not, find it yourself by pressing the “…” button.

(The other options are the defaults and unless you REALLY know what you’re doing, don’t mess with them.)

Now press Accept, and be sure the target size is set to Kbytes. We must now decide the size of your video…

For a 1:30min video, I suggest 7-10MB. For, let’s say, a 30sec video I suggest around 3MB. Whatever size you choose, open the Windows Calculator and do the following operations; the desired size for your video (in MB), multiplied by 1024. Subtract the size of the audio file in KB (you can look it up in the Windows Explorer), and finally, subtract 512; the resulting value you must copy and paste into the size field on VirtualDub, and press “OK”.

Now, go back to File –> Save As, and this time select the definitive filename for your video:

Make sure “Don’t run this job now; add it to job control so I can run it in batch mode.” is checked and press Save.

Now, go to file –> Job Control and this window should popup:

Now, select the first Job on the list and finally press “Start”. Now, you should lay back and wait for both jobs to finish. The time it takes depends on the duration of the video, and the speed of your CPU. Anyway, once it finishes, your video should be ready for RPG Maker 2000/3! If you aren’t happy with the quality, mess with the settings a little until you are completely satisfied. If you have any doubts or problems, just IM me at ICQ: 77757182 or AIM: ShunsukeAkagi.

This has been all, and I hope you enjoyed this article…

Koji Kabuto.