There is no need to read this entire thread, just read the first post for instructions!Link to documentation pageHello,
I have implemented Trimoor's idea of generating attract videos with MAME.
MAME generates a bunch of screen shots and a video encoding script which tells how to arrange the screen shots and audio into a movie. To encode the video, you need to get VirtualDub version 1.6.2 or later. You can get it
here. Note: you need to install it into a directory named \virtualdub on the same drive as MAME in order for the batch processes to work right.
By default, MAME uses the 'XVid' video compression software. If you use the defaults when you do not have the Xvid software installed, your videos will be huge. Zookeeper, for example, should produce an AVI that is less than 1/4 megabyte with Xvid. If it is not installed, Zookeeper will produce a 250 megabyte file!
This page has XVid software that will work with this project.
I am distributing binaries and source of version 0.89 and v0.90 of MAME.
Link to binary and source of MAME 0.89Link to binary and source of MAME 0.90Link to binary and source of MAME 0.91Link to binary and source of MAME 0.92Link to binary and source of MAME 0.93Link to binary and source of BuddaMAME 0.94Link to binary and source of BuddaMAME 0.95Link to binary and source of BuddaMAME 0.96Link to binary and source of BuddaMAME 0.97Link to binary and source of BuddaMAME 0.98Link to binary and source of BuddaMAME 0.99Link to binary and source of BuddaMAME 0.100Link to binary and source of BuddaMAME 0.101Link to binary and source of BuddaMAME 0.102Link to binary and source of BuddaMAME 0.103Link to binary and source of BuddaMAME 0.104Link to latest version of ListGenOnce you have the utilities to create the files, you'll need a batch file to run the utilities for each game. You'll need two batch files: batch.bat and makemovies.bat. Here's a sample batch.bat. Cut and paste into a file and modify according to your mame installation, and save into your mame directory.
@if "%1"=="" goto badparm
@if "%2"=="" goto badparm
@if "%3"=="" goto badparm
@if "%4"=="" goto badparm
@if "%5"=="" goto badparm
@goto goodparms
:badparm
@echo This batch file requires 5 parmaeters:
@echo 1) rom name
@echo 2) resolution
@echo 3) movieloops flag (usually 1)
@echo 4) moviestartframe value (usually 0)
@echo 5) movieendframe value (usually 0)
@echo Please reread the directions on how to use this utility!
@pause
@goto end
:goodparms
@if not exist movies mkdir movies
@if exist movies\%1.avi goto end
@if exist nvram\%1.nv goto rungame
@mame %1 -window -noartwork -resolution %2 -nothrottle -ftr 100
:rungame
time /T
@mame %1 -window -noartwork -makemovie -resolution %2 -wavwrite %1.wav -movieloops %3 -moviestartframe %4 -movieendframe %5
@if not exist %1.vdb goto end
@\virtualdub\virtualdub /s"%1.vdb" /x
@del %1.wav
@del /Q moviesnp\*.png
@del %1.vdb
@move /Y %1.avi movies
time /T
:end
As of version 1.6.4 of VirtualDub, there is a command line executable named "vdub.exe" which you should use instead of virtualdub.exe for streamlining the operation.
The second batch file you need is called makemovies.bat, which calls batch.bat for each of your ROMs.
@call batch 005 224x256 1 0 0 will use the existing loop detection
@call batch 005 224x256 2 100 200 will generate a movie starting at frame 100 and ending at frame 200.
You can generate your own makemovies.bat by using my ListGen utility, a link to it is above.
Here are the new options I have created for this utility:
makemovie Create series of snapshots and stop when cycle is detected
minmoviestart Lowest possible start frame of movie
minmovielength Lowest possible movie length (in frames)
maxmovielength Highest possible movie length (in frames)
moviethreshold Lowest 8-bit value for non-black pixel
movieaudio Movie audio compression type 0=none, 1=mp3
movievideo Movie video compression type 0=none, 1=DivX, 2=Cinepak, 3=Xvid (default)
skip_warnings skip MAME warnings
movieloops disable loop detection (0), use normal loop detection(1)
or use fixed starting and ending frames (2)
moviematchlength number of consecutive matched frames that determine a loop
Here is the mame.ini I use when generating movies. The autoframeskip and swtichres parameters are particularly important to get the movies to generate reasonably quickly.
skip_validitychecks 1
skip_gameinfo 1
skip_disclaimer 1
skip_warnings 1
rompath ..\roms
switchres 0
window 1
autoframeskip 0
artwork 0
frameskip 0
matchrefresh 1
waitvsync 1
minmovielength 800
maxmovielength 10000
movievideo 3
movieaudio 1
intmakectrl 1
extmakectrl 0
moviematchlength 10
Thanks to Trimoor for providing the idea for this project, and I owe a huge debt of gratitude to Silver for his help with the encoding.
Please post problems to this thread.
Regards,
Buddabing