chillinwater
06-17-2011, 09:47 AM
Get it here:
MAME2AVI Attract Creation Batch File Now Available (http://dosmame.mameworld.info/index.php/Special_Blog?cmd=post&id=31)
Thanks to "dosmame"
I didnt create this but I have been doing some testing with it and it also works with "MisfitMame"
and probably most Mame derived emulators (with a little "User Option" tweaking).
i.e. (untested)
-PSXMame
-Mess (may have to add the system parameter)
...etc
It also takes an unadvertised (undocumented) screen shot and places it in a "romnamed" subfolder in your emulators snap directory.
This is a start and walk away version so you can leave it un-attended because the process does take a long time.
-user options
-directories you need to change
-emulator your using if not mame
(i.e. for misfit "misfitgui.exe" or "mis.exe")
-PREREQUISITES and stuff I added to speed it up. The pause at the end just lets you see the "error" in the command window if you didnt configure your directories correctly.
Otherwise the command screen will just flash and you cant really see what you did wrong.
[MAME2AVI(faster).bat]
@echo off
::::::::::::::::::::::::::::::::::::::::::::::::::
::: :::
::: MAME ATTRACT CREATOR SCRIPT :::
::: :::
::: DOSMAME V1.0 June 2011 :::
::: :::
::: http://DOSMAME.MAMEWORLD.NET :::
::: :::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::: :::
::: MAME2AVI.BAT :::
::: :::
::: PREREQUISITES: :::
::: MENCODER :::
::: http://oss.netfarm.it/mplayer-win32.php :::
::: PUT MENCODER AND THIS SCRIPT IN THE :::
::: 'tools' DIRECTORY SPECIFIED IN THE USER :::
::: OPTIONS BELOW :::
::: :::
::: A WORKING WINDOWS COMMAND-LINE VERSION :::
::: OF MAME :::
::: :::
::: :::
::: :::
::: THIS SCRIPT WILL; :::
::: .SKIP AVI CREATION IF THE MOVIE ALREADY :::
::: EXISTS IN %mame_dir%\avi\ :::
::: .SKIP ROMS NOT AVAILABLE IN %mame_dir%\roms:::
::: :::
::: :::
::: :::
::: BEFORE RUNNING, SETUP YOUR USER OPTIONS! :::
::: :::
::: MAKE A BACKUP! :::
::: :::
::: USAGE IS ENTIRLY AT YOUR OWN RISK :::
::: xDOSMAMEx :::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
:::
::: DEBUG OPTIONS
:::
set debug=0
set debug_rom=8ballact
:: SET DEBUG TO 1 AND SET A ROM NAME IF YOU NEED TO DEBUG
:: A ROM AND SKIP THROUGH EACH STEP OF THE SCRIPT
:::
::: END OF DEBUG OPTIONS
:::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
:::
::: SET USER OPTIONS BELOW
:::
set clones_only=0
:: SET THIS TO 1 IF YOU ONLY WANT CLONES, OR 0 (ZERO) FOR ALL
set game_duration=50
:: THIS IS THE AMMOUNT OF TIME THE MOVIE WILL RUN IN SECONDS
set trim=25
:: THIS IS THE AMOUNT OF TIME IN SECONDS TO TAKE OFF THE BEGINNING OF THE MOVIE
set mame_dir=J:\HyperSpin\Emulators\Mame\137
:: THIS IS THE DIRECTORY OF MAME.EXE
set mame_exe=mame.exe
:: THIS IS THE MAME EXECUTABLE
set tools=J:\HyperSpin\Emulators\Mame\Roms2AVI
:: THIS IS THE FOLDER WHERE THIS SCRIPT AND MEMCODER LIVES
:::
::: END OF USER OPTIONS
:::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
:::
::: MAIN SCRIPT - DON'T TOUCH THIS BELOW
:::
if %debug% == 1 @echo on
cd %mame_dir%
if %clones_only% == 1 for /f "tokens=2" %%a in ('%mame_dir%\%mame_exe% -listclones') do call :doIt %%a
if %clones_only% == 0 for /f "tokens=1" %%a in ('%mame_dir%\%mame_exe% -listfull') do call :doIt %%a
:doIt
set rom=%1
if exist %mame_dir%\avi\%rom%.avi goto aviExist
if not exist %mame_dir%\roms\%rom%.zip goto romNotExist
if not exist avi mkdir avi
echo.
echo Running game %rom%
echo.
if %debug% == 1 if %rom% == %debug_rom% rem pause
start /min /wait %mame_dir%\%mame_exe% %rom% -aviwrite %rom%.avi -str %game_duration% -nouse_backdrops -nouse_bezels -window
if %debug% == 1 if %rom% == %debug_rom% rem pause
:createVideo
echo.
echo Creating video for %rom%
echo.
if %debug% == 1 if %rom% == %debug_rom% rem pause
if not exist snap\%rom%.avi goto noAviFound
%tools%\mencoder -oac copy -ovc copy snap\%rom%.avi -ss %trim% -oac mp3lame -ovc lavc -lavcopts acodec=mp3,1bitrate=128,vcodec=mpeg4,vbitrate=800, vhq,vm4v -o avi\%rom%.avi
if %debug% == 1 if %rom% == %debug_rom% rem pause
goto aviComplete
:noAviFound
echo.
echo Error: no snap\%rom%.avi output found - check roms
echo Error: no snap\%rom%.avi output found - check roms >> movie-log.txt
:aviComplete
echo.
echo Process complete for %rom%
if %debug% == 1 if %rom% == %debug_rom%
echo Cleaning up %rom%
echo.
del snap\%rom%.avi
:aviExist
echo.
echo %rom%.avi exists - skipping %rom%
goto :end
:romNotExist
echo.
echo %rom% rom not found
goto :end
:end
:::
::: END OF MAIN SCRIPT
:::
::::::::::::::::::::::::::::::::::::::::::::::::::
pause
MAME2AVI Attract Creation Batch File Now Available (http://dosmame.mameworld.info/index.php/Special_Blog?cmd=post&id=31)
Thanks to "dosmame"
I didnt create this but I have been doing some testing with it and it also works with "MisfitMame"
and probably most Mame derived emulators (with a little "User Option" tweaking).
i.e. (untested)
-PSXMame
-Mess (may have to add the system parameter)
...etc
It also takes an unadvertised (undocumented) screen shot and places it in a "romnamed" subfolder in your emulators snap directory.
This is a start and walk away version so you can leave it un-attended because the process does take a long time.
-user options
-directories you need to change
-emulator your using if not mame
(i.e. for misfit "misfitgui.exe" or "mis.exe")
-PREREQUISITES and stuff I added to speed it up. The pause at the end just lets you see the "error" in the command window if you didnt configure your directories correctly.
Otherwise the command screen will just flash and you cant really see what you did wrong.
[MAME2AVI(faster).bat]
@echo off
::::::::::::::::::::::::::::::::::::::::::::::::::
::: :::
::: MAME ATTRACT CREATOR SCRIPT :::
::: :::
::: DOSMAME V1.0 June 2011 :::
::: :::
::: http://DOSMAME.MAMEWORLD.NET :::
::: :::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
::: :::
::: MAME2AVI.BAT :::
::: :::
::: PREREQUISITES: :::
::: MENCODER :::
::: http://oss.netfarm.it/mplayer-win32.php :::
::: PUT MENCODER AND THIS SCRIPT IN THE :::
::: 'tools' DIRECTORY SPECIFIED IN THE USER :::
::: OPTIONS BELOW :::
::: :::
::: A WORKING WINDOWS COMMAND-LINE VERSION :::
::: OF MAME :::
::: :::
::: :::
::: :::
::: THIS SCRIPT WILL; :::
::: .SKIP AVI CREATION IF THE MOVIE ALREADY :::
::: EXISTS IN %mame_dir%\avi\ :::
::: .SKIP ROMS NOT AVAILABLE IN %mame_dir%\roms:::
::: :::
::: :::
::: :::
::: BEFORE RUNNING, SETUP YOUR USER OPTIONS! :::
::: :::
::: MAKE A BACKUP! :::
::: :::
::: USAGE IS ENTIRLY AT YOUR OWN RISK :::
::: xDOSMAMEx :::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
:::
::: DEBUG OPTIONS
:::
set debug=0
set debug_rom=8ballact
:: SET DEBUG TO 1 AND SET A ROM NAME IF YOU NEED TO DEBUG
:: A ROM AND SKIP THROUGH EACH STEP OF THE SCRIPT
:::
::: END OF DEBUG OPTIONS
:::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
:::
::: SET USER OPTIONS BELOW
:::
set clones_only=0
:: SET THIS TO 1 IF YOU ONLY WANT CLONES, OR 0 (ZERO) FOR ALL
set game_duration=50
:: THIS IS THE AMMOUNT OF TIME THE MOVIE WILL RUN IN SECONDS
set trim=25
:: THIS IS THE AMOUNT OF TIME IN SECONDS TO TAKE OFF THE BEGINNING OF THE MOVIE
set mame_dir=J:\HyperSpin\Emulators\Mame\137
:: THIS IS THE DIRECTORY OF MAME.EXE
set mame_exe=mame.exe
:: THIS IS THE MAME EXECUTABLE
set tools=J:\HyperSpin\Emulators\Mame\Roms2AVI
:: THIS IS THE FOLDER WHERE THIS SCRIPT AND MEMCODER LIVES
:::
::: END OF USER OPTIONS
:::
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
:::
::: MAIN SCRIPT - DON'T TOUCH THIS BELOW
:::
if %debug% == 1 @echo on
cd %mame_dir%
if %clones_only% == 1 for /f "tokens=2" %%a in ('%mame_dir%\%mame_exe% -listclones') do call :doIt %%a
if %clones_only% == 0 for /f "tokens=1" %%a in ('%mame_dir%\%mame_exe% -listfull') do call :doIt %%a
:doIt
set rom=%1
if exist %mame_dir%\avi\%rom%.avi goto aviExist
if not exist %mame_dir%\roms\%rom%.zip goto romNotExist
if not exist avi mkdir avi
echo.
echo Running game %rom%
echo.
if %debug% == 1 if %rom% == %debug_rom% rem pause
start /min /wait %mame_dir%\%mame_exe% %rom% -aviwrite %rom%.avi -str %game_duration% -nouse_backdrops -nouse_bezels -window
if %debug% == 1 if %rom% == %debug_rom% rem pause
:createVideo
echo.
echo Creating video for %rom%
echo.
if %debug% == 1 if %rom% == %debug_rom% rem pause
if not exist snap\%rom%.avi goto noAviFound
%tools%\mencoder -oac copy -ovc copy snap\%rom%.avi -ss %trim% -oac mp3lame -ovc lavc -lavcopts acodec=mp3,1bitrate=128,vcodec=mpeg4,vbitrate=800, vhq,vm4v -o avi\%rom%.avi
if %debug% == 1 if %rom% == %debug_rom% rem pause
goto aviComplete
:noAviFound
echo.
echo Error: no snap\%rom%.avi output found - check roms
echo Error: no snap\%rom%.avi output found - check roms >> movie-log.txt
:aviComplete
echo.
echo Process complete for %rom%
if %debug% == 1 if %rom% == %debug_rom%
echo Cleaning up %rom%
echo.
del snap\%rom%.avi
:aviExist
echo.
echo %rom%.avi exists - skipping %rom%
goto :end
:romNotExist
echo.
echo %rom% rom not found
goto :end
:end
:::
::: END OF MAIN SCRIPT
:::
::::::::::::::::::::::::::::::::::::::::::::::::::
pause