Main Page Modules Data Structures Data Fields Related Pages
This section will guide you to create your datafile movie based on an avi file. The avi format is better to use, because it don't get loaded all into the memory, but the user can alter easily.
First, I recommend you to download Virtual Dub (http://virtualdub.sf.net), RAD Video Tools (http://www.radgametools.com), encoders DivX 5.xx and XviD (http://www.divx-digest.com).
Now, you can choose 2 modes to make your datafile movie:
- First, convert your .avi to a sequence of jpg's with RAD video tools. Select your file and click Convert a file. Select the Output type... to JPEG files and click Convert
- For the audio now, open your avi in Virtual Dub.
- In Audio, choose Full processing mode
- In Audio again, choose Compression...
- Select the codec, No compression (PCM) or mp3, if you have
- In File, select Save WAV... and choose the name of file.
- If you will use mp3, convert the wav to mp3, using some tool.
- In any ASC II text editor (Notepad will be ok), write a file like this, switching the data for match the settings of your movie:
fps = 9.990
desc = Card Captor Sakura - Dance of the Clow
XDIM = 352
YDIM = 240
In Virtual Dub you can see the fps and dimensions of the frame in File /File Information...
XDIM is the width, YDIM is the height and fps is frames per second. The desc is optional and not used really, but it's a small description of the movie.
Save this file to movie.cfg, for example.
- Now, use the dat utility to create the datafile.
If your movie posses more than 256 frames, change the line:
to
or to other value you want in dat.c, and recompile the Allegro to use the new dat utility.
- Finally, create the datafile:
dat -a Movie.dat.jpg -t JPG
dat -a Movie.dat audio.wav
dat -a movie.cfg -t INFO
Change audio.wav to the name of the audio file, and movie.cfg to the file name of your config file saved.
- First, if you don't have an avi file encoded with DivX or XviD, you can use Virtual Dub to re-encode the movie with one of these encoders. To do this, open the avi, in Video, choose Compression... and one of the supported codecs (XviD or DivX), configure the properties of the codec (quality) and OK.
- In Audio, select Full Processing , then select Compression, choose No compression or MP3 compression.
- Save the avi, File Save as AVI, select another name and Save.
- Now, open avi2dat.exe in MJpgAlleg tools directory, open the avi file, click in Save to datafile, select a name and save.
Usually the avi2dat produces a bigger file than the grabber, so open the generated datafile with grabber, save and quit.
- Test with MJpgDemo and see if it's good enough.
Makefile targets | MJpgAlleg - Main Page
Generated on Mon Apr 7 00:19:25 2003 for MJpgAlleg by
1.2.18