The NEW Build Your Own Arcade Controls

Main => Software Forum => Topic started by: Buddabing on December 30, 2004, 10:49:07 am

Title: MAME Movie Maker released
Post by: Buddabing on December 30, 2004, 10:49:07 am
There is no need to read this entire thread, just read the first post for instructions!

Link to documentation page (http://cpmaker.mameprojects.com/doc/mmm.htm)

Hello,

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 (http://www.virtualdub.org). 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 (http://www.divx-digest.com/software/xvid.html) 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.89 (http://cpmaker.mameprojects.com/files/MAME089.ZIP)
Link to binary and source of MAME 0.90 (http://cpmaker.mameprojects.com/files/MAME090.ZIP)
Link to binary and source of MAME 0.91 (http://cpmaker.mameprojects.com/files/MAME091.ZIP)
Link to binary and source of MAME 0.92 (http://cpmaker.mameprojects.com/files/MAME092.ZIP)
Link to binary and source of MAME 0.93
Link to binary and source of BuddaMAME 0.94 (http://cpmaker.mameprojects.com/files/MAME094.ZIP)
Link to binary and source of BuddaMAME 0.95 (http://cpmaker.mameprojects.com/files/MAME095.ZIP)
Link to binary and source of BuddaMAME 0.96 (http://cpmaker.mameprojects.com/files/MAME096.ZIP)
Link to binary and source of BuddaMAME 0.97 (http://cpmaker.mameprojects.com/files/MAME097.ZIP)
Link to binary and source of BuddaMAME 0.98 (http://cpmaker.mameprojects.com/files/MAME098.ZIP)
Link to binary and source of BuddaMAME 0.99 (http://cpmaker.mameprojects.com/files/MAME099.ZIP)
Link to binary and source of BuddaMAME 0.100 (http://cpmaker.mameprojects.com/files/MAME100.ZIP)
Link to binary and source of BuddaMAME 0.101 (http://cpmaker.mameprojects.com/files/MAME101.ZIP)
Link to binary and source of BuddaMAME 0.102 (http://cpmaker.mameprojects.com/files/MAME102.ZIP)
Link to binary and source of BuddaMAME 0.103 (http://cpmaker.mameprojects.com/files/MAME103.ZIP)
Link to binary and source of BuddaMAME 0.104 (http://cpmaker.mameprojects.com/files/MAME104.ZIP)

Link to latest version of ListGen (http://cpmaker.mameprojects.com/files/LISTGEN.ZIP)

Once 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
Title: Re: MAME Movie Maker released
Post by: Buddabing on December 30, 2004, 12:05:55 pm
The default video compressor is currently the one with the fourcc value 'DIVX'. That, obviously, is some flavor of DivX, but I don't know which.

Apparently, the DIVX video doesn't handle Missile command correctly. So, I found a compressor that could. It has a fourcc value of 'CVID' and I believe is Cinepak.

You can tell the fourcc values if you generate a job script with Virtual Dub. In the line that has "SetCompression" in it, the data will have an
Title: Re: MAME Movie Maker released
Post by: 2600 on December 30, 2004, 02:27:37 pm
I believe this is relevant.

Here's a txt file that has the frames to skip before the attract mode starts.  I got this a while ago when the -ssf patch was released.  It may be helpful if when people make videos for games not on the list to contribute and keep a tally of the frames to skip.
Title: Re: MAME Movie Maker released
Post by: Silver on December 30, 2004, 03:06:43 pm
I believe this is relevant.

Here's a txt file that has the frames to skip before the attract mode starts.  I got this a while ago when the -ssf patch was released.  It may be helpful if when people make videos for games not on the list to contribute and keep a tally of the frames to skip.

I think Buddabing's patch is be able to generate the the number of frames to skip for each game as it detects the loop - its basically the the first frame of the loop.

Buddabing - could you add to your patch to save the first frame number along with romname to a txt file as it detects the loop?

Title: Re: MAME Movie Maker released
Post by: Buddabing on December 30, 2004, 03:33:48 pm
I believe this is relevant.

Here's a txt file that has the frames to skip before the attract mode starts.
Title: Re: MAME Movie Maker released
Post by: JoyMonkey on December 30, 2004, 04:18:36 pm
...You need to install my MAME artwork display code patch, which is here (http://cpmaker.mameprojects.com/files/PATCH089.ZIP). Unzip this file to your mame root directory and do a patch -p1 < patch.txt from a command line...

Can you explain this for those of us too embarrassingly dumb to speak up. I entered:
patch -p1 < patch.txt
and I got the usual 'not a recognized command' error.

Do I need some kind of patching executable to apply the patch? I did a quick search for patch.exe and just got back a bunch of virus info.

Edit: Just realized that you meant the Mame source folder, duh me!
Title: Re: MAME Movie Maker released
Post by: BuZz880 on December 30, 2004, 05:30:33 pm
I cannot download movies.zip; or rather I can but winrar says it is corrupted and though it can partially repair it; I cannot get what I want... namely the listgen stuff which is what I would like to take a look at as I am not a "now go re-compile mame" kind of guy.



Title: Re: MAME Movie Maker released
Post by: Buddabing on December 30, 2004, 09:50:06 pm
I cannot download movies.zip; or rather I can but winrar says it is corrupted and though it can partially repair it; I cannot get what I want... namely the listgen stuff which is what I would like to take a look at as I am not a "now go re-compile mame" kind of guy.





I don't know if it's a file problem or a server problem. Unfortunately I have fallen ill so I can't work on it right now.
Title: Re: MAME Movie Maker released
Post by: BuZz880 on December 31, 2004, 12:28:18 am
No hurry here.  Take care of yourself.
Title: Re: MAME Movie Maker released
Post by: Silver on January 03, 2005, 06:39:07 am
The zips are now working fine when I download them.

Buddabing, hope you are feeling better.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 03, 2005, 11:34:42 am
Okay, I'm back and I'm better now, I was like this
Title: Re: MAME Movie Maker released
Post by: )p( on January 03, 2005, 11:57:21 am
Good your feeling better Buddabing  :D

I think this is a great effort...i hope it works out really well. Hosting the attractmode videos has been very difficult for years... I also really like that you put in the effort to mix the sound in too.

peter
Title: Re: MAME Movie Maker released
Post by: 2600 on January 03, 2005, 11:58:41 am
I was just about to post a problem compiling and noticed movies.zip changed.  :P
(BTW, it was a problem with common.c)

I'm having another issue, I'll compile later, but for now I am using the mame.exe supplied.  I ran this "batch pacman 224x288" and I am not getting an output.  I can run virutaldub from the commandline, and I don't know about avisynth.  I didn't see where to get the "ffvfw" package.

Any help?
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 03, 2005, 12:42:54 pm
I was just about to post a problem compiling and noticed movies.zip changed.
Title: Re: MAME Movie Maker released
Post by: 2600 on January 03, 2005, 01:52:26 pm
Ok, stepped through it and it's virtualdub.  I tried running the script and it says:

Member 'SetInputFormat' not found

My pacman.vdb file has VirtualDub.video.SetInputFormat(0);

After a quick look, I can't find any documenation on other options for setinputformat.



Title: Re: MAME Movie Maker released
Post by: Buddabing on January 03, 2005, 02:13:48 pm
Ok, stepped through it and it's virtualdub.
Title: Re: MAME Movie Maker released
Post by: 2600 on January 03, 2005, 02:37:16 pm
Ok, I forgot to give you the first error message.

Cannot detect file type of "D:\mame\pacman.vdb"

Then if I open it manually I get the other error message.
Retried the movieoption, same thing.  Also, I'm using vdb 1.5.10 and it is installed correctly.

The error I believe is because virtual dub 1.5.10 can not open png files directly, 1.6.2 can so I tried that and it worked.  Do you have a seperate codec for png files?
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 03, 2005, 03:06:31 pm
Ok, I forgot to give you the first error message.

Cannot detect file type of "D:\mame\pacman.vdb"

Then if I open it manually I get the other error message.
Retried the movieoption, same thing.
Title: Re: MAME Movie Maker released
Post by: Minwah on January 03, 2005, 04:21:18 pm
In the meantime I'll install vdb 1.5.10 and I'll see if I can reproduce your problem.

I couldn't get it to work with VirtualDub 1.5.10 either, 1.6.2 worked great, except I have no audio for some reason...I'm just trying to figure why not...

Nice work Buddabing :)
Title: Re: MAME Movie Maker released
Post by: Minwah on January 03, 2005, 04:32:47 pm
I have no audio for some reason...I'm just trying to figure why not...

Not sure what the problem is exactly...the wav file is not being used by the script, but if I comment out the parts which delete the images/wav and manually run the script *after manually selecting the wav file in Audio > WAV Audio* then it works fine.

Edit: note I have movieaudio 0 set in mame.ini
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 03, 2005, 04:51:08 pm
In the meantime I'll install vdb 1.5.10 and I'll see if I can reproduce your problem.

I couldn't get it to work with VirtualDub 1.5.10 either, 1.6.2 worked great, except I have no audio for some reason...I'm just trying to figure why not...

Nice work Buddabing :)

The AudioDub() statement in the .avs file tells VirtualDub where the audio comes from. Make sure your AviSynth is up to date. (2.5.2 or higher, -not- 2.0.x)

And thank you for the props. I was starting to think my efforts on this projects had been wasted.
Title: Re: MAME Movie Maker released
Post by: Minwah on January 03, 2005, 05:26:00 pm
The AudioDub() statement in the .avs file tells VirtualDub where the audio comes from. Make sure your AviSynth is up to date. (2.5.2 or higher, -not- 2.0.x)

And thank you for the props. I was starting to think my efforts on this projects had been wasted.

Here's an example avs file, this is OK isn't it?:

video1=ImageSource ("snap\arm%05d.png", 0, 814, 38.000000)
audio1=WavSource("armora.wav")
AudioDub(video1,audio1)
Trim(video1,1,0)

I grabbed AviSynth 2.5.5 btw.


No time wasted IMO.  I bet a lot of people will use this when they hear about it...I'd rather make my own movies than download them if I can :)
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 03, 2005, 05:28:03 pm
The AudioDub() statement in the .avs file tells VirtualDub where the audio comes from. Make sure your AviSynth is up to date. (2.5.2 or higher, -not- 2.0.x)

And thank you for the props. I was starting to think my efforts on this projects had been wasted.

Here's an example avs file, this is OK isn't it?:

video1=ImageSource ("snap\arm%05d.png", 0, 814, 38.000000)
audio1=WavSource("armora.wav")
AudioDub(video1,audio1)
Trim(video1,1,0)

I grabbed AviSynth 2.5.5 btw.


No time wasted IMO.
Title: Re: MAME Movie Maker released
Post by: Minwah on January 03, 2005, 05:34:25 pm
Does Armor Attack have audio in its attract?

Try Zookeeper. It has a noisy attract mode that is pretty easy to sync to the video.

Just some beeps on startup...maybe not included in the attract mode...

Still no-go for zookeep - sound works fine while MAME is running, but when the script runs is says '0 bytes' in the Audio part of the dialog.  zookeep.wav is there and plays fine, and here's part of  zookeep.avs:

audio1=WavSource("zookeep.wav")
AudioDub(video1,audio1)


 ???
Title: Re: MAME Movie Maker released
Post by: Silver on January 03, 2005, 09:13:16 pm
Sorry not been around much to help out with the video side of things.

I've still not run the program yet, I'll get onto it tomorrow and try sort out these encoding problems.

A few points:

1) If the avs script posted by Minwah was generated by the patch, then Buddabing I believe you need to remove the "video1" part of the Trim command, otherwise you will de-sync all the audio.  (ie Trim(1,0) not Trim(video1,1,0) )

2) Looking into the ffvfw issue - I believe ffvfw is actually trying to call DivX in this instance, so try installing DIVX codec and running then. I believe virtualdub will error if you try to use ffvfw and don't have DIVX installed. All my tests used Xvid - I can post an alternate source patch to use this instead if anyone wants/Buddabing does not mind.

3) @2600: The lack of a png/mng video codec is the main reason we have to use this convoluted frameserver method.

4) All tests used VirtualDub 1.5.10, so I'm not sure of the problem here - and why switching to 1.6 helped.... Buddabing does your patch save the avs/vdb files is a funny text format like UTF-16?

5) Minwah - your audio problem just seems like a selection problem. I know that zookeep works fine encoded. Could you post/email a sample whole .vdb file? The avs file is absolutely fine (apart from the Trim issue mentioned above, although you will not notice this in zookeep as there is nothing to trim (1 frame is chopped)

I think this program will become very popular when more people know what it does - and we iron out the bugs. I will do a full test later so I won't have to guess some of the answers....

Title: Re: MAME Movie Maker released
Post by: Silver on January 03, 2005, 09:35:05 pm
OK, so I had a quick look now...

In Batch.bat the virtualdub line is:

\virtualdub\virtualdub /i %1.vdb /wait /x

But /i is only supported in vdub 1.6.1 and up. This should be:

\virtualdub\virtualdub /s"%1.vdb" /wait /x

Also I am not sure that you need /wait but it seems to work with or without and still not progress till finished.

1.5.10 is used as its the "supported" version or rather the author does not guarentee not to have broken anything in later versions. It may be that 1.6.2 works fine but it may have slightly different scripting. Mamewah - is your audio error only with 1.6.2?
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 03, 2005, 09:42:15 pm
Sorry not been around much to help out with the video side of things.

I've still not run the program yet, I'll get onto it tomorrow and try sort out these encoding problems.

A few points:

1) If the avs script posted by Minwah was generated by the patch, then Buddabing I believe you need to remove the "video1" part of the Trim command, otherwise you will de-sync all the audio.
Title: Re: MAME Movie Maker released
Post by: Silver on January 03, 2005, 10:10:24 pm
I thought those two syntaxes had identical effect so long as the Trim() was after the AudioDub().

Ah yes that would be make sense. Easy to check....

Quote
I would prefer if you emailed me either a working VirtualDub script or a piece of source code so I can integrate it into my code. movievideo 0 = no video compression, movievideo 1 = ffvfw= divx compression, 2 = Cinepak, and I can make 3 = xvid.

IIRC I think I had xvid working at one time and I discarded it since it would be 60 extra lines of the gibberish data embedded in the source code.

Agreed - I'll email you something tomorrow. The gibberish is annoying, but the cinepak codec is very old and while it works it is not known for producing good quality video.

Quote
Plain Jane text format with CR/LF between lines. Should it be Unix-style text with just CR?

That should be fine. I believe either should work. I now think this problem (2600's 1.5.10 not working, 1.6.2 working) may be more to do with the syntax error in the batch, so now it is changed may work fine.

On 2600's png comment - thanks for mentioning that, it appears that the new experimental build of Virtualdub can natively load a png sequence - point it at zoo00001.png and it will load all 3000 in the right order. While this promisingly suggests we could ditch Avisynth (we can tell virtualdub the frame rate, only open  the pngs starting from the frame we want etc...) we would then need to accuarately trim the audio to keep it in sync. I don't think Vdub can do this, although I will check - so we would need another util anyway.

@2600: png reading ability is actually irrelevant as long as we use avisynth - this creates the video stream and feeds it into Vdub, which has no idea that its a bunch of pictures. The error you had was not related to this.
Title: Re: MAME Movie Maker released
Post by: Silver on January 03, 2005, 10:53:59 pm
Ok, I was mistaken - it looks like we may be able to drop avisynth altogether, if we are happy using the experimental Vdub 1.6.2

I've made a vdub script and tested with zookeeper and it appears we can create a trimmed, synced avi file at a required frame rate just from the pngs and the wav using only virtualdub. Need to test it some more, and theres some calculations required - such as original frame rate in microseconds per frame - but should be ok.

If this works, apologies to Buddabing for talking him into using avisynth(!).

Note this will not speed things up. If anything, it would be fractionally slower as Vdub selects all the frames, but nothing noticeable.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 03, 2005, 11:39:14 pm
If what Silver is saying is true, it might be simplest for the end user for me to take the VirtualDub 1.6.2 source code and integrate it into MAME. Then I would autodetect what codecs the user has available and use whatever I judge to be the best one.

I've integrated source code packages into MAME before. I haven't tried compiling VirtualDub, so I don't know how easy it would be.

I may do some experimentation. Until then, I'll make the changes so that Vdub 1.5.10 will work.

Buddabing
Title: Re: MAME Movie Maker released
Post by: Minwah on January 04, 2005, 05:20:08 am
Mamewah - is your audio error only with 1.6.2?

Yes, but I couldn't get the other version to work at all...I'll try it with that different switch tonight.
Title: Re: MAME Movie Maker released
Post by: BuZz880 on January 04, 2005, 09:18:37 am
I sure like the new improved listgen utility.  With the help of a bat file I now have one button I can press to re-generate my gamelists in Mamewah format each time mame is updated.  In particular I like having a "newly added" list (catver_veradded like '%.8%' - including broken games and clones just to monitor what is coming) as well as a list of games that support more than 2 players, a list of trackball games and a list of lightgun games. 

I did encounter a couple bugs but was able to work around them.  I know this is a Movie Maker thread but thought I'd list them just in case you are interested - as I say I worked around them so I am unaffected.

I also know this version of listgen isn't intended as a standalone app but hey, if I can save some testing time I'm glad to help since I am not much on the compiling/programming side of things.

nplayers_category - does not seem to be recognized.   I get around this using gameplay.ini

gameplay_MNOP
gameplay_NOSP - these two seem to be reversed; not in gameplay.ini, but in how my sql is processed.  I don't really understand how that can be but if I use gameplay_MNOP > 2 I do not get track 'n field and others; but if I query on gameplay_NOSP > 2 I do get track and field even though this select is actually untrue for this game.

Thanks for the great app; so far I think it is working great.  I look forward to playing with the others.
Title: Re: MAME Movie Maker released
Post by: 2600 on January 04, 2005, 09:45:07 am
To jump in and clarify, I'm believe I am having the same exact problems as Minwah(Correct me where I am wrong Minwah).

1. Both of us are using AVIsynth 2.5.5
2. Both couldn't get virtualdub 1.5.10 to work with the script.
3. Both tried 1.6.2 works but no audio


1.5.10 even with the syntax change on the command line does not work.  Still get the sylia script error about setinputformat.  Attached is my .vdb file.
Manually within virtualdub I can open the .avs video file and set an audio file, but running the script manually I get the same script error.

Within 1.6.2 the script runs, but no audio.  I can manually add a wav, but it's not synced correctly.

Buddabing, my preference if it matters is to keep it seperate.  Just because I like having control, I prefer to choose whatever CODEC I want not have it chosen for me, and it's not diffecult to use now(Once we iron out the bugs).  Then again I'm not the type to complain about difficulty using frontends or mame. Oh, and adding xvid in would be nice, it's appeared to me to be a bit more compatible.

I think that is it, Sorry if I was vague or incoherent before, newborns and the first day back at work tend to do that to you.

Also, Buddabing I need to get back to you on my notes with CPMaker not using artwork.

Title: Re: MAME Movie Maker released
Post by: Minwah on January 04, 2005, 10:32:47 am
To jump in and clarify, I'm believe I am having the same exact problems as Minwah(Correct me where I am wrong Minwah).

1. Both of us are using AVIsynth 2.5.5
2. Both couldn't get virtualdub 1.5.10 to work with the script.
3. Both tried 1.6.2 works but no audio

<snip>

Within 1.6.2 the script runs, but no audio.  I can manually add a wav, but it's not synced correctly.

Yes that is correct :)  The only thing I didn't check was the sync-ing of the wav when manually adding it, but from what you say I suspect mine would be the same.
Title: Re: MAME Movie Maker released
Post by: 2600 on January 04, 2005, 10:47:57 am
Here's what I found:

If I commented out these lines in the .vdb script, then the script runs in 1.5.10.

// VirtualDub.video.SetInputFormat(0);
// VirtualDub.video.SetOutputFormat(7);

// VirtualDub.project.ClearTextInfo();


But there was still no audio.

So if I add the line audios.setsource, after opening the .avs file you get audio
VirtualDub.Open("1941.avs","",0);
VirtualDub.audio.SetSource("D:\\Mame\\89\\1941.wav"); //added

But it is not synced, so I changed the 0 to -16000 to the following line
VirtualDub.audio.SetInterleave(1,500,1,0,-16000);

It's not actuall synced for 1941, but it shows I moved the audio and  is closer.  Is this the right way to do things, probably not for that I leave it to Buddabing and Silver to see why there's worked and ours didn't.

Title: Re: MAME Movie Maker released
Post by: Buddabing on January 04, 2005, 10:54:53 am
If I comment out the SetInputFormat, SetOutputFormat, and ClearTextInfo lines from the VirtualDub script, the script will run with Vdub 1.5.10 but with no audio.

I would prefer that everyone migrate to Vdub 1.6.2, since I think we are spending too much time trying to get 1.5.10 to work.

I'll now look at different versions of AviSynth to see if some of them don't work right with Vdub 1.6.2.

I see 2600's post now. If you use the SetSource, then you need to take out the Trim() statement in the .avs file. Then you will be unable to trim off the part of the video which is not in the loop. SetSource() overrides AudioDub().

Buddabing
Title: Re: MAME Movie Maker released
Post by: Silver on January 04, 2005, 11:00:35 am
Here's what I found:

If I commented out these lines in the .vdb script, then the script runs in 1.5.10.

// VirtualDub.video.SetInputFormat(0);
// VirtualDub.video.SetOutputFormat(7);

// VirtualDub.project.ClearTextInfo();


But there was still no audio.

So if I add the line audios.setsource, after opening the .avs file you get audio
VirtualDub.Open("1941.avs","",0);
VirtualDub.audio.SetSource("D:\\Mame\\89\\1941.wav"); //added

But it is not synced, so I changed the 0 to -16000 to the following line
VirtualDub.audio.SetInterleave(1,500,1,0,-16000);



A quick note. If you have and avs file opened in the script, you do NOT want to refer to a wav file. The avs feeds trimmed, syced audio and video into virtualdub.

The problem lies in errors in the vdub script. I do not believe:

VirtualDub.video.SetInputFormat(0);
VirtualDub.video.SetOutputFormat(7);
VirtualDub.project.ClearTextInfo();

should be in the script.

Something like:

VirtualDub.audio.SetSource(1);
VirtualDub.audio.SetMode(1);
VirtualDub.audio.SetInterleave(1,500,1,0,0);
VirtualDub.audio.SetClipMode(1,1);
VirtualDub.audio.SetConversion(0,0,0,0,0);
VirtualDub.audio.SetVolume();
VirtualDub.audio.SetCompression(-whatever-)

should be all thats required to have good audio in 1.5.10

Although this may change for 1.6.2.

Will post with findings later!


Title: Re: MAME Movie Maker released
Post by: 2600 on January 04, 2005, 11:07:53 am
Yeah, I figured it's wrong what I was trying to show is that audio is not being fed in by the .avs file.  If you don't add the set source when it is processing you can see that it is not processing any audio.

I'll bow out now and let you two figure out the why.  Great work so far though.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 04, 2005, 11:35:57 am
I sure like the new improved listgen utility.
Title: Re: MAME Movie Maker released
Post by: Minwah on January 04, 2005, 11:55:13 am
Thank you for your bug report. I'm glad you use MAMEWah since that's pretty much the only frontend that works so far.

I've located and fixed your bugs, the next time I update the source code or executable to the movie maker, I'll also update the listgen utility.

What I like best about the program is the speed at which it works.

I haven't tried the ListGen for a good while...I will try the latest tonight, since I gather it now supports the MW output - should be pretty handy :)
Title: Re: MAME Movie Maker released
Post by: Silver on January 04, 2005, 01:16:29 pm
Another quick update - It looks like the "No audio" issue is in fact due to the Trim command in the avs file.

video1=ImageSource ("snap\zoo%05d.png", 0, 3245, 60.000000)
audio1=WavSource("zookeep.wav")
AudioDub(video1,audio1)
Trim(video1,509,0)

Produces no audio output, but:

video1=ImageSource ("snap\zoo%05d.png", 0, 3245, 60.000000)
audio1=WavSource("zookeep.wav")
AudioDub(video1,audio1)
Trim(509,0)

works just fine, with audio nice and synced.
Title: Re: MAME Movie Maker released
Post by: Minwah on January 04, 2005, 01:33:36 pm
video1=ImageSource ("snap\zoo%05d.png", 0, 3245, 60.000000)
audio1=WavSource("zookeep.wav")
AudioDub(video1,audio1)
Trim(509,0)

works just fine, with audio nice and synced.

I agree :)
Title: Re: MAME Movie Maker released
Post by: BuZz880 on January 04, 2005, 01:43:50 pm


What I like best about the program is the speed at which it works.


Absolutely, and this will be particularly nice if and when a FE developer or other developer chooses to integrate it for generation of on-the-fly lists.  Not that this couldn't be done as an external app - wouldn't it be cool if I could hit a button and quickly create a game list  that matches the category of the highlighted game?  Getting close with Minwah's new commandline [category] argument assuming it could be passed to listgen and a mame-99.lst could be updated by an external app with mamewah running for those times you really feel like playing Horse Racing games or something. 

For now though, once all the sql's are worked out speed is no longer an issue really since I only need to run it when MAME is updated.  In the past I was able to create the lists I wanted using catver.ini; the main MAMEWAH mame-0.lst and a hideous Excel spreadsheet to put the games I wanted into the MAMEWAH format - but the process was so cumbersome I had to basically relearn it everytime I went through so yours is a huge step in the right direction IMO; of course it helps that though I lack programming skills somewhere along the way I did develop competence with BAT files (my bat file renames stuff like trackball.sql and newadded.sql to filter.sql and then copies output.txt to my mamewah files directory as 1-mame-x.lst) and SQL and now I await a new MAME version just so I can update my gamelists ;)
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 04, 2005, 02:16:07 pm


What I like best about the program is the speed at which it works.


Absolutely, and this will be particularly nice if and when a FE developer or other developer chooses to integrate it for generation of on-the-fly lists.
Title: Re: MAME Movie Maker released
Post by: Silver on January 04, 2005, 03:14:37 pm
RE: Missile command ffvfw problem.

This is an error thrown up by the size of the video.

Missile command is 256x231. Lots of codecs seems to hate this - ffvfw, DivX, Xvid, Intel Indeo, Ligos.....

Its quite odd as 256x230 and 256x232 all work perfectly. It could be a Vdub issue although I doubt it as the error is returned by the codec. Again, easily solved by adding a video filter (resize to 256x230).


I would recommend people hang on for a short while on trying out the video generator. I'm going to email new script files to Buddabing which resolve all the issues so far mentioned, along with some other ones that have cropped up (different games spit out different Wavfiles - mono/stero and 11025Khz up to 44100Khz), remove the need for avisynth and add Xvid support.
Title: Re: MAME Movie Maker released
Post by: BuZz880 on January 04, 2005, 03:20:18 pm

You know you can specify the output file, it doesn't have to be output.txt?


Absolutely.

But since the only way I see to specify the name of the output file is within listgen.ini I would still end up having to maintain a bunch of listgen.ini files (one for each name) so I think the way I am doing it is easier.

Ideally something like:

listgen.exe -filter xxxxx.sql >mame-x.lst

would be nice.  If there were a way to throw a variable in there that would be even better.  Something like:

listgen -filter xxxxx.sql > mame-x.lst /v1 shooter

of course within my xxxx.sql I would then specify catver_category = v1 to be replaced by the variable.  I guess this is what you were trying to stay away from with the sql files in the first place but since the variable could be anything the user wants and applied to any category in any of the catver, nplayer or gameplay.ini files it doesn't violate your primary goal I think of making this app extremely flexible.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 04, 2005, 03:41:36 pm

You know you can specify the output file, it doesn't have to be output.txt?


Absolutely.

But since the only way I see to specify the name of the output file is within listgen.ini I would still end up having to maintain a bunch of listgen.ini files (one for each name) so I think the way I am doing it is easier.

Ideally something like:

listgen.exe -filter xxxxx.sql >mame-x.lst

would be nice.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 04, 2005, 03:46:15 pm
RE: Missile command ffvfw problem.

This is an error thrown up by the size of the video.

Missile command is 256x231. Lots of codecs seems to hate this - ffvfw, DivX, Xvid, Intel Indeo, Ligos.....

Its quite odd as 256x230 and 256x232 all work perfectly. It could be a Vdub issue although I doubt it as the error is returned by the codec. Again, easily solved by adding a video filter (resize to 256x230).


I would recommend people hang on for a short while on trying out the video generator. I'm going to email new script files to Buddabing which resolve all the issues so far mentioned, along with some other ones that have cropped up (different games spit out different Wavfiles - mono/stero and 11025Khz up to 44100Khz), remove the need for avisynth and add Xvid support.

The missile command problem is why I added the cinepak codec support.

I've added a -virtualdub option to MAME. 0 will be 1.6.2 and 1 will be 1.5.10. I tested it and it produces videos with audio for both versions of virtualdub.

MAME 0.90 has just been released so I get to port everything over to the new patch when this is done.

If you want to add stuff for stereo and various sampling rates that's fine, but it should be added to the Vdub script if at all possible, I don't want to add zillions of MAME options.

Title: Re: MAME Movie Maker released
Post by: Silver on January 04, 2005, 04:31:47 pm
If you want to add stuff for stereo and various sampling rates that's fine, but it should be added to the Vdub script if at all possible, I don't want to add zillions of MAME options.

Goodwork on the updates. I've just emailed you a new Vdub script that deals with the audio stuff and more. 

Note that if we go with this (dropping avisynth, using Vdub 1.6.2) you may want to ditch 1.5.10 as they are quite different now. 1.6.2 seems quite robust - I have so far been unable to break it.
Title: Re: MAME Movie Maker released
Post by: BuZz880 on January 05, 2005, 08:49:11 am
Ok, I ran Movie Maker last night using the same sql I used for my mamewah game lists.

Like others I did not manage to record any sound.

Overall I was impressed with the loop detection.  I was also surprised to learn how many games have useless attract modes but thats another story.

I am providing this info constructively; many of the games that failed sucked and should be removed from my selects anyway but I thought it might be worthwhile letting you know what I found.

The first batch was lightgun.  The others are still running because the process hung up on revx until this am; I don't think that was directly related to movie maker I think maybe revx.zip is corrupt but can't test it right now. 

Interestingly term2 (Midway like revx) recorded the same bios screen for 3 mins.

Other games that seem to stick on bios or other unchanging screens are:
gollygho
sgunner
sgunner2
showdown
sshooter
triplhunt
tshoot

None of the exidy lightgun games worked (ie stuck on bios screens) including:
claypign
combat
cracksht
crossbow
whodunit
chiller, etc.


The following had this error and no video:

IMAGEREADER: images must have identical heights; this error is seen in the avi itself.

cryptklr
carnevil

these are both CHD games so that must be related somehow.

Title: Re: MAME Movie Maker released
Post by: Silver on January 05, 2005, 10:25:12 am
As mentioned above, the No audio issue is known and resolved - but you'll need to wait for BuddaBing to release a new version.

Your loop detection info is interesting though.

Overall I was impressed with the loop detection.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 05, 2005, 12:41:45 pm
All-righty!

I've made some significant changes in this project which hopefully will simplify things somewhat.

1 - I've updated ListGen with the bugfixes and parameter addition from this thread. Besides MAMEWah, it also supports 3DArcade (not tested 100%). It also will generate plain text game lists, a list of rom names, and a batch file suitable for creating movies.

2 - AviSynth is no longer required.

3 - Support for VirtualDub version 1.5.x is now deprecated and will be removed. Please update to 1.6.2.

4 - Audio "works on my machine". Silver had given me some parameters for the VirtualDub script file for the audio, but they didn't work on my machine. We should look at tweaking it.

5 - The funky size of the Missile Command screen causing VirtualDub to abort has been addressed.

6 - XVID is now supported with -movievideo 3.

7 - There is no source code with this release, I will release source when I release version 0.90.

Try running Zookeeper as a test case, and please post back any problems.

Regards,
Buddabing
Title: Re: MAME Movie Maker released
Post by: BuZz880 on January 05, 2005, 05:43:12 pm
zookeep.avi for me comes to 246mb; I guess I'll look around the virtual dub docs and see what i'm doing wrong.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 05, 2005, 05:47:07 pm
zookeep.avi for me comes to 246mb; I guess I'll look around the virtual dub docs and see what i'm doing wrong.

That tells me your compression is turned off or not working. Try -movievideo 1 or 2.
Title: Re: MAME Movie Maker released
Post by: Silver on January 05, 2005, 06:04:34 pm
The default option in mame.ini is now movievideo 3. This selects XVID compression - so you will need to install the Xvid codec or choose one of the other codecs. If VirtualDub can not find the codec specified, it defaults to uncompressed - ie MASSIVE files. It will probably be only 2-3megs with Xvid.

Personally, I recommend using Xvid. Its open source and extremely high quality, and fast, IMHO.

You can download the codec for Windows here:

http://www.xvidmovies.com/codec/

Loads more Xvid info/source code here:

http://www.xvid.org/

Title: Re: MAME Movie Maker released
Post by: BuZz880 on January 05, 2005, 06:14:49 pm
The default option in mame.ini is now movievideo 3. This selects XVID compression - so you will need to install the Xvid codec or choose one of the other codecs. If VirtualDub can not find the codec specified, it defaults to uncompressed - ie MASSIVE files. It will probably be only 2-3megs with Xvid.

Personally, I recommend using Xvid. Its open source and extremely high quality, and fast, IMHO.

You can download the codec for Windows here:

http://www.xvidmovies.com/codec/

Loads more Xvid info/source code here:

http://www.xvid.org/



k, I get it now.  On movievideo 2 it comes down to 2.8 and looks/sounds great.  Trying with xVid now.
Title: Re: MAME Movie Maker released
Post by: sWampy on January 05, 2005, 08:00:12 pm
C:\mame>copy /Y dummyvdb.txt pacman.vdb
The system cannot find the file specified.


Where do I get a dummyvdb.txt, and do I need it?


When I run listgen, I end up with an empty listgen.tmp and results.tmp, and a makemovies.bat that looks like the one below.   I've changed all the ini's to point to the correct directories I think.

copy /Y controls.png controls00.png
copy /Y controls.png controls01.png
del controls00.png
del controls01.png


PS did this thing delete my snap directory?
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 05, 2005, 08:33:01 pm
C:\mame>copy /Y dummyvdb.txt pacman.vdb
The system cannot find the file specified.


Where do I get a dummyvdb.txt, and do I need it?


When I run listgen, I end up with an empty listgen.tmp and results.tmp, and a makemovies.bat that looks like the one below.   I've changed all the ini's to point to the correct directories I think.

copy /Y controls.png controls00.png
copy /Y controls.png controls01.png
del controls00.png
del controls01.png


I made the dummyvdb.txt so that the batch process doesn't stop if there is a problem loading the roms or creating the png snapshots. Either copy an existing .vdb file to dummyvdb.txt or delete those steps.

The same thing goes for the copy /Y controls.png. The dummy vdb file causes VirtualDub to make a two-frame movie from those two pngs.

It's not necessary at all.
Title: Re: MAME Movie Maker released
Post by: sWampy on January 05, 2005, 09:38:33 pm
If I turn on verbose mode, in listgen, I get what's below, but an almost empty makemovies.bat.  I get tons and tons of the rom name not found in rom trees.  listgen.tmp and result.tmp end up empty.


rom name bangbead not found in rom tree
rom name nitd not found in rom tree
rom name zupapa not found in rom tree
rom name sengoku3 not found in rom tree
Writing intermediate file listgen.tmp
Reading intermediate file into filter database
create temporary table gamedata (  romname varchar[12] unique primary key,  full_desc varchar[64],  stripped_desc varchar[64] key,  year varchar[4],  manufacturer varchar[80],  screen varchar[24],  orientation varchar[24],  color varchar[24],  status varchar[24],   sound varchar[24],   control varchar[36],  width integer,  height integer,   isclone integer,  aspectx integer,  aspecty integer,  players integer,  buttons integer,  coins integer,   sourcefile varchar[24],  cloneof varchar[12],  romof varchar[12],  catver_category varchar[48],  catver_veradded varchar[48],  nplayers_category varchar[32],  gameplay_category varchar[32],  gameplay_layout varchar[32],  gameplay_mnop integer,  gameplay_nosp integer,  refresh varchar[32],  channels varchar[8]  service varchar[8],  tilt varchar[8]  );
copy gamedata from 'listgen.tmp' using delimiters '|';
Filtering database into result.tmp
Writing game list to makemovies.bat
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 05, 2005, 09:55:57 pm
If I turn on verbose mode, in listgen, I get what's below, but an almost empty makemovies.bat.  I get tons and tons of the rom name not found in rom trees.  listgen.tmp and result.tmp end up empty.


rom name bangbead not found in rom tree
rom name nitd not found in rom tree
rom name zupapa not found in rom tree
rom name sengoku3 not found in rom tree
Writing intermediate file listgen.tmp
Reading intermediate file into filter database
create temporary table gamedata (  romname varchar[12] unique primary key,  full_desc varchar[64],  stripped_desc varchar[64] key,  year varchar[4],  manufacturer varchar[80],  screen varchar[24],  orientation varchar[24],  color varchar[24],  status varchar[24],   sound varchar[24],   control varchar[36],  width integer,  height integer,   isclone integer,  aspectx integer,  aspecty integer,  players integer,  buttons integer,  coins integer,   sourcefile varchar[24],  cloneof varchar[12],  romof varchar[12],  catver_category varchar[48],  catver_veradded varchar[48],  nplayers_category varchar[32],  gameplay_category varchar[32],  gameplay_layout varchar[32],  gameplay_mnop integer,  gameplay_nosp integer,  refresh varchar[32],  channels varchar[8]  service varchar[8],  tilt varchar[8]  );
copy gamedata from 'listgen.tmp' using delimiters '|';
Filtering database into result.tmp
Writing game list to makemovies.bat

Your listgen.ini needs to be edited so that it knows where MAME is and where your ROMS are.

Optionally, if ListGen knows where MAME is, you can change the audit_roms parameter to 0.
Title: Re: MAME Movie Maker released
Post by: sWampy on January 05, 2005, 11:07:49 pm
I've changed the paths for roms and mame in listgen.ini, and tried audit_roms 0 and 1.   I get the output below from listgen. 


Calling MAME to get version
MAME version is 0.890000
Calling MAME to build XML game info
Scanning XML game info
parse error, unexpected LT
Processing catver.ini
Processing nplayers.ini
Processing gameplay.ini
Writing intermediate file listgen.tmp
Reading intermediate file into filter database
Filtering database into result.tmp
Writing game list to makemovies.bat


Here is my listgen.ini

rompath c:\mame\roms
mamepath c:\mame
frontend moviebatch
verbose 0
silent 0
audit_roms 0
use_clones 1
unique 1
us_version_priority 0
world_version_priority 0
strip_description 1
japan_version_priority -1
reuse_listxml_data 1
output makemovies.bat


I've tried every combination of c:\mame\roms, c:\mame\roms\, .\roms, .\roms\  I could think of with no luck. ;-/
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 05, 2005, 11:34:13 pm
I've changed the paths for roms and mame in listgen.ini, and tried audit_roms 0 and 1.   I get the output below from listgen. 


Calling MAME to get version
MAME version is 0.890000
Calling MAME to build XML game info
Scanning XML game info
parse error, unexpected LT
Processing catver.ini
Processing nplayers.ini
Processing gameplay.ini
Writing intermediate file listgen.tmp
Reading intermediate file into filter database
Filtering database into result.tmp
Writing game list to makemovies.bat


Here is my listgen.ini

rompath c:\mame\roms
mamepath c:\mame
frontend moviebatch
verbose 0
silent 0
audit_roms 0
use_clones 1
unique 1
us_version_priority 0
world_version_priority 0
strip_description 1
japan_version_priority -1
reuse_listxml_data 1
output makemovies.bat


I've tried every combination of c:\mame\roms, c:\mame\roms\, .\roms, .\roms\  I could think of with no luck. ;-/

That's interesting.

What is the size of listxml.txt? I get 22,421,287 bytes.

What happens when you do a mame -listxml and compare the existing output to that?

Try doing a mame -listxml > listxml.txt, then running listgen again. This will create the listxml.txt separately, and you should get the 22 megabyte file. Make sure reuse_listxml_data is set to 1 in your listgen.ini.

I thought MAME always output 8-bit ASCII characters. Do you live in a place that doesn't have standard characters?

The "unexpected LT" is a parser error. The XML parser is getting a less than (LT) where it shouldn't.

Weird.


Title: Re: MAME Movie Maker released
Post by: Silver on January 06, 2005, 06:01:50 am
I know mame can ouput UTF-8 (or was it -16?) as I spent ages a few months back scratching my head why mame would produce 22meg xml on one pc but 28meg xml on another and it turned out to be the encoding. I'm trying to remember what the cause was.... I know one PC was Win2K the other XP, but don't think that was the difference....

Sorry not to be more helpful!
Title: Re: MAME Movie Maker released
Post by: sWampy on January 06, 2005, 07:20:25 am
01/05/2005  10:27 PM        38,273,304 listxml.txt

Wierd, I remember something now that you mention it about xp, and this is actually mce2005 default encoding as unicode from an xml class I took last year, I'll have to look through my notes to see how to change that, but that must be what's going on.  Or maybe there is a convertor.   Loading it in notepad and saving it as ascii didn't help. ;-/   Oh, well I have to run off to work, I'll play more tonight.

I've changed the paths for roms and mame in listgen.ini, and tried audit_roms 0 and 1.   I get the output below from listgen. 


Calling MAME to get version
MAME version is 0.890000
Calling MAME to build XML game info
Scanning XML game info
parse error, unexpected LT
Processing catver.ini
Processing nplayers.ini
Processing gameplay.ini
Writing intermediate file listgen.tmp
Reading intermediate file into filter database
Filtering database into result.tmp
Writing game list to makemovies.bat


Here is my listgen.ini

rompath c:\mame\roms
mamepath c:\mame
frontend moviebatch
verbose 0
silent 0
audit_roms 0
use_clones 1
unique 1
us_version_priority 0
world_version_priority 0
strip_description 1
japan_version_priority -1
reuse_listxml_data 1
output makemovies.bat


I've tried every combination of c:\mame\roms, c:\mame\roms\, .\roms, .\roms\  I could think of with no luck. ;-/

That's interesting.

What is the size of listxml.txt? I get 22,421,287 bytes.

What happens when you do a mame -listxml and compare the existing output to that?

Try doing a mame -listxml > listxml.txt, then running listgen again. This will create the listxml.txt separately, and you should get the 22 megabyte file. Make sure reuse_listxml_data is set to 1 in your listgen.ini.

I thought MAME always output 8-bit ASCII characters. Do you live in a place that doesn't have standard characters?

The "unexpected LT" is a parser error. The XML parser is getting a less than (LT) where it shouldn't.

Weird.



Title: Re: MAME Movie Maker released
Post by: Buddabing on January 06, 2005, 08:19:04 am
01/05/2005  10:27 PM        38,273,304 listxml.txt

Wierd, I remember something now that you mention it about xp, and this is actually mce2005 default encoding as unicode from an xml class I took last year, I'll have to look through my notes to see how to change that, but that must be what's going on.  Or maybe there is a convertor.   Loading it in notepad and saving it as ascii didn't help. ;-/   Oh, well I have to run off to work, I'll play more tonight.



Okay, post back the first few lines of the xml file.
Title: Re: MAME Movie Maker released
Post by: sWampy on January 06, 2005, 08:47:40 am
Well I'm at work on a windows xp service pack 2 machine, and get the same error, but the file created here is 37,219,827 bytes.   You can download the whole file at www.landoncrews.com/listxml.zip, but I'll post the first few lines below.  I don't know what a good one should look like, guess I'll have to find a win2k machine somewhere, or try in on one of my linux boxes.

<?xml version="1.0"?>
<!DOCTYPE mame [
<!ELEMENT mame (game+)>
   <!ELEMENT game (description, year?, manufacturer, history?, biosset*, rom*, disk*, sample*, chip*, video?, sound?, input?, dipswitch*, driver?)>
      <!ATTLIST game name CDATA #REQUIRED>
      <!ATTLIST game sourcefile CDATA #IMPLIED>
      <!ATTLIST game runnable (yes|no) "yes">
      <!ATTLIST game cloneof CDATA #IMPLIED>
      <!ATTLIST game romof CDATA #IMPLIED>
      <!ATTLIST game sampleof CDATA #IMPLIED>
      <!ELEMENT description (#PCDATA)>
      <!ELEMENT year (#PCDATA)>
      <!ELEMENT manufacturer (#PCDATA)>
      <!ELEMENT history (#PCDATA)>
      <!ELEMENT biosset EMPTY>
         <!ATTLIST biosset name CDATA #REQUIRED>
         <!ATTLIST biosset description CDATA #REQUIRED>
         <!ATTLIST biosset default (yes|no) "no">
      <!ELEMENT rom EMPTY>
         <!ATTLIST rom name CDATA #REQUIRED>
         <!ATTLIST rom bios CDATA #IMPLIED>
         <!ATTLIST rom size CDATA #REQUIRED>
         <!ATTLIST rom crc CDATA #IMPLIED>
         <!ATTLIST rom md5 CDATA #IMPLIED>
         <!ATTLIST rom sha1 CDATA #IMPLIED>
         <!ATTLIST rom merge CDATA #IMPLIED>
         <!ATTLIST rom region CDATA #IMPLIED>
         <!ATTLIST rom offset CDATA #IMPLIED>
         <!ATTLIST rom status (baddump|nodump|good) "good">
         <!ATTLIST rom dispose (yes|no) "no">
         <!ATTLIST rom soundonly (yes|no) "no">
      <!ELEMENT disk EMPTY>
         <!ATTLIST disk name CDATA #REQUIRED>
         <!ATTLIST disk md5 CDATA #IMPLIED>
         <!ATTLIST disk sha1 CDATA #IMPLIED>
         <!ATTLIST disk region CDATA #IMPLIED>
         <!ATTLIST disk index CDATA #IMPLIED>
      <!ELEMENT sample EMPTY>
         <!ATTLIST sample name CDATA #REQUIRED>
      <!ELEMENT chip EMPTY>
         <!ATTLIST chip name CDATA #REQUIRED>
         <!ATTLIST chip type (cpu|audio) #REQUIRED>
         <!ATTLIST chip soundonly (yes|no) "no">
         <!ATTLIST chip clock CDATA #IMPLIED>
      <!ELEMENT video EMPTY>
         <!ATTLIST video screen (raster|vector) #REQUIRED>
         <!ATTLIST video orientation (vertical|horizontal) #REQUIRED>
         <!ATTLIST video width CDATA #IMPLIED>
         <!ATTLIST video height CDATA #IMPLIED>
         <!ATTLIST video aspectx CDATA #IMPLIED>
         <!ATTLIST video aspecty CDATA #IMPLIED>
         <!ATTLIST video refresh CDATA #REQUIRED>
      <!ELEMENT sound EMPTY>
         <!ATTLIST sound channels CDATA #REQUIRED>
      <!ELEMENT input EMPTY>
         <!ATTLIST input service (yes|no) "no">
         <!ATTLIST input tilt (yes|no) "no">
         <!ATTLIST input players CDATA #REQUIRED>
         <!ATTLIST input control CDATA #IMPLIED>
         <!ATTLIST input buttons CDATA #IMPLIED>
         <!ATTLIST input coins CDATA #IMPLIED>
      <!ELEMENT dipswitch (dipvalue*)>
         <!ATTLIST dipswitch name CDATA #REQUIRED>
         <!ELEMENT dipvalue EMPTY>
            <!ATTLIST dipvalue name CDATA #REQUIRED>
            <!ATTLIST dipvalue default (yes|no) "no">
      <!ELEMENT driver EMPTY>
         <!ATTLIST driver status (good|imperfect|preliminary) #REQUIRED>
         <!ATTLIST driver emulation (good|imperfect|preliminary) #REQUIRED>
         <!ATTLIST driver color (good|imperfect|preliminary) #REQUIRED>
         <!ATTLIST driver sound (good|imperfect|preliminary) #REQUIRED>
         <!ATTLIST driver graphic (good|imperfect|preliminary) #REQUIRED>
         <!ATTLIST driver cocktail (good|imperfect|preliminary) #IMPLIED>
         <!ATTLIST driver protection (good|imperfect|preliminary) #IMPLIED>
         <!ATTLIST driver palettesize CDATA #REQUIRED>
]>

<mame>
   <game name="puckman" sourcefile="pacman.c">
      <description>PuckMan (Japan set 1)</description>
      <year>1980</year>
      <manufacturer>Namco</manufacturer>
Title: Re: MAME Movie Maker released
Post by: BuZz880 on January 06, 2005, 10:26:53 am
I am currently producing videos using xvid.  I do ocassionally get errors which hang up the process; most common are compression errors (-100) in visualdub.  I think I can get around this by re-running with moviemode 1 or 2 which I will try later but ideally it would be nice if there were a way to simply log which rom bombed and skip to the next one rather than creating an error which hangs until attended - it isn't a huge deal for those of us with cabs or dedicated machines it doesn't matter if it takes a little more effort but for some it would be nice just to come home and then re-run different parameters against the failed list (example: shufshot). 

On another note the exidy games I had problems with before *appear* to be working better now... ie. moviemaker waits until they get past the startup stuff and then records only the good parts.

Title: Re: MAME Movie Maker released
Post by: Silver on January 06, 2005, 12:27:57 pm
The (-100) errors are almost definately games that change resolution during the boot sequence. It often seems to be just the first 50 frames or so.

A workaround should be possible - either by detecting image sizes (can this be done in the png-saving part of mame?) or similar - the worst would be making of a list of games that do this and bodging. The tricky bit is making sure the sound stays in sync - but if we know the number of frames, again it can be done.

Could you post the games you have found that error out?

And is anyone familiar with mame source know about resolution changes? (In game info mame reports the current resolution, which changes dynamically as the game changes resolution. I'm figuring if you know the variable with resolution we can detect a change?

Title: Re: MAME Movie Maker released
Post by: BuZz880 on January 06, 2005, 01:11:48 pm
Could you post the games you have found that error out?


Just these so far but i'm still running my batch (works good, good speed too) and will let you know if any unexpected ones show up so far it just looks like a couple manufacturers to me as I have successfully made about 60 movies now out of the 200 or so in my batch (which is stiull running). 

term2, possibly revx as well but I need to fix the zip.
shufshot
capbowl
wcbowl
simpbowl
slither

cryptklr and carnevil too; I think ther error was not the -100 but it was related to different resoultions being used.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 06, 2005, 01:33:50 pm
Well I'm at work on a windows xp service pack 2 machine, and get the same error, but the file created here is 37,219,827 bytes.
Title: Re: MAME Movie Maker released
Post by: sWampy on January 06, 2005, 01:52:28 pm
That fixed it, had to move all the .dat files.   Now I just have to figure out your control panel program. ;-)
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 06, 2005, 01:58:07 pm
That fixed it, had to move all the .dat files.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 06, 2005, 02:03:08 pm
The (-100) errors are almost definately games that change resolution during the boot sequence. It often seems to be just the first 50 frames or so.

A workaround should be possible - either by detecting image sizes (can this be done in the png-saving part of mame?) or similar - the worst would be making of a list of games that do this and bodging. The tricky bit is making sure the sound stays in sync - but if we know the number of frames, again it can be done.

Could you post the games you have found that error out?

And is anyone familiar with mame source know about resolution changes? (In game info mame reports the current resolution, which changes dynamically as the game changes resolution. I'm figuring if you know the variable with resolution we can detect a change?



It is trivial (and cheap, time-wise) to detect a change in the dimensions of the png snapshots. What do you want to happen if the resolution changes during png generation?
Title: Re: MAME Movie Maker released
Post by: sWampy on January 06, 2005, 02:04:18 pm
Here is what I moved, I'll put them back one at a time if you need me to, I moved history.dat and it still errored, so I just moved the rest and it worked.   I already have a layout for cpviewer, yours just sounded cooler being in game.   


09/22/2004  07:29 PM            23,102 event.dat
09/22/2004  07:29 PM           156,291 hiscore.dat
09/22/2004  07:29 PM         2,637,139 history.dat
12/15/2004  03:07 PM        36,699,174 listinfo.dat
11/18/2004  10:59 AM        24,051,818 mame.dat
12/08/2004  01:40 AM         4,348,650 mameinfo.dat
12/15/2004  03:08 PM             8,350 verify.dat
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 06, 2005, 02:14:45 pm
Here is what I moved, I'll put them back one at a time if you need me to, I moved history.dat and it still errored, so I just moved the rest and it worked.
Title: Re: MAME Movie Maker released
Post by: sWampy on January 06, 2005, 02:25:09 pm
history.dat and mameinfo.dat cause it, the others don't.
Title: Re: MAME Movie Maker released
Post by: Silver on January 06, 2005, 05:02:10 pm
term2, possibly revx as well but I need to fix the zip.
shufshot
capbowl
wcbowl
simpbowl
slither

cryptklr and carnevil too; I think ther error was not the -100 but it was related to different resoultions being used.

Sorry - my post earlier I meant to say that the (-100) error is probably the weird resolution error - not changing resolution!

There is already a fix for this for another resolution. Exactly the same code should work here - so Buddabing just needs to add the resolution of these games to the list to be checked for...

We already know and check for
Title: Re: MAME Movie Maker released
Post by: Silver on January 06, 2005, 05:04:48 pm
It is trivial (and cheap, time-wise) to detect a change in the dimensions of the png snapshots. What do you want to happen if the resolution changes during png generation?

Well I'm 99% sure that these changes will only occur during boot, so we could simply only load the pngs after the resolution change in Vdub. (I think its eg. Addrange 50, lastframe - but I will check) But then we will have to add a fudge factor for the audio, trying to look at the easiest way of doing this.....
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 06, 2005, 05:15:39 pm
It is trivial (and cheap, time-wise) to detect a change in the dimensions of the png snapshots. What do you want to happen if the resolution changes during png generation?

Well I'm 99% sure that these changes will only occur during boot, so we could simply only load the pngs after the resolution change in Vdub. (I think its eg. Addrange 50, lastframe - but I will check) But then we will have to add a fudge factor for the audio, trying to look at the easiest way of doing this.....

I was thinking that if a change is detected, the program could copy the current png and overwrite all the previous pngs. That way, no audio fudge factor would be required.
Title: Re: MAME Movie Maker released
Post by: Silver on January 06, 2005, 05:35:37 pm
I was thinking that if a change is detected, the program could copy the current png and overwrite all the previous pngs. That way, no audio fudge factor would be required.

That would be perfect.
Title: Re: MAME Movie Maker released
Post by: sWampy on January 06, 2005, 06:27:46 pm
How about an option for a movies directory, so listgen can no not to add existing movies to the batchfile?
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 06, 2005, 06:41:13 pm
How about an option for a movies directory, so listgen can no not to add existing movies to the batchfile?

I would rather modify the makemovies.bat file:
if not exist foo.avi batch.bat foo 320x240, etc.

or I could modify batch.bat

if exist %1.avi exit (or whatever batch files do)

I'll make the change, I'm going to release new code tomorrow to cover the changes we discussed today.



Title: Re: MAME Movie Maker released
Post by: Silver on January 06, 2005, 07:18:50 pm
This is a bit of a not-that-important request, but I was wondering if there is any way on controlling a programs focus (at launch) from a Batch file?

i.e Ideally I'd like the batch to launch mame/virtualdub minimised so that I don't have windows popping up in the foreground as I'm working. I'm not sure this is possible from batch, it may require a program (I normally launch stuff minimised from VB)
Title: Re: MAME Movie Maker released
Post by: sWampy on January 06, 2005, 07:23:21 pm
How about an option for a movies directory, so listgen can no not to add existing movies to the batchfile?

I would rather modify the makemovies.bat file:
if not exist foo.avi batch.bat foo 320x240, etc.

or I could modify batch.bat

if exist %1.avi exit (or whatever batch files do)

I'll make the change, I'm going to release new code tomorrow to cover the changes we discussed today.


I had added it to the batch file, just figured at some point it might be better in the program that produced the batch files, where you could just edit one ini file, and also sometime listgen could get a feature that tracks driver changes, so if a drivers status changed from colors pelimanary to working, listgen could add it to the list, otherwise it would leave the existing one.  Would also be nice for new/improved game list  in frontends.
Title: Re: MAME Movie Maker released
Post by: Silver on January 06, 2005, 07:44:06 pm
Ok google answered it for me....

in the batch:

start /min /wait mame......
start /min /wait virtualdub.exe ......

seems to work nicely - nothing pops up (unless it errors) so it all happens in the background! If you wish you can set priority of each app too. Start /? for the full info.

NB in Vdub, you may have to open it manualy and de-select "show status window" in the options menu before use. It remembers this setting once set.....
Title: Re: MAME Movie Maker released
Post by: BuZz880 on January 06, 2005, 11:42:02 pm
I use:

if exist %1.avi goto filefound

in batch.bat with no problems whatsoever and I think its nice because it makes it easier for those using external apps/sources to make their own makemovies.bat

Title: Re: MAME Movie Maker released
Post by: Buddabing on January 07, 2005, 09:43:18 am
I was thinking that if a change is detected, the program could copy the current png and overwrite all the previous pngs. That way, no audio fudge factor would be required.

That would be perfect.

I would like to test this code. Are there any non-CHD games that have this issue? I don't think I have carnevil.chd, and I know I don't have the cryptklr rom.
Title: Re: MAME Movie Maker released
Post by: BuZz880 on January 07, 2005, 01:24:22 pm
try this one, i'll give you more later

qbtrkts
Title: Re: MAME Movie Maker released
Post by: BuZz880 on January 07, 2005, 02:02:47 pm
here's another that doesn't give the -100 error but complains something about the resolution of one png doesn't match the specified resolution.

shngmtk


These are others; some with the -100 error some with other errors that to me seemed related to resolution unfortunately I was only logging the rom name at that point and not the specific errors.  You will notice a few chd's on this list too.

teamqb
videopin
warlords
anteatg
caterplr
cbaj
griffon
hvnsgate
hyperdriv
psyforce
psyfrcex
raystorm
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 07, 2005, 03:01:57 pm
I've made a new release. Get it here (EDIT: removed link)
Here's what has changed:

- ESC stops MAME but still creates movie
- new batch.bat is quieter and does not recreate already existing movies
- ListGen now parses the listxml data if history.dat is present
- detect resolution change (I hacked in test code for testing)
- detect weird resolutions. I tested on missile, wcbowl, and capbowl.

Regards,
Buddabing
Title: Re: MAME Movie Maker released
Post by: Popcorrin on January 07, 2005, 03:25:33 pm
I would just like to say that mame moviemaker rocks!! :D
Thanks to Buddabing and all involved.
Title: Re: MAME Movie Maker released
Post by: Trimoor on January 07, 2005, 08:04:04 pm
I would just like to say that mame moviemaker rocks!! :D
Thanks to Buddabing and all involved.
I'm glad to see my efforts were appreciated. (Even if the only thing I did was come up with the idea :D)
Title: Re: MAME Movie Maker released
Post by: sWampy on January 08, 2005, 11:42:47 am
Something really strange is going on with my windows mce 2k5 machine, the ones encoded with xvid look washed out then played back.  The blacks are grey, and everything else looks washed out.  Should I need anything for proper playback other than the xvid codec from xvid.org?   Other than that, I'm up to encoding D's.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 08, 2005, 12:03:34 pm
Something really strange is going on with my windows mce 2k5 machine, the ones encoded with xvid look washed out then played back.  The blacks are grey, and everything else looks washed out.  Should I need anything for proper playback other than the xvid codec from xvid.org?   Other than that, I'm up to encoding D's.

Unforrtunately, I don't have a clue, Silver will have to answer that. All I can suggest is to try one of the other supported codecs, Divx (-movievideo 1) or Cvid (-movievideo 2)
Title: Re: MAME Movie Maker released
Post by: sWampy on January 08, 2005, 12:15:16 pm
Unforrtunately, I don't have a clue, Silver will have to answer that. All I can suggest is to try one of the other supported codecs, Divx (-movievideo 1) or Cvid (-movievideo 2)


The other codecs play fine, it's so strange, I was hoping someone would have seen it before.  The xvid ones play fine on other computers.   I've tried reinstalling media player 10, xvid, video card drivers (nvidia geforce 5600). 
Title: Re: MAME Movie Maker released
Post by: BuZz880 on January 08, 2005, 12:24:38 pm
Not sure how close to 100% you guys want to get this thing it definitely works very well as-is.

Keep in mind my list that I am working with for testing so far includes only lightgun games, trackball games, games newly added since .80 and games that support 3 or more players plus a few stragglers that wouldn't be there if I tightened up the sql a bit.  Next phase I will be trying to do my favorites list and some of the more popular games. 


That said, I still get the -100 error on these:
anteatg
caterplr
griffon
qbtrktst
vaportrx
slither
teamqb
videopin
warlords

and a couple minutes of blank screen but full sound with these:
cbaj
shngmtkb (this is mahjong or something so i doubt anyone will care too much)

Title: Re: MAME Movie Maker released
Post by: BuZz880 on January 09, 2005, 02:03:56 am
Far less likely to get the above mentioned errors on movievideo 2 rather than 3 though this about doubles the file sizes.
Title: Re: MAME Movie Maker released
Post by: Silver on January 09, 2005, 05:57:46 am
The other codecs play fine, it's so strange, I was hoping someone would have seen it before.  The xvid ones play fine on other computers.   I've tried reinstalling media player 10, xvid, video card drivers (nvidia geforce 5600). 

If the xvid avis made on YOUR computer playback fine on someone elses computer - then obviously they are being made correctly, then it is a playback issue:

1) Check the colour depth of your desktop - try setting it to 32bit if it is lower. It sounds like you do not have enough colours available to playback.

2) Open the Xvid Decoder options (should be in start menu after installing Xvid) and make sure Film effect is off (although should not look like you are saying)

3) Goto display properties and turn off hardware acceleration, then try playback.

If none of the above work, or avis made on your pc do NOT play back fine on ANOTHER pc, then open the XVID encoder options and click on "set defaults" and try again. The code includded in the Vdub script should actually override these anyway, but its possible we missed something.
Title: Re: MAME Movie Maker released
Post by: Silver on January 09, 2005, 06:00:22 am
That said, I still get the -100 error on these:
anteatg
caterplr
griffon
qbtrktst
vaportrx
slither
teamqb
videopin
warlords

and a couple minutes of blank screen but full sound with these:
cbaj
shngmtkb (this is mahjong or something so i doubt anyone will care too much)

I'll look into these. Annoyingly sounds like another weird resolution that will need to be added to the workaround.
Title: Re: MAME Movie Maker released
Post by: Silver on January 09, 2005, 09:03:35 am
That said, I still get the -100 error on these:
anteatg
caterplr
griffon
qbtrktst
vaportrx
slither
teamqb
videopin
warlords

and a couple minutes of blank screen but full sound with these:
cbaj
shngmtkb (this is mahjong or something so i doubt anyone will care too much)

@BuZz880
All of these - apart from vaportrx - work perfectly 1st time for me using Buddabings most recent, a few posts up. Try opening virtualdub, opening the Xvid video compression, clicking on Set defaults and then retrying...

If they still don't work, post with more info here - or even zip all the pngs for a game that does not work - along with the .vdb file - and email them to me: Silver@silverfoxy.plus.com

VaporTrx is a resolution problem.

@Buddabing
 VaporTrx creates PNGs at 511x256. The 'capbowl' fix will work for this one.

On this note (geeky tech bit coming up) - the odd-resolution error is to do with MPEG4 compression (not just Xvid) and due to Macroblock pixel sizes. Xvid appears to 'deal' with sizes down to 2x2, which basically means it does not seem to like resolutions that are not divisible by 2 (all the ones that fail so far have an odd number of pixels in x or y, and the fix supplied simply knocks one pixel off x or y to make it even.) I'd like to test this more, but you may prefer to simply check for an Even number of pixels and adjust if they are odd - this would future-proof the fix I believe.

If that does not make sense, I'll supply more info and examples.....
Note you have to go by the size of png. Vaportrx reports that it is 512x400 size, but the pngs are all 511x256......
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 09, 2005, 10:00:11 am
That said, I still get the -100 error on these:
anteatg
caterplr
griffon
qbtrktst
vaportrx
slither
teamqb
videopin
warlords

and a couple minutes of blank screen but full sound with these:
cbaj
shngmtkb (this is mahjong or something so i doubt anyone will care too much)

@BuZz880
All of these - apart from vaportrx - work perfectly 1st time for me using Buddabings most recent, a few posts up. Try opening virtualdub, opening the Xvid video compression, clicking on Set defaults and then retrying...

If they still don't work, post with more info here - or even zip all the pngs for a game that does not work - along with the .vdb file - and email them to me: Silver@silverfoxy.plus.com

VaporTrx is a resolution problem.

@Buddabing
 VaporTrx creates PNGs at 511x256. The 'capbowl' fix will work for this one.

On this note (geeky tech bit coming up) - the odd-resolution error is to do with MPEG4 compression (not just Xvid) and due to Macroblock pixel sizes. Xvid appears to 'deal' with sizes down to 2x2, which basically means it does not seem to like resolutions that are not divisible by 2 (all the ones that fail so far have an odd number of pixels in x or y, and the fix supplied simply knocks one pixel off x or y to make it even.) I'd like to test this more, but you may prefer to simply check for an Even number of pixels and adjust if they are odd - this would future-proof the fix I believe.

If that does not make sense, I'll supply more info and examples.....
Note you have to go by the size of png. Vaportrx reports that it is 512x400 size, but the pngs are all 511x256......


I think it makes better sense to chop 1 pixel off the odd-sized pngs. I'll do that.
Title: Re: MAME Movie Maker released
Post by: BuZz880 on January 09, 2005, 10:16:56 am
Thanks Silver resetting my desktop size and color depth appears to have moved me past the recent rash of -100 errors I was getting.  I'll go back and retry the above games later but I think those were a different issue.  My desktop resolution/color depth changed after I was playing some games last night and I didn't realize it mattered but the above listed problems ocurred under normal desktop settings I think.

Title: Re: MAME Movie Maker released
Post by: Popcorrin on January 10, 2005, 11:31:12 pm
I was trying to edit the batch.bat file so that the videos get saved in a separate directory rather than the mame root directory.  I was wondering if someone could help me out with the changes I need to make.  Thanks!
Title: Re: MAME Movie Maker released
Post by: Silver on January 11, 2005, 12:00:32 am
The avi destination is actually set in the *.vdb files that Buddabing's Mame creates, not the bat. I presume he just fills in the current mame dir as destination directory.

The easiest solution will be for you to add this line to the batch file, say after the '@del snap\*.png' line:

@move /Y %1.avi c:\mame\attractmovies

Obviously put your desired directory as desired. Note that you will have to create the directory manually first. The /Y option will overwrite any existing avi file, so I suggest you also alter the 1st line of the batch so that:

@if exist %1.avi goto end

becomes

@if exist c:\mame\attractmovies\%1.avi goto end

This will skip the creation if you have already made some avis.
Title: Re: MAME Movie Maker released
Post by: BuZz880 on January 11, 2005, 12:03:45 am
Last line in batch.bat (before :end) should be:
move *.AVI c:\destination path\

try that.
Title: Re: MAME Movie Maker released
Post by: sWampy on January 11, 2005, 08:45:22 am
If the xvid avis made on YOUR computer playback fine on someone elses computer - then obviously they are being made correctly, then it is a playback issue:

1) Check the colour depth of your desktop - try setting it to 32bit if it is lower. It sounds like you do not have enough colours available to playback.

2) Open the Xvid Decoder options (should be in start menu after installing Xvid) and make sure Film effect is off (although should not look like you are saying)

3) Goto display properties and turn off hardware acceleration, then try playback.

If none of the above work, or avis made on your pc do NOT play back fine on ANOTHER pc, then open the XVID encoder options and click on "set defaults" and try again. The code includded in the Vdub script should actually override these anyway, but its possible we missed something.

Turned out to be the nvidia drivers, updated to latest beta version and problem went away.  There was some strange thing where the release version thought I had both interfaces of the dual head card hooked up, and even though the driver was set to 32 bit color, it seemed to really only display 16bit color. ;-/
Title: Re: MAME Movie Maker released
Post by: Popcorrin on January 11, 2005, 10:05:53 am
Thanks for the batchfile guidance. ;)
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 11, 2005, 10:56:27 am
January 11, 2005

Hello,

I've made a couple of minor changes in my MAME movie maker build and in my ListGen utility.

The latest zip file is available here (EDIT: removed link)

Movie Maker:
- removed the -virtualdub option
- changed the default skip_warnings to 0
- added code to detect all odd screen sizes on movies and correct them
- changed the default batch.bat to create a 'movies' subdirectory and move created movie files into it.

ListGen:
- attempted to improve MAMEWah list generation by better conforming to MAMEWah's case standards.

Please post any VirtualDub errors to this thread. I really want this program to be able to generate some kind of movie on all games.
Title: Re: MAME Movie Maker released
Post by: BuZz880 on January 11, 2005, 04:05:41 pm
A couple observations:

- Movie Maker seems to be progressing better than before... it is running against the list of problems I had before .. i'll keep you posted.  Using XVID (Videomode 3) the only problem I have had so far is with altbeast, maybe someone can test theirs to see if its just mine?

- Listgen, I notice the controllers/inputs are still different than Mamewah and no Catver Category flag appears in the output.  I assume you knew this but just in case I thought I'd mention.

Title: Re: MAME Movie Maker released
Post by: Buddabing on January 11, 2005, 04:55:04 pm
A couple observations:

- Movie Maker seems to be progressing better than before... it is running against the list of problems I had before .. i'll keep you posted.
Title: Re: MAME Movie Maker released
Post by: 2600 on January 11, 2005, 05:00:14 pm
A couple observations:

- Movie Maker seems to be progressing better than before... it is running against the list of problems I had before .. i'll keep you posted.  Using XVID (Videomode 3) the only problem I have had so far is with altbeast, maybe someone can test theirs to see if its just mine?


Have you made sure you can run altbeast from the command line.  Roms were recently changed and I know I can't until I get an updated set.  I ran altbeas2 instead for the attract mode and it made it fine.
Title: Re: MAME Movie Maker released
Post by: BuZz880 on January 11, 2005, 05:08:02 pm
I noticed no change in lightgun vs Light Gun in Mamewah; stuff like tat.

As for the category; listgen omits the last line (category):  I am not sure what is going on with the status either.  I believe I have all my ini's in the right place.

from mame-0.lst
GALAGA
Galaga (Namco rev. B)
1981
Namco


Raster
Vertical
8-Way Joystick
Status Preliminary
Color Preliminary
Sound Preliminary
Shooter / Gallery

from listgen
GALAGA
Galaga
1981
Namco


Raster
Vertical
8-way Joystick
Status Imperfect
Color Good
Sound Good

Title: Re: MAME Movie Maker released
Post by: Buddabing on January 11, 2005, 06:03:16 pm
I noticed no change in lightgun vs Light Gun in Mamewah; stuff like tat.

As for the category; listgen omits the last line (category):
Title: Re: MAME Movie Maker released
Post by: BuZz880 on January 11, 2005, 06:20:35 pm
That's what I'm talking about!  Looks perfect from here; when i'm home later I'll run it through the gears with my on-the-fly list generation bat.

AS for Moviem it has now made 16 videos of some sort successfully with only one that didn't work which as has been pointed out here may well be a rom problem (altbeast).  If you consider all of these were games that failed with the last version, I'd say you have really improved it today.

Title: Re: MAME Movie Maker released
Post by: Rocky on January 11, 2005, 06:28:07 pm
I just stumbled upon this thread and software.
Title: Re: MAME Movie Maker released
Post by: Silver on January 11, 2005, 06:34:43 pm
My only problem is that I don't know how to alter the listgen program and it's trying to make videos for roms I don't have (using .71)

Open the listgen.ini file, and set audit roms to 1 not 0. This will create a batch that will only do videos of roms you have.


On a more general note, you will get a virtualdub error "file not found" if mame was unable to run the game.  (ie no romset, or some roms not found etc....). If you have a problem like that, run "mame romname" to see if you can play the game normally. This will help by weeding out problems that are not to do with the moviemaking process.

Buddabing, you may be able to trap the mame error returned, to skip virtualdub if there was not successful movie pass. The simplist way may be for another If exist... line on the vdb file??? Or  you may think this is overkill.



Title: Re: MAME Movie Maker released
Post by: Buddabing on January 11, 2005, 06:34:55 pm
I just stumbled upon this thread and software.  Wow, this is great  :D

It's making a bunch of videos for me now  8)

My only problem is that I don't know how to alter the listgen program and it's trying to make videos for roms I don't have (using .71)

Anyway, good work you guys.



Change the audit_roms flag in your listgen.ini to 1.

I'm glad you are finding this utility useful.

Regards,
Buddabing
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 11, 2005, 06:39:24 pm
My only problem is that I don't know how to alter the listgen program and it's trying to make videos for roms I don't have (using .71)

Open the listgen.ini file, and set audit roms to 1 not 0. This will create a batch that will only do videos of roms you have.


On a more general note, you will get a virtualdub error "file not found" if mame was unable to run the game.  (ie no romset, or some roms not found etc....). If you have a problem like that, run "mame romname" to see if you can play the game normally. This will help by weeding out problems that are not to do with the moviemaking process.

Buddabing, you may be able to trap the mame error returned, to skip virtualdub if there was not successful movie pass. The simplist way may be for another If exist... line on the vdb file??? Or  you may think this is overkill.





That's what I was trying to do with the dummy vdb file. If there is a del /Y %1.vdb at the beginning of batch.bat, I could put in if not exist %1.vdb goto end.

The goal is to get something that will run overnight without having to press enter all the time.

Title: Re: MAME Movie Maker released
Post by: Silver on January 11, 2005, 06:55:49 pm
That would work. Do you need a del /Y %1.vdb at the start if you already have one at then? So long as people are using the batch, there will not be a %1.vdb.

so If exist %1.vdb goto end, right after the mame line should jump any errors....

An alternative solution, is that that we are currently executing a script file in virtualdub, which pops up dialog boxes for errors. The alternative would be to use the "jobs" file in virtualdub - so we create a jobs file (Virtualdub.jobs) which is essentially almost exactly the same as the script, and tell virtualdub to run it: virtualdub / r /x  In this mode virtualdub will write all errors to a log instead. I'll try and see if this has any other impact.
Title: Re: MAME Movie Maker released
Post by: sWampy on January 11, 2005, 07:12:23 pm
Should we start looking at modifing the batch file to check the size of the video and get rid of super big ones that most likely didn't work, and super tiny ones that didn't work and have it auto retry them with different paramaters, or is that beyond the scope you wanted for this?
Title: Re: MAME Movie Maker released
Post by: Silver on January 11, 2005, 07:16:34 pm
@Buddabing

Well you could change to the "job-running" mode of virtualdub using the script file you have now, although you would have to re-introduce all the line beginning with "\\" that you don't need for script execution.

I think a batch solution might be more workable, and allow people to opt-out of it should they wish to be alerted to errors.

Vid encoding:

I've found another (could this be the last?) encoding issue - what I had hoped that games wouldn't do, does - they change resolution on the fly.

The only game I have that does this is 'cbaj'. Its one of this ones that changes resolution during start up, but it seems to do it later on in the attract mode too. The attract for this game goes: show a white animated logo, a demo game, the white logo again,  demo game with onscreen instructions.

This white logo seems to be a different resolution to the rest, so when it hits a second time all the previous pngs are blanked (takes a while - I thought it had crashed), and you end up with a minute of black, then a nice vid of the demo game.

You would get a nice attract video in this game by simply quitting on the 2nd resolution change (you still have a demo game to watch).
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 11, 2005, 07:22:04 pm
Should we start looking at modifing the batch file to check the size of the video and get rid of super big ones that most likely didn't work, and super tiny ones that didn't work and have it auto retry them with different paramaters, or is that beyond the scope you wanted for this?

well, at the end you can do a dir /os *.avi and it'll sort them by size. Then you can rerun makemovies.bat with just the biggest and smallest. You may also want to tweak the movie length parameters. Right now I just want to get a clean, unattended run complete. I made the batch.bat change to not run the Vdub if the .vdb file doesn't exist, and so far it's okay, up to "alcon".

Actually, it might be best to first run makemovies.bat once with a very small movie size. That way, you should be able to get rid of the games that you have to run, then reset, in order to get to work (ie defender).
Title: Re: MAME Movie Maker released
Post by: Silver on January 11, 2005, 07:23:07 pm
Should we start looking at modifing the batch file to check the size of the video and get rid of super big ones that most likely didn't work, and super tiny ones that didn't work and have it auto retry them with different paramaters, or is that beyond the scope you wanted for this?

Assuming by superbig you mean several hundred megs, then this will only happen if you have not installed the video codec you are trying to use. If this works for 1 game, it should work for all assuming you stick to the same codec. I believe all known issues causing people to switch codecs are currently resolved in Buddabings latest release.

As for super small - could you supply an example? The only thing I can think of here is that a game is stuck on a calibration screen because it has not been run before and the static screen is used as the loop?
Title: Re: MAME Movie Maker released
Post by: Silver on January 11, 2005, 07:25:53 pm
so far it's okay, up to "alcon".

What happens with alcon? is that an error or just where you happen to be up to?
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 11, 2005, 08:08:33 pm
so far it's okay, up to "alcon".

What happens with alcon? is that an error or just where you happen to be up to?

That's just what I was up to. I had to go back and delete everything since I don't have divx on the machine I'm generating the videos on. So I'm going to encode with -movievideo 2. I'll switch to -movievideo 1 later on just to make sure that works consistently.
Title: Re: MAME Movie Maker released
Post by: Rocky on January 11, 2005, 11:10:04 pm
My only problem is that I don't know how to alter the listgen program and it's trying to make videos for roms I don't have (using .71)

Open the listgen.ini file, and set audit roms to 1 not 0. This will create a batch that will only do videos of roms you have.


On a more general note, you will get a virtualdub error "file not found" if mame was unable to run the game.
Title: Re: MAME Movie Maker released
Post by: Silver on January 11, 2005, 11:31:17 pm
I really should just compile my own version of .71  Will your patch work with older versions of MAME?

I think Buddabing was planning to release the source for his patch once its running smoothly on Mame 0.90 (the exe's he is currently releasing are based 0.89) so you may be able to take a look then.

At a guess I'd say the mame version would have to have the code for png and wav creation. I don't know when these features were added.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 12, 2005, 12:07:29 am
I really should just compile my own version of .71  Will your patch work with older versions of MAME?

I think Buddabing was planning to release the source for his patch once its running smoothly on Mame 0.90 (the exe's he is currently releasing are based 0.89) so you may be able to take a look then.

At a guess I'd say the mame version would have to have the code for png and wav creation. I don't know when these features were added.

-wavwrite was added in v0.84. Don't know about the png screen shots. It was in there as of v0.55.

Once I make the source available, it should be very easy to port it to any version. If the version is earlier than v0.84, I can add something to null out the sound input. Of course, the mame.ini would have to be changed.

The actual changing of the MAME code for this utility is in four main places:
mame.h - defining storage for the moviemaker options, such as -makemovie, -movievideo, etc.
windows\config.c - adding the definitions of the options
usrintrf.c - slight change to the screen shot code
common.c - creating the screen shots, detecting the loop, and so on. This could be moved to a separate file for portability.

I am having some problems with my porting everything to v0.90. I'll probably end up releasing the entire source I used for v0.89, not in patch form.

Title: Re: MAME Movie Maker released
Post by: 2600 on January 12, 2005, 08:23:41 am
Budda,
 Just curious but what kind of problems are you having with the porting.  I looked at your source the first go round and it didn't seem exotic.  And I didn't thing too much changed in .90 besides the tool chain for compiling.

Anyways just curious.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 12, 2005, 08:31:39 am
Budda,
 Just curious but what kind of problems are you having with the porting.  I looked at your source the first go round and it didn't seem exotic.  And I didn't thing too much changed in .90 besides the tool chain for compiling.

Anyways just curious.

I am trying to get a new version of the ImageMagick libraries to work. I may end of blowing that off.
Title: Re: MAME Movie Maker released
Post by: Silver on January 12, 2005, 07:44:16 pm
Does mame use ImageMagick internally?

and whats the advantage of newer versions? Just curious.

By the way I'm having lots of success encoding now - havn't hit a hitch in ages.....(although no doubt I'll regret saying that.....)
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on January 12, 2005, 07:44:59 pm
Wow, I go away for the holidays and now I have to play catch up.
It's a long thread, and while I intend to go through it all, I want to make sure that I get the jest of it:

Buddabing made an add-on patch to MAME that automatically detects the start and stop of the attract loop in MAME games and captures the video to automagically generate attract movies through some kind of automated batch process, is that right?
- do you have a choice of size and codec for the video? I have a large harddrive and I'd like to get fairly large and detailed videos to replace the postage stamps ones that were in the torrent that was made available a while back.
- does it capture sound at the same time? I'd like to have sound in my attract videos. volume would need to be normalized between the different videos.

Title: Re: MAME Movie Maker released
Post by: Silver on January 12, 2005, 08:04:40 pm
Buddabing made an add-on patch to MAME that automatically detects the start and stop of the attract loop in MAME games and captures the video to automagically generate attract movies through some kind of automated batch process, is that right?

Basically, yes.

Quote
- do you have a choice of size and codec for the video? I have a large harddrive and I'd like to get fairly large and detailed videos to replace the postage stamps ones that were in the torrent that was made available a while back.

There is a limited choice of codec at present, set by the movievideo option. 0 is uncompressed RGB, 1 is cinepak, 2 is Xvid. The resolution is simply the exact resolution of the game. You do not have control of the codec settings (although you could modify the patch when Buddabing releases the source).

The Xvid settings are reasonably generous, and I find that I can play back movies fullscreen and they look good.

Quote
- does it capture sound at the same time? I'd like to have sound in my attract videos. volume would need to be normalized between the different videos.

It captures sound corectly synced to the video, and is in the avi either as uncompressed (movieaudio 0) or mp3 (movievideo 1).  At the moment there is no normalising - I have not noticed much of a levels issue between movies, but I've not been looking (hearing). Adding a normalise type option would be trivial if required.

I find using Xvid/mp3 creates higher quality attract videos than any on the web (I am not talking about the crashtest MNG attracts though, as I these are basically lossless)
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 12, 2005, 09:07:12 pm
Does mame use ImageMagick internally?

and whats the advantage of newer versions? Just curious.

By the way I'm having lots of success encoding now - havn't hit a hitch in ages.....(although no doubt I'll regret saying that.....)


My CPMaker code uses ImageMagick calls. There was a call in there that I used that was added in the last revision. I decided the extra effort getting the new revision to work wasn't worth it anyway.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 12, 2005, 09:14:54 pm
Buddabing made an add-on patch to MAME that automatically detects the start and stop of the attract loop in MAME games and captures the video to automagically generate attract movies through some kind of automated batch process, is that right?

Basically, yes.

Quote
- do you have a choice of size and codec for the video? I have a large harddrive and I'd like to get fairly large and detailed videos to replace the postage stamps ones that were in the torrent that was made available a while back.

There is a limited choice of codec at present, set by the movievideo option. 0 is uncompressed RGB, 1 is cinepak, 2 is Xvid. The resolution is simply the exact resolution of the game. You do not have control of the codec settings (although you could modify the patch when Buddabing releases the source).

The Xvid settings are reasonably generous, and I find that I can play back movies fullscreen and they look good.

Quote
- does it capture sound at the same time? I'd like to have sound in my attract videos. volume would need to be normalized between the different videos.

It captures sound corectly synced to the video, and is in the avi either as uncompressed (movieaudio 0) or mp3 (movievideo 1).  At the moment there is no normalising - I have not noticed much of a levels issue between movies, but I've not been looking (hearing). Adding a normalise type option would be trivial if required.

I find using Xvid/mp3 creates higher quality attract videos than any on the web (I am not talking about the crashtest MNG attracts though, as I these are basically lossless)


FYI -movievideo 0 is uncompressed AVI, -movievideo 1 is DivX, -movievideo 2 is Cinepak, and -movievideo 3 is Xvid.

If there is interest we probably could probably create a script to make mngs instead of avis.

I'm running a batch file now to create all the avis with -movievideo 2. It's done 200+ so far. Disk space is averaging 12 meg each thus far. XVid was taking a bit less space IIRC.
Title: Re: MAME Movie Maker released
Post by: BuZz880 on January 13, 2005, 12:25:31 am
I have made 578 videos which total 2.24GB using Xvid.  I obviously have not been through them all; I know they are all successful but presumably a couple are just bios screens or something like that.

About 200 were from my favorites list; the remainder were a) lightgun games, b) trackball games c) 4 player games and d) newly added games (v.80 or better), only the new adds and a few favorites were clones.

The largest is toobin at 103.5MB
The smallest is gunfight at 107kb

There are 187 under 1MB in size.  There are 59 over 10MB.  I have not seen any but the smallest ones that are not good .. ie stuck on a bios screen or lousy intros with nothing more than a high score screen.  The latest version of Movie maker hammered through my list of failures on previous versions almost flawlessly and I think created a better product... better loop detection.

I have no plans of making anymore. 

Title: Re: MAME Movie Maker released
Post by: Howard_Casto on January 13, 2005, 05:25:12 am
I noticed someone mentioned making the videos better quality...  while my personal collection is of a higher quality than the 3d arcade ones, I was aware of what my video card can handle. 

Keep in mind that video frames in any of the hardware accelerated front ends are treated as textures.  This means, unless your video card is good, the fe will choke if the vids are larger than 255 by 255. (actualy 256 by 256, but directx has this odd 1 pixel offset error so 255 is best) 

The compression isn't so important, but the size is.  Just keep that in mind. 

Also a question..... are the vids being captured in a square ratio?  It nearly doubles the efficiency upon playback if they are.  It's not a necessary step, but again, if your video card is older, doing so will greatly help speed.

Anyway... keep up the good work and be sure to let us know when it's ported to .90

Title: Re: MAME Movie Maker released
Post by: Silver on January 13, 2005, 06:18:34 am

Keep in mind that video frames in any of the hardware accelerated front ends are treated as textures.  This means, unless your video card is good, the fe will choke if the vids are larger than 255 by 255. (actualy 256 by 256, but directx has this odd 1 pixel offset error so 255 is best) 

Are you talking about particular FEs? I've tried mamewah and it plays odd sized videos - 512x384, toobin for example, fine. (obviously shrunk to fit)

Quote
Also a question..... are the vids being captured in a square ratio?  It nearly doubles the efficiency upon playback if they are.  It's not a necessary step, but again, if your video card is older, doing so will greatly help speed.

Currently everything is made at the resolution of the game in mame(ie the resolution of the generated pngs). There is a fix to insure the resolutions x and y are divisible by 2 as most codecs prefer this.
By square ratio do you mean of  1:1 for x and y (ie don't keep aspect of the game) or do you mean something like keeping each resolution a multiple of 16? (that I know a lot of MPEG based codecs are much more effecient at)

Title: Re: MAME Movie Maker released
Post by: sWampy on January 13, 2005, 08:34:48 am
I did all the neogeo games last night, and they all seemed to work perfectly, except for the first few frames of a lot of them were the wiered green graphics screen from the bootup.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 13, 2005, 12:38:31 pm
I am satisfied with the stability of this utility. It's run for two days with no problems.

I have ported my build of MAME - it doesn't have a name per se -
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 13, 2005, 02:36:07 pm
@Buddabing

Well you could change to the "job-running" mode of virtualdub using the script file you have now, although you would have to re-introduce all the line beginning with "\\" that you don't need for script execution.

I think a batch solution might be more workable, and allow people to opt-out of it should they wish to be alerted to errors.

Vid encoding:

I've found another (could this be the last?) encoding issue - what I had hoped that games wouldn't do, does - they change resolution on the fly.

The only game I have that does this is 'cbaj'. Its one of this ones that changes resolution during start up, but it seems to do it later on in the attract mode too. The attract for this game goes: show a white animated logo, a demo game, the white logo again,
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 13, 2005, 02:38:43 pm
Hello,

I've also updated version 0.89 with the latest and greatest code. The zip file, including source and binary, is here. (EDIT: link removed)

Please post any bug reports, feature requests, etc. to this thread.

Title: Re: MAME Movie Maker released
Post by: Howard_Casto on January 13, 2005, 06:11:12 pm

Keep in mind that video frames in any of the hardware accelerated front ends are treated as textures.
Title: Re: MAME Movie Maker released
Post by: Silver on January 13, 2005, 06:48:57 pm

Well anything that uses hardware aceleration which means that mamewah, a gdi based fe is safe. Basically Dragon King, 3dArcade, Kymera and anything that'll use the movie as a texture will suffer. 

Ah, I did not realise that!

Quote
By square I mean a 1:1 ratio.  Peter and myself use the aspect ratio of the snapshot to fix the ratio back upon playback, I dunno how other fes do it.  Multiples of 16 aren't as important as they used to be.  Your video card would have to be really frikkin old to have to worry about that.  However, being under the maximum texture size your card can handle, (which is a multiple of 16) is important. 

Btw, if your pc is farily modern, you shouldn't have to worry about these things at all.  I am aware of how some poor souls in this community try to scrape by with a 300mhz pc though, so I thought I would mention all of this in case budda wants to add options for that type of rendering. 

Back when the original 3darcade videos were being made, peter and myself argued over this point a lot.  I prefer high quality and ghetto users can deal with it, while he takes the conservative route.  As the years, have passed, however, I seem to have softened towards those people who don't invest enough money in their pc.  ;)

Well now that the sources are out, its perfectly possible to modify the source to change .vdb file created to compress/resize/filter in pretty much anyway you like. I have no idea if Buddabing would or would not like to add this functionality.

If anyone wants to do these kind of changes, the 2 ways I suggest:

1) create uncompressed videos (as one of buddabings options) and then run another session of virtualdub in the batch to recompress/resize etc.. as desired. I recommend doing it as part of the batch loop as otherwise you would need ridiculous amounts of storage to create them all first....

2) Better option: find where the .vdb file is created in buddabing's source patch and alter as desired. To find out what you want, run virtualdub   and set it up with filters etc.. for what you want (resize etc..) then save it as a job. Looking in the virtualdub.jobs file will show you the text you need to include in the vdb file.

If anyone is very keen on 2), and Buddabing wants to leave it, I can help with an appropriate virtualdub script. Or Buddabing if you want to add another option for lower quality (ie reaspect/resize everything to 256x256 so it works well as a texture) I can fire over the required script changes.

Title: Re: MAME Movie Maker released
Post by: Buddabing on January 13, 2005, 09:04:31 pm

Well anything that uses hardware aceleration which means that mamewah, a gdi based fe is safe. Basically Dragon King, 3dArcade, Kymera and anything that'll use the movie as a texture will suffer. 

Ah, I did not realise that!

Quote
By square I mean a 1:1 ratio.  Peter and myself use the aspect ratio of the snapshot to fix the ratio back upon playback, I dunno how other fes do it.  Multiples of 16 aren't as important as they used to be.  Your video card would have to be really frikkin old to have to worry about that.  However, being under the maximum texture size your card can handle, (which is a multiple of 16) is important. 

Btw, if your pc is farily modern, you shouldn't have to worry about these things at all.  I am aware of how some poor souls in this community try to scrape by with a 300mhz pc though, so I thought I would mention all of this in case budda wants to add options for that type of rendering. 

Back when the original 3darcade videos were being made, peter and myself argued over this point a lot.  I prefer high quality and ghetto users can deal with it, while he takes the conservative route.  As the years, have passed, however, I seem to have softened towards those people who don't invest enough money in their pc.  ;)

Well now that the sources are out, its perfectly possible to modify the source to change .vdb file created to compress/resize/filter in pretty much anyway you like. I have no idea if Buddabing would or would not like to add this functionality.

If anyone wants to do these kind of changes, the 2 ways I suggest:

1) create uncompressed videos (as one of buddabings options) and then run another session of virtualdub in the batch to recompress/resize etc.. as desired. I recommend doing it as part of the batch loop as otherwise you would need ridiculous amounts of storage to create them all first....

2) Better option: find where the .vdb file is created in buddabing's source patch and alter as desired. To find out what you want, run virtualdub   and set it up with filters etc.. for what you want (resize etc..) then save it as a job. Looking in the virtualdub.jobs file will show you the text you need to include in the vdb file.

If anyone is very keen on 2), and Buddabing wants to leave it, I can help with an appropriate virtualdub script. Or Buddabing if you want to add another option for lower quality (ie reaspect/resize everything to 256x256 so it works well as a texture) I can fire over the required script changes.



I can add an option which will make the vdb script trim the video to 256x256. I have no objection. I would like Silver to create a sample vdb that I can use. I presume we want to trim off the longer side and then reduce (or expand if less than 256?) the movie.

I would prefer that we not have a zillion different builds of this build of MAME floating around, because people will want the "help desk" to solve all their problems, and it will be considerably more difficult if everyone has their own non-standard build.
Title: Re: MAME Movie Maker released
Post by: Silver on January 13, 2005, 11:09:15 pm
Ok I've emailed Buddabing an addition to the script to resize to 256x256.

I've just remembered that Howard suggested 255x255 instead, so Buddabing you can just change those two numbers.

Obviously this loses the aspect ratio, but Howard seeing as you said that you correct for this in the FE I'm assuming you don't want it cropped as well?
Title: Re: MAME Movie Maker released
Post by: Zero_Hour on January 13, 2005, 11:44:16 pm
Just want to say thanks to Budda and Silver on this one. I've been running it for the last few days, and it works great!

Title: Re: MAME Movie Maker released
Post by: Howard_Casto on January 14, 2005, 04:03:14 am
Ok I've emailed Buddabing an addition to the script to resize to 256x256.

I've just remembered that Howard suggested 255x255 instead, so Buddabing you can just change those two numbers.

Obviously this loses the aspect ratio, but Howard seeing as you said that you correct for this in the FE I'm assuming you don't want it cropped as well?

no... cropping would be bad....

actually 256 by 256 is just as good, but dx has this wierd pixel offest error...  sometimes when blending a texture that is the video card's texture limit, you can get artifacts on the absolute edge. 

I think the 3darcade ones are 256 by 256 again, i dunno. 

Title: Re: MAME Movie Maker released
Post by: Buddabing on January 14, 2005, 08:55:29 am
I'm confused about this a bit. Won't the videos look funny if they are resized to exactly 256x256 or 255x255? Shouldn't we make the -longest- dimension 256 or 255?

mk 400x254 -> resize to 256x162
tron 480x512 -> resize to 240x256

And which is it, 255 or 256? Can someone tell that by experimentation?

Another thing, aren't 256x256 sized textures a features on mostly high-end video cards? I thought that a good chunk of mid-sized cards had a 128x128 texture limit.




Title: Re: MAME Movie Maker released
Post by: Popcorrin on January 14, 2005, 09:16:13 am





Well anything that uses hardware aceleration which means that mamewah, a gdi based fe is safe. Basically Dragon King, 3dArcade, Kymera and anything that'll use the movie as a texture will suffer.
Title: Re: MAME Movie Maker released
Post by: Silver on January 14, 2005, 09:29:15 am
I'm confused about this a bit. Won't the videos look funny if they are resized to exactly 256x256 or 255x255? Shouldn't we make the -longest- dimension 256 or 255?

mk 400x254 -> resize to 256x162
tron 480x512 -> resize to 240x256

And which is it, 255 or 256? Can someone tell that by experimentation?

Yes the video will look funny (squashed/stretched). However, it sounds like a the FE's that use them correct for this to make them look normal. The main reason for doing this seems to be that a 1:1 ratio is much easier/more effecient for a graphics card to playback as a texture. Your resizes above are not 1:1 so lose the advantage that Howard talked about. It sounds strange to me too, but I have no experience in programming textures in DirectX.

Title: Re: MAME Movie Maker released
Post by: Silver on January 14, 2005, 09:32:36 am
I'm curious, what are the benefits and disadvantages of  showing the movie as a texture as compared to how mamewah does it.  Is doing one way better than another?

Well Minwah can just playback the movie in a box.

As a texture, it can be manipulated in 3D and such things. So you can naviagte round a 3D room full of arcade cabs, and actually see the videos playing back on the screen as you move round and walk up it - its all moving in perspective to you as you move closer etc..etc...

At least, this is the main reason I presume its used for.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 14, 2005, 09:58:53 am
I'm confused about this a bit. Won't the videos look funny if they are resized to exactly 256x256 or 255x255? Shouldn't we make the -longest- dimension 256 or 255?

mk 400x254 -> resize to 256x162
tron 480x512 -> resize to 240x256

And which is it, 255 or 256? Can someone tell that by experimentation?

Yes the video will look funny (squashed/stretched). However, it sounds like a the FE's that use them correct for this to make them look normal. The main reason for doing this seems to be that a 1:1 ratio is much easier/more effecient for a graphics card to playback as a texture. Your resizes above are not 1:1 so lose the advantage that Howard talked about. It sounds strange to me too, but I have no experience in programming textures in DirectX.



The 3darcade documentation says:
I STRONGLY recommend to batchresize your marquee's and screenshots and all other artwork you plan to show inside the 3d environment to a power of 2 format. I would suggest 256x256 for screenshots and marquees. And if your graphic card can handle it 256x512 for pinball playfields. This will depending on your videocard give a nice perfomance boost while texturizing models on the fly. This is essential for good performance in cylarcade mode and with the cycling of bitmaps on the screenshot texture in fpsarcade mode.

So I guess that's good enough for me.
Title: Re: MAME Movie Maker released
Post by: Silver on January 14, 2005, 10:07:18 am
Ah nice one - 256 it is......

A curiosity question: I've noticed that recently in your patch, the on-screen-fps display has been disabled. Also, it seems that throttle has been hardcoded as on. This does not make much difference, but I was just curious if there was a particular reason for these?

Title: Re: MAME Movie Maker released
Post by: Minwah on January 14, 2005, 10:43:40 am
I have a new version of ListGen available, too. No major changes, I made it so that the batch file created to make movies doesn't have the copy and delete steps at the beginning and end.

Sorry for being dumb but where can I get this?
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 14, 2005, 11:08:21 am
I've created a -moviesquare flag which will resize the movies to 256x256. Someone familiar with 3darcade or Dragon King should try this and make sure this is what they want.

I fixed a small bug where if a black screen went on forever then the movie would never end. This typically is a problem only with non-working games.

I've uploaded new binaries and source to both version 0.89 and version 0.90.


Title: Re: MAME Movie Maker released
Post by: Buddabing on January 14, 2005, 11:11:52 am
I have a new version of ListGen available, too. No major changes, I made it so that the batch file created to make movies doesn't have the copy and delete steps at the beginning and end.

Sorry for being dumb but where can I get this?

The latest ListGen is here (http://cpmaker.mameprojects.com/files/LISTGEN.ZIP). I made the MAME version detection match what is projected to be the future naming convention of MAME. They are planning to have MAME go to 0.100 instead of 1.0 after 0.99. This would have broken the previous version of ListGen. There probably should be smarter detection code for very early versions of MAME.
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on January 14, 2005, 02:03:38 pm
I'm confused about this a bit. Won't the videos look funny if they are resized to exactly 256x256 or 255x255? Shouldn't we make the -longest- dimension 256 or 255?

mk 400x254 -> resize to 256x162
tron 480x512 -> resize to 240x256

And which is it, 255 or 256? Can someone tell that by experimentation?

Another thing, aren't 256x256 sized textures a features on mostly high-end video cards? I thought that a good chunk of mid-sized cards had a 128x128 texture limit.

This is very true.... however, both dx and opengl automatically break the texture up into blocks and re-assemble them.  In all honesty 128 would be the most compatable size, however, chances are if you have a video card that old (256 has been the standard for about 3 years now)  you won't be running 3darcade or dk anyway.  Also one break isn't so bad, assuming it's a power of 16 break. Several odd-sized breaks are what kill more modest systems.

It's convoluted and compliacted, but it all draws down to the fact that normal pc games pre-cache all textures, but because all of our textures are external (artwork, frames grabbed off the video)  we have to load a ton, constantly, on the fly.  This makes front ends very video card intensive, even the gdi based ones. 


Out of curiosity, what settings are you guys running mame on when you capture?  I tried it for the heck of it last night and I was getting a puny 3 fps.  Also mame kept complaining about "e:\test" or something to that degree. 
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 14, 2005, 02:09:37 pm
Quote

Out of curiosity, what settings are you guys running mame on when you capture?
Title: Re: MAME Movie Maker released
Post by: 2600 on January 14, 2005, 04:36:16 pm
Movies are being created fine, but the loop detection seems to be a problem for me on some games.

Aquajack is one.  It cuts out way too soon.

Others, I'm not sure why the BIOS type screens are there.   MK series or radikalb.


Any ideas, I tried changing the movieloops flag, but that wasn't it.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 14, 2005, 05:16:48 pm
Movies are being created fine, but the loop detection seems to be a problem for me on some games.

Aquajack is one.
Title: Re: MAME Movie Maker released
Post by: Silver on January 14, 2005, 05:58:44 pm
Others, I'm not sure why the BIOS type screens are there.   MK series or radikalb.

If no loop is detected, it will cut out at the "maxmovielength" frame and start at the minmoviestart. So if its a long one it may just be not finding a loop?
Title: Re: MAME Movie Maker released
Post by: Silver on January 14, 2005, 06:05:07 pm

If anyone else has ideas on other ways to detect the loops, or refinements or changes to the default options, LMK. If I can raise the percentage of games where the default settings work, it will save a bunch of effort for the end users.

This may not help the default settings, but for the games that cut out too early it could be handy to have an option to set the number of "matches" before ending. Deafult obviously is 1, but being able to cut out on the 2nd identical match could help some games.....

Just wanted to say I think the detection actually works much better than I thought it would for at this stage, especially after so many encoding issues!

Quote
One final thought. Before running an entire batch, which could take a week, try adding -ftr 100 to the mame command line in batch.bat and commenting out the virtual dub part. The run the whole batch, which will play every game in the list for 100 frames. Finally, remove the -ftr 100 from the batch.bat and uncomment out the virtual dub part. That way, the nvram files will be created and maybe some of these problems will be avoided.

Great suggestion -  I would actually use a different command line for mame so that you don't slow it down with png and wav capture. e.g.:

mame %1 -resolution %2 -ftr100

or something should fly through a bit faster (make sure the window option is still set in the ini file)
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on January 14, 2005, 11:15:14 pm
Quote

Out of curiosity, what settings are you guys running mame on when you capture?
Title: Re: MAME Movie Maker released
Post by: MPS on January 14, 2005, 11:16:46 pm
Buddabing:
Title: Re: MAME Movie Maker released
Post by: Silver on January 14, 2005, 11:32:13 pm
Actually no.... I have the resolution forced to 320 by 240  still 3fps average

And remember, my developer's pc is like a 2.6 gig with a radeon 9600 video card, so I don't think it's a resource thing. 

Hmmm, capturing the pngs/wavs does significantly slow things down - a lot of games can't do fullspeed when normally they could - but I've never had it that slow on an XP 2800.

What games are you trying?

On my work P4 2.8gig, onboard rubbish gfx, I get average 35fps in 1941 using buddabings mame.ini from above, and options:

mame 1941 -r 384x224 -makemovie -writewav 1941.wav

Title: Re: MAME Movie Maker released
Post by: Howard_Casto on January 14, 2005, 11:40:56 pm
I've been trying cps1/cps2 games... i figured they look the best and require modest resources to run. 

I just tried 1941 with the settings you suggested... I'm getting 2.47 fps.

I hope you guys aren't trying to capture every single frame.  50% of the video cards out there (even really good ones)  can't handle more than 15 fps at native mame resolutions.  Or at least that's what the test's )p( and myself did found in the past.
Title: Re: MAME Movie Maker released
Post by: Silver on January 14, 2005, 11:53:32 pm
I've been trying cps1/cps2 games... i figured they look the best and require modest resources to run. 

They would be slower, but I can't test till I get home from work.

Quote
I just tried 1941 with the settings you suggested... I'm getting 2.47 fps.

Hmm something is cleary amiss. Not quite sure where the slow down is. I presume it runs full speed when you do not use -makemovie. Does the rest of your system slow down? Is your harddrive light fully saturated?

Quote
I hope you guys aren't trying to capture every single frame.  50% of the video cards out there (even really good ones)  can't handle more than 15 fps at native mame resolutions.  Or at least that's what the test's )p( and myself did found in the past.

The mame patch captures every frame - this is not ideal in terms of speed, but even if buddabing only saved 1/2, mame still has to render every frame so it can perform the analysis (I believe). If saving 1/2 produces a huge speed boost then maybe Buddabing would change it.

However, we are ditching every 2nd frame during the encoding, so most of the avis are around 30fps (or half there native speed). I found that this looks great - again not really thinking of low end/textures. In terms of encoding, again its trivial to knock it down to 1/3 or 1/4 the original if it would help. Perhaps Buddabing can add this to the "256x256" option so that you can either have large 30fps avis or you can have 256x256 15fps ones.....
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on January 15, 2005, 12:41:02 am
I've been trying cps1/cps2 games... i figured they look the best and require modest resources to run.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 15, 2005, 08:36:33 am
I've been trying cps1/cps2 games... i figured they look the best and require modest resources to run.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 15, 2005, 09:22:51 am
Buddabing:  Thank you very much for your hard work.

I'm trying this out for the first time.  Would it be possible for you or someone else with working knowledge of the Movie Maker to post a complete list of the necessary steps to make all of this work?  This thread is starting to get really long, and I am having some difficulty finding the information I need.

Thank you again.

The stuff you need to download is on the first post in this thread.

You'll also need two more files: batch.bat and makemovies.bat. Here's a sample batch.bat. Cut and paste into a file and modify.
@if not exist e:\mame\movies mkdir e:\mame\movies
@if exist e:\mame\movies\%1.avi goto end
time /T
@mame %1 -window -makemovie -resolution %2 -wavwrite %1.wav
@if not exist %1.vdb goto end
@\virtualdub\virtualdub /s"%1.vdb" /wait /x
@del %1.wav
@del %1.vdb
@del snap\*.png
@move /Y %1.avi e:\mame\movies
time /T
:end

The second file you need is called makemovies.bat, which calls batch.bat for each of your ROMs.

Here's a sample:
@call batch 005 224x256
@call batch 1941 224x384
@call batch 1943 224x256
@call batch 1944 384x224
@call batch 19xx 224x384
@call batch 2020bb 304x224
@call batch 280zzzap 256x224
@call batch 3countb 320x224
@call batch 3stooges 256x240
@call batch 3wonders 384x224
@call batch 40love 256x224
@call batch 4dwarrio 256x224
@call batch 4enraya 256x224
@call batch 4in1 224x256

You can generate your own makemovies.bat by using my ListGen utility, a link to it is in the first post of this thread.

HTH,
Buddabing

Title: Re: MAME Movie Maker released
Post by: sWampy on January 15, 2005, 11:59:02 am
Does anyone else run into games that seem to never finish? 

If it's not something that only happens on my 2 machines, an option to set a max time passage, not just frames, so you don't waste hours sitting on a game that runs at .1 frame per second, or whatever.

Silvers idea to go to a batch mode on virtual dub where it doesn't hang with dialogue boxes also seems like a good idea.

Making a dummy avi file if it either mame or virtualdub fails, or some other way the batch file can auto skip these next time it's run would be nice.  I sometimes have to break my batchfile to use the machine for some other purpose, and when I come back, I have to either edit the batch file to remove all the games that have failed, or reclose all the virtualdub error messages. 
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 15, 2005, 12:28:27 pm
Does anyone else run into games that seem to never finish? 

If it's not something that only happens on my 2 machines, an option to set a max time passage, not just frames, so you don't waste hours sitting on a game that runs at .1 frame per second, or whatever.

Silvers idea to go to a batch mode on virtual dub where it doesn't hang with dialogue boxes also seems like a good idea.

Making a dummy avi file if it either mame or virtualdub fails, or some other way the batch file can auto skip these next time it's run would be nice.  I sometimes have to break my batchfile to use the machine for some other purpose, and when I come back, I have to either edit the batch file to remove all the games that have failed, or reclose all the virtualdub error messages. 

Hmmmm. I don't ever get virtualdub problems anymore. Look at the sample batch.bat that I posted above. Make sure you have a line that says "if not exist %1.vdb goto end" . That should take care of the dialog boxes popping up.

I've got 1000+ videos now and I've restarted the makemovies.bat several times. It runs without stopping now.
Title: Re: MAME Movie Maker released
Post by: sWampy on January 15, 2005, 12:54:56 pm
Hmm, I had missed the go to end before the virtual dub line.  That should fix those, I changed mine to go to failed and had failed copy failed.txt to %1.bad and at the top skipped the ones with a %1.bad file.   So it will skip all those quickly, unless  a new version comes out and I want to try the bad ones again.

I'm at almost 1300, and I've maybe had 20 hang in mame/take several hours, I'll try to notice the next time it happens what rom it is.  But it's pretty disgusting, when you get up in the morning, look and it's made it through 3 roms since you went to bed cause it hit some chd game marked as working, but that has been running for 6 hours and still hasn't done 10000 frames or whatever and exited.

I did have one this morning that did get some virtualdub error that wasn't caused by something other than not having a script,  I'll make a note of what it was if that happens again.

4.8 gigs of avi's and growing. ;-)
Title: Re: MAME Movie Maker released
Post by: big daddy on January 15, 2005, 02:58:14 pm
<quote>
The stuff you need to download is on the first post in this thread.

You'll also need two more files: batch.bat and makemovies.bat. Here's a sample batch.bat. Cut and paste into a file and modify.
@if not exist e:\mame\movies mkdir e:\mame\movies
@if exist e:\mame\movies\%1.avi goto end
time /T
@mame %1 -window -makemovie -resolution %2 -wavwrite %1.wav
@if not exist %1.vdb goto end
@\virtualdub\virtualdub /s"%1.vdb" /wait /x
@del %1.wav
@del %1.vdb
@del snap\*.png
@move /Y %1.avi e:\mame\movies
time /T
:end

The second file you need is called makemovies.bat, which calls batch.bat for each of your ROMs.

Here's a sample:
@call batch 005 224x256
@call batch 1941 224x384
@call batch 1943 224x256
@call batch 1944 384x224
@call batch 19xx 224x384
@call batch 2020bb 304x224
@call batch 280zzzap 256x224
@call batch 3countb 320x224
@call batch 3stooges 256x240
@call batch 3wonders 384x224
@call batch 40love 256x224
@call batch 4dwarrio 256x224
@call batch 4enraya 256x224
@call batch 4in1 224x256

You can generate your own makemovies.bat by using my ListGen utility, a link to it is in the first post of this thread.
</quote>

First off, thanks for the work on this...works great on the few that I've tried.  For those like me that are a bit slow, you might want to add the above information to your first post...I couldn't figure things out until I read this part. 

Thanks again!

btw - anyone know of a good movie screensaver?  Be pretty neat to randomly cycle through different attract videos in full screen now that I have a pretty complete list
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 15, 2005, 03:25:09 pm

First off, thanks for the work on this...works great on the few that I've tried.  For those like me that are a bit slow, you might want to add the above information to your first post...I couldn't figure things out until I read this part. 

Thanks again!


Done, thank you for the suggestion and the kind words.
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on January 15, 2005, 07:26:13 pm
alright... i figured out the issues and you'll be glad to know you had nothing to do with it.  ;)

First off, the new instructions on the first page helped out a lot.  Thanks for updating them.

I looked at the mame code a little and apparently autoframeskip (even when it's not being used)  totally looses it's count when a snapshot is taken.  Thus it thinks it's losing frames, skips and few, and the result is a severely choppy display.  When I installed your build, of course I simply used -cc to create an ini and that was turned on by default.  so I turned off autoframeskip and everything sped up to an acceptable level.  There were some other settings I found that greatly improved performance.  I think these settings should be added to your example bat file:

autoframeskip 0
syncrefresh 1
samplerate 22050
resamplefilter 0

(the latter is because, with wav recording you'll be doing triple audio processing, and with a cheap sound card it could slow your system)

and the optional (for better pcs)

triplebuffer 1
waitvsync 1



so all is well

this really seems to be shaping up.  Good job to all involved.

I'll test out those dx-friendly options later in the week and let everyone know how it turns out. I appreciate you adding them btw. 

And I didn't think about games you can't run full-speed, that's a good point.  But then I have to ask the quesiton.  Why would you bother to make a video of a game you can't possibly play?  ;)
Title: Re: MAME Movie Maker released
Post by: Silver on January 15, 2005, 09:13:52 pm
I did have one this morning that did get some virtualdub error that wasn't caused by something other than not having a script,  I'll make a note of what it was if that happens again.


I'd love to hear which rom(s) caused this error...  I think we have the encoding pretty much nailed down now.
Title: Re: MAME Movie Maker released
Post by: Silver on January 15, 2005, 09:17:18 pm

I looked at the mame code a little and apparently autoframeskip (even when it's not being used)  totally looses it's count when a snapshot is taken.  Thus it thinks it's losing frames, skips and few, and the result is a severely choppy display.


Thanks for the mame tips....  Does throttle get confused by the same thing? I find setting it to 1 or 0 while using -makemovie has no effect whatsoever. My games either run at less than 100%, or dead on 100% - never seeming to go as fast as possible.
Title: Re: MAME Movie Maker released
Post by: sWampy on January 15, 2005, 09:51:22 pm
Anyone have any suggestions for how to get as many rom dip switches set to play audio in attract mode as possible, without going in one by one and setting them?

Title: Re: MAME Movie Maker released
Post by: Buddabing on January 16, 2005, 02:22:06 pm
Anyone have any suggestions for how to get as many rom dip switches set to play audio in attract mode as possible, without going in one by one and setting them?



I've looked at the code and it is possible to force all demo mode sound dip switches to be on. The code on how to do it is in the new validity check code.

I think I'll implement something to have an option to allow the user to force demo mode sound on, force demo mode sound off (my own personal preference), or to use the current dipswitch setting. This would be useful even out of the movie maker mode.

There are more than 2000 games with demo mode sound dip switches. It would be inconvenient to have to switch all of them.

Look for this change in the next version.
Title: Re: MAME Movie Maker released
Post by: 2600 on January 16, 2005, 03:02:16 pm
Excellet. Great work Buddabing.
Title: Re: MAME Movie Maker released
Post by: sWampy on January 16, 2005, 09:01:31 pm
Anyone have any suggestions for how to get as many rom dip switches set to play audio in attract mode as possible, without going in one by one and setting them?



I've looked at the code and it is possible to force all demo mound sound dip switches to be on. The code on how to do it is in the new validity check code.

I think I'll implement something to have an option to allow the user to force demo mode sound on, force demo mode sound off (my own personal preference), or to use the current dipswitch setting. This would be useful even out of the movie maker mode.

There are more than 2000 games with demo mode sound dip switches. It would be inconvenient to have to switch all of them.

Look for this change in the next version.


Cool, I usually leave them off, but it sure would be better to make the movies with sound, then let the frontend enable/disable sound, rather than having a lot of soundless avi files that need redoing if you ever deside you want sound.
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on January 16, 2005, 09:41:01 pm
That's definately good news...  something of note though is that all games with internal settings menus generally have the demo sound option in there, instead of the mame dip menu.  Some examples are all capcom games, all neogeo games and most model 1, 2 ect games. 

In other words, all the games with the really cool intros have to be adjusted manually.  Fortunately, most of them also have dmeo sounds turned on by default.  :)  Of course, someone could hack the nvram/cfg files of each game. .....
Title: Re: MAME Movie Maker released
Post by: Nailz on January 17, 2005, 01:01:07 pm
Awesome work on this!!!!!  I think this thread is worthy of being sticky....  No, not that kind of sticky... perverts!   ;D
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 18, 2005, 09:49:43 am
I've looked into the turning on demo sound issue, and it turns out that games that have dipswitches for controlling demo sound must have the dipswitch set by default or else the validity checks will fail. That means that no games have a dipswitch setting for demo sound that is off by default. So the 2000 games with demo sound dipswitches already have demo sound on, unless the user has changed it.

Therefore there will not be a code change for this issue.

I've completed my stress test of generating all the videos. I used MAME 0.89, -movievideo 2 and filtered out duplicate games and pr0n with ListGen. Result: 2084 videos, a little less than 25 gig of space used.
Top 5 disk space used:
propcycl 342 meg
toobin 212 meg
f1en 105 meg
cyberbt 103 meg
karianx 88 meg

The stress test ran all the way through without any stops caused by VirtualDub. It passed missing ROMs gracefully. I did stop it several times during the run. It took right at one week to complete, including stoppages.

I'm still checking to see if there is a way to turn on demo sound in games without the demo sound dipswitches. Next, I'll delete the 25 gig of movies and generate them again with -movievideo 3 to see how much space is saved.

Regards,
Buddabing
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on January 19, 2005, 05:31:46 am
Just one more correction to your faq.  I wondered why I wasn't geting any compression and it turns out, if you don't have the xvid codecs installed, virtualdub doesn't error out and just makes an uncompressed video.  Also you say that xvid comes with wmp10....  to my knowledge it doesn't, and even if it did 90% of your divx codecs overwrite it anyway.  I found a site that has several to choose from, and they take over divx compression as well, thus keeping everyone from loosing functionality. 

http://www.divx-digest.com/software/xvid.html

I hope that helps everyone. 
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 19, 2005, 09:19:28 am
Just one more correction to your faq.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 20, 2005, 11:14:26 am
I've uploaded a new version of my MAME build of MAME 0.90. The only thing changed is that the hard-coded snap directory has been changed to whatever is specified in the snapshot_directory MAME parameter.

I didn't change my version 0.89 because my source for 0.89 is currently in a state of "flux".
Title: Re: MAME Movie Maker released
Post by: donnyj on January 21, 2005, 02:09:39 am
Ok, I thought I was smarter than this but I guess I'm not
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 21, 2005, 09:51:36 am
Ok, I thought I was smarter than this but I guess I'm not
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 21, 2005, 10:23:20 am
Hello,

I made a small change to ListGen. I added the -showusage flag which will dump out the list of options and their meanings just like MAME does. I also made the default front end moviebatch and the default output makemovies.bat.

Hopefully this will help out people attempting to make movies.
Title: Re: MAME Movie Maker released
Post by: donnyj on January 21, 2005, 08:55:29 pm
The included .ini file is still set at output.txt and plaintext

Hello,

I made a small change to ListGen. I added the -showusage flag which will dump out the list of options and their meanings just like MAME does. I also made the default front end moviebatch and the default output makemovies.bat.

Hopefully this will help out people attempting to make movies.

Title: Re: MAME Movie Maker released
Post by: donnyj on January 21, 2005, 09:00:43 pm
Thank you VERY much for your kind reply  :)

The problem with ALL the snaps came with the line in your .bat file from the first post "@del snap\*.png"

One possible suggestion, allow saving the pngs with zero compression, should be a bit faster

Is there an easy way to launch mame and virtualdub in the background?

Thanks for such a great project!!!!


The first thing to do is to check and make sure ListGen knows where MAME is. Edit your listgen.ini and make sure that the rompath and mamepath variables are set correctly. If your MAME executable is not named "mame.exe", then put a line with the correct name:

mamename mamepp.exe

or whatever your MAME executable is named. Also, by default, the output is named "output.txt", not "makemovies.bat". So change that line too. Make sure the "frontend" parameter is set to "moviebatch". That may be your problem right there.  :)

Gameplay.ini is not strictly necessary unless you want to filter with it. It is bundled with the Kymaera front end. You'll need to copy it whereever your ListGen is.

The program shouldn't delete all your snapshots, it will, however, delete the snapshots with the first three chararacters of the name matching your rom name.

SQL=<S>tructured <Q>uery <L>anguage. It's a widely-used way of interacting with databases. The filter.sql contains several examples of different filters. If you want to play with the filters, just uncomment out the one you want to use and comment out everything else by putting two dashes -- at the beginning of the line.

HTH,
Buddabing


Title: Re: MAME Movie Maker released
Post by: Buddabing on January 22, 2005, 12:32:39 am
Quote
Is there an easy way to launch mame and virtualdub in the background?

Yes. Silver worked out a method.

In your batch.bat, use this to launch MAME in the background:
@start /min /wait mame %1 -window -makemovie resolution %2 -wavwrite %1.wav

For VirtualDub:
@start /min /wait \virtualdub\virtualdub /s"%1.vdb" /wait /x

I removed the del snap\*.png from the batch.bat. Thank you for that correction.

Title: Re: MAME Movie Maker released
Post by: Silver on January 22, 2005, 05:47:29 am

One possible suggestion, allow saving the pngs with zero compression, should be a bit faster


Thats an interesting thought. I'm not sure which library mame uses for png support (libpmg? I'm guessing) or how easy it would be to switch off..... It would increase the temp disk space used obviously, but no impact in the long run.....
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 22, 2005, 11:51:48 am
Quote
One possible suggestion, allow saving the pngs with zero compression, should be a bit faster


MAME uses the standard libpng library. Compression is done with the standard zlib library.

IMO using uncompressed pngs may be faster computation-wise but will take more I/O time. Plus, standard libpng doesn't support it and it would have to be hooked in.

So I don't think it's a good idea.

BTW, the del snap\*.png is necessary in order to delete the snapshots. If it's taken out then gazillions of snapshots will accumulate there.

Title: Re: MAME Movie Maker released
Post by: Silver on January 22, 2005, 12:28:15 pm
Hmmm maybe it would be best to use a seperate directory for the temp pngs than the mame snap dir if thats where everyone keeps there frontend snaps?

Although it may be easier for people to say rename there snap dir while making movies....

Title: Re: MAME Movie Maker released
Post by: Buddabing on January 22, 2005, 04:38:00 pm
Hmmm maybe it would be best to use a seperate directory for the temp pngs than the mame snap dir if thats where everyone keeps there frontend snaps?

Although it may be easier for people to say rename there snap dir while making movies....


Another option would be to change the delete step of batch.bat slightly:

@del snap\*0????.png

This will not delete pacman.png but will delete pac00000.png and all the other movie snapshots.

It'll delete 720.png, that's relatively minor "collateral damage".
Title: Re: MAME Movie Maker released
Post by: donnyj on January 22, 2005, 07:24:04 pm
Why the resistance to just use a separate directory?  Then it won't delete ANYTHING it shouldn't?

Just a thought...

also, when I attempt to compile mame with the changes, I get a mame that recognizes the new switches but doesn't act on them???

What am I doing wrong? ???
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 22, 2005, 07:40:55 pm
Why the resistance to just use a separate directory?  Then it won't delete ANYTHING it shouldn't?

Just a thought...


True enough. I'm already adding fourteen options to MAME, what's the big deal about one more? I guess it won't be too difficult to add a "-moviesnapdir" directory.

Quote

also, when I attempt to compile mame with the changes, I get a mame that recognizes the new switches but doesn't act on them???

What am I doing wrong? ???

I don't really understand "doesn't act on them". Are you calling mame with -makemovie  on the command line or makemovie 1 in your mame.ini? If not, the movie won't be created.

Try moving your compiled version out and replacing it with my precompiled binary, changing nothing else, then see if you get the same result. Then post what command line you are using as well as the relevant parts of your mame.ini.
Title: Re: MAME Movie Maker released
Post by: donnyj on January 22, 2005, 08:55:52 pm
I dropped the new compiled version into the spot where your compiled version was, and it doesn't complain about the invalid switches, but it doesn't save snaps or close, it just keeps running until I stop it.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 22, 2005, 09:13:33 pm
I dropped the new compiled version into the spot where your compiled version was, and it doesn't complain about the invalid switches, but it doesn't save snaps or close, it just keeps running until I stop it.  Then there will be 1 snap created.

I don't understand what you mean about putting your precompiled version in place of the one I made, yes your version works, it's just for a different set of roms than I have, and I wanted to try an i686-optimized version.

Thank you VERY much for all your hard work on this, it's a marvellous project.

I didn't mean to be offensive when I asked about resistance to changing its behaviour  :-\

 :'(my bad :'(

I took no offense. Resistance to change (Howard would call it "pigheadedness") is a personality trait of mine.

Please post:
The command line where you call mame from a batch file or typed in.
The relevant portions of mame.ini.
What ROM you are trying to run.
Which version (0.89 or 0.90)

Title: Re: MAME Movie Maker released
Post by: donnyj on January 22, 2005, 11:24:18 pm
I am using both the "sample" batch file and the "what I use" mame.ini.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 23, 2005, 12:52:13 am
I am using both the "sample" batch file and the "what I use" mame.ini.  The only difference is the .exe .

Let me ask this way.  In order to compile a 90u3 binary...

Download official 90 source.  Patch u1, u2 then u3 patches.  Extract the movie maker (90) source over the top of the patched 90u3 source, replacing any duplicate files with the movie maker files (makefile, etc.) then make.

Something wrong with that procedure?

Well I've learned how to compile mame, takes about 30 minutes an attempt, but it's a learning experience =]

edit: ok, narrowing down the problem, now trying just "out of the box 0.90" source with MMM 090 source added, no patching....


hmmm, isn't the usrintrf.c supposed to be in src overwriting the one in there?  trying that....



Yep, looks like the path on usrintrf.c is wrong, that'll cause the problems you describe.



Title: Re: MAME Movie Maker released
Post by: donnyj on January 23, 2005, 02:56:01 am
Woohoo, the P4 u3 version is MUCH faster on my system.....
Title: Re: MAME Movie Maker released
Post by: Silver on January 23, 2005, 07:20:22 am
Woohoo, the P4 u3 version is MUCH faster on my system.....

how do you mean? the p4 specific speedups or something else?
Title: Re: MAME Movie Maker released
Post by: donnyj on January 23, 2005, 06:38:41 pm
Just the p4 speedups, I believe....

Woohoo, the P4 u3 version is MUCH faster on my system.....
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 24, 2005, 10:52:03 am
Okay,

I have updated version 0.90 of my MAME build. I added an option -moviesnap_directory (default value movisnap) which will cause the movie snapshots to be put in a separate directory from the normal screen shots. I also put in a del /Q movisnap\*.png in the sample batch.bat on the first page of this thread.

The purpose of adding the new option was so that people don't accidentally delete the screen shots they already have.

In order to compile your own optimized build, all you should have to do is extract this into the MAME root directory and run make. (after putting your own optimizations in the makefile)
Title: Re: MAME Movie Maker released
Post by: Popcorrin on January 24, 2005, 07:32:17 pm
I upgraded from version .89 to .90 and I seem to be having more issues with the updated version. I have the movieloops set to 1 but for alot of the videos it seems that the loop is not detected. Also I noticed on occasion I get an error during the process at the point where it looks for the, e.g. cot00000.png and says it can not find it.  I open up the snap directory and the reason it can't find the specified snapshot is because it is no longer there.  It seems as if the first 2000 or so of the 10000 snapshots have been deleted.  I have no idea why this happens?
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 24, 2005, 09:38:12 pm
I upgraded from version .89 to .90 and I seem to be having more issues with the updated version. I have the movieloops set to 1 but for alot of the videos it seems that the loop is not detected. Also I noticed on occasion I get an error during the process at the point where it looks for the, e.g. cot00000.png and says it can not find it.  I open up the snap directory and the reason it can't find the specified snapshot is because it is no longer there.  It seems as if the first 2000 or so of the 10000 snapshots have been deleted.  I have no idea why this happens?

Okay, please post the relevant portions of your batch.bat and your mame.ini, and what rom you are using. Also, try adding -moviesnap_directory snap to your mame.ini.

Title: Re: MAME Movie Maker released
Post by: Popcorrin on January 25, 2005, 03:34:06 pm
It has happened on cotton boomerang for instance.  It seems to happen with the higher resolution games.

My batch file and mame ini. are below.

@if exist f:\videos\%1.avi goto end
time /T
@rem @copy /Y dummyvdb.txt %1.vdb
@start /min /wait mame %1 -window -makemovie -resolution %2 -wavwrite %1.wav
@start /min /wait \virtualdub\virtualdub /s"%1.vdb" /wait /x
@rem @mame %1 -window -makemovie -resolution %2 -wavwrite %1.wav
@rem @\virtualdub\virtualdub /s"%1.vdb" /wait /x
@del %1.wav
@del snap\*.png
@move /Y %1.avi f:\videos
time /T
:end

intmakectrl             1
extmakectrl             0
noshowctrl              0
makemovie               1
minmoviestart           200
minmovielength          800
maxmovielength          10000
moviethreshold          2
movieaudio              0
movievideo              3
skip_warnings           1
movieloops              1
moviesquare             0
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 25, 2005, 03:58:49 pm
It has happened on cotton boomerang for instance.
Title: Re: MAME Movie Maker released
Post by: rerstad on January 25, 2005, 10:45:39 pm
OK, not sure what's going on.  Downloaded your compiled mame v.89 and the other necessary apps.  Made the bat files, just like you say, made mame.ini just like what you say (almost--more on that in a minute) and last night things seemed to be going fine.  I was making movies.  Went to bed thinking it was churning away and when I got up it was stuck on 1944 needing me to type "OK"--I had forgotten to add skip_warnings.  Did that, so now the whole setup complies with what's at the beginning of this thread and it won't make any movies.  It will startup and run and just keep running.  I've been trying to make a mspacman movie for more than an hour with no luck.  I can clearly see that it's cycled through the screens several times.

One other thing, am I supposed to be seeing error messages in the command window?  First it says "unable to open the keyboard device (error 32) then a bunch of "access denied"s.  When it worked yesterday, I would also get "unable to close the keyboard device (error 6)" and "System cannot find the file specified".

It's a great app with promise.  I'm sure I'm just overlooking something dumb, but not sure what it is.
Title: Re: MAME Movie Maker released
Post by: rerstad on January 25, 2005, 10:55:28 pm
OK, upgraded to your compiled version .90 and it only took 4 minutes to do mspacman, so progress!
Title: Re: MAME Movie Maker released
Post by: Popcorrin on January 25, 2005, 11:29:53 pm
It has happened on cotton boomerang for instance.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 25, 2005, 11:31:12 pm
It turns out I don't have the cotton2 rom. I tried recoding the loop detection to only check the picture data. No change. I think the larger games have images that are just too complex to repeat exactly in a demo loop. What I could to is to try sampling the image at, say, 100 different points, then detecting a match if a succeeding frame matches all 100 points within a certain tolerance. Storage required would be max 400 bytes times 10000 frames= 4 meg, which is a bit more than currently which is about 60 bytes per frame.

Rerstad: Please post back if you need further assistance. My 0.89 code is messed up right now from testing, I'll post a new executable soon.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 25, 2005, 11:41:08 pm
Quote

If my snap directory was an issue why would the movie creation work fine for some games?  The error I described happens maybe 10% of the time.  Otherwise everything usually goes pretty well.
I was kind of curious how the process worked regarding loop detection and deletion of the png's.  Once the program detects the loop does it then delete the png's from the snap directory that are prior to first frame of the loop?  Then does it send the information to virtual dub and virtual dub then looks for let's say cot01254.png.  If this was the case the problem may reside in that there is a problem with the info sent to vdub.  Instead of vdub looking for cot01254.png, it is looking for cot00000.png.  Every error I have gotten is that vdub can't find the ***00000.png frame.

I may totally off base here, but it was just a thought.
Thanks for your help and I will try setting up the moviesnap directory as you suggested.

The first thing the movie maker code does is delete cot*.png. Then it starts creating snapshots named cot00000.png, cot00001.png, etc. If, for some reason, MAME can't create the snapshot for cot00000, then the movie will fail to create, since the .vdb script expects the snapshots to start with 00000.

MAME may not be able to create cot00000 because:
1) out of disk space?
2) no write permission to directory?
3) insufficient access privileges?
4) who knows?

Please reproduce this error on a different ROM, since I don't have cotton2. Then, create a log file (add -log to the MAME command line) and look at the error.log file. If something doesn't pop out at you, zip it up and email it to me at buddabing at houston dot rr dot com.


Title: Re: MAME Movie Maker released
Post by: Howard_Casto on January 26, 2005, 12:58:08 am
I wanted to point out that on further use I've ran into similar issues.  Nearly any game with a complex intro fails loop detection, or detects the loop improperly.  Most fighters fail as they have complex intros and several transitions (attract mode, demo mode, highscore mode ect). 

Is it my understanding that you are doing a simple getpixel point check then?  Imho this isn't gonna work well at all.  Disable compression (as others have suggested) and do crc checks of the spit out image files.  Only when the frame is exactly, exactly, exactly the same will the crc check pass. You'll have to do a get pixel test on top of that to get the color level (make sure it isn't matching on an all black or all white screen).  Of course, depending upon how accurate the render method is, that may cause even worse performance, I dunno. 
Title: Re: MAME Movie Maker released
Post by: rerstad on January 26, 2005, 06:43:20 am
More problems with loop detection and version .90 last night.  I got stuck on Angelkds for 3 1/2 hours last night. Had to escape out of it and now appears I'm stuck on Anteater.

Again, the bat  and ini files are just as specified. ???
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 26, 2005, 09:00:32 am
I wanted to point out that on further use I've ran into similar issues.  Nearly any game with a complex intro fails loop detection, or detects the loop improperly.  Most fighters fail as they have complex intros and several transitions (attract mode, demo mode, highscore mode ect). 

Is it my understanding that you are doing a simple getpixel point check then?  Imho this isn't gonna work well at all.  Disable compression (as others have suggested) and do crc checks of the spit out image files.  Only when the frame is exactly, exactly, exactly the same will the crc check pass. You'll have to do a get pixel test on top of that to get the color level (make sure it isn't matching on an all black or all white screen).  Of course, depending upon how accurate the render method is, that may cause even worse performance, I dunno. 

I thought the compression was lossless. Lossy compression could indeed cause imprecise loop detection, espcially on larger images such as propcycl.

The current loop detection does a md5 checksum over the entire file. As a test, I modified it to do the checksum over only the image data. Same results.

Instead of the sampling method, I'll look into creating lossless frames instead. Performance may not be very good. :)

Title: Re: MAME Movie Maker released
Post by: Silver on January 26, 2005, 09:30:29 am
PNG files use completely lossless compression - I believe it is part of the PNG spec.

The only way these files are different would be if the rendering process of the games in mame produces non-repeatable images, which I find extremely unlikely. (Or they really are different).

If there is an obvious loop that is not detected, then I would simply recommend comparing two pngs from appropriate spots. There may be something unusual like a pixel or line of 'garbage' rendered to the screen which prevents identical comparisons.

Note if any of the games mentioned change their resolution during the attract loop, it will not work (each time the resolution changes, the loop detection restarts and previous frames are wiped.) I know cool borders (cbaj) does this as the logo is a different screen resolution to the rest - although it does find a loop later on in the attract which looks nice. A single resolution change in bootup is fine as its not part of a loop.
A simple way to test for a resolution change is to not delete all the snaps, the open the first one in Vdub manually and it will tell you if it finds pngs in the sequence with a different resolution. (note buddabings more recent patches get rid of most of these errors)

The fact that this process works for so many games suggests the difference is with the specific games.

On a side note, I would also argue that a lossy compression for SINGLE images would most probably produce an IDENTICAL file given EXACTLY the same input images - I know this is true for jpgs. So it would actually still work..... It would only fall over if the lossy compression was designed for mulitple frames (video codecs) and used info from frames before and after as well. Howver, this is probably beside the point.
Title: Re: MAME Movie Maker released
Post by: rerstad on January 26, 2005, 10:37:18 am
I think I'm having some problems with moviesnp and the precompiled version of .90.  I get an initial error that it can't find c:\mame\moviesnp\****.png, then, even those it completed said that it could not find the moviesnp file to delete.  When I went into the moviesnp file, it was huge--apparently nothing was being deleted, which I assume it should be. If I have to stop (like when it took more than an hour and was still running anteater), I get an error that vdub can't find the ****.png frame.  May be the same problem Popcorrin discussed.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 26, 2005, 11:10:42 am
I think I'm having some problems with moviesnp and the precompiled version of .90.
Title: Re: MAME Movie Maker released
Post by: sWampy on January 26, 2005, 11:12:41 am
I'm trying to compile 90 with this, and keep getting the following error.

Compiling src/common.c...
src/common.c: In function `save_movie_snapshot':
src/common.c:2016: `FILETYPE_MOVIESHOT' undeclared (first use in this function)
src/common.c:2016: (Each undeclared identifier is reported only once
src/common.c:2016: for each function it appears in.)
src/common.c: In function `detect_png_resolution_change':
src/common.c:2169: `FILETYPE_MOVIESHOT' undeclared (first use in this function)
src/common.c: In function `detect_loop':
src/common.c:2231: `FILETYPE_MOVIESHOT' undeclared (first use in this function)
src/common.c: In function `generate_vdb_file':
src/common.c:2308: `FILETYPE_MOVIESHOT' undeclared (first use in this function)
make: *** [obj/mame/common.o] Error 1

I unzipped clean .90 source, made it, it compiled fine, unzipped mame90 on top, typed make, and got  this error.
Title: Re: MAME Movie Maker released
Post by: rerstad on January 26, 2005, 11:45:10 am
If the moviesnp is a file, it should be a directory.
Do a dir moviesnp. If it shows one file, delete it then do mkdir moviesnp. Mame is supposed to create the directory if it doesn't exist, there's probably a program bug that prevented this.

There is a moviesnp directory that mame apparently created that appears in the mame folder.  I'll try deleting it and letting mame make it again.  It was full of TONS of pngs.  The pngs aren't being deleted when the movie is made.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 26, 2005, 11:50:57 am
Quote
There is a moviesnp directory that mame apparently created that appears in the mame folder.
Title: Re: MAME Movie Maker released
Post by: rerstad on January 26, 2005, 12:12:57 pm
Quote
The movie snapshots aren't deleted unless you have something in your batch.bat to delete them. And, the directory name you put in the batch.bat has to match the moviesnap_directory parameter, or again the pngs won't be deleted.

I'm very new to all of this,
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 26, 2005, 12:20:39 pm
Jan 26, 2005 11:00 CST

I've uploaded a new version.

I fixed swampy's compile error.

Silver: The png compression is not lossless. The png library allows different levels of compression, including lossless, but MAME always uses compressed data.

I made a small change to which creates a new option -moviecompression. If set to 1 (default), the pngs will be compressed like they are now. If set to zero, the pngs will be uncompressed.
Title: Re: MAME Movie Maker released
Post by: Popcorrin on January 26, 2005, 12:35:22 pm
When I tried adding moviesnap_directory moviesnp I got the following error:unknown option moviensap_directory on line 23 of file mame.ini, ignoring line.
Mame by default is using the snap directory and there doesn't seem to be anyway to change it.  I am using the mame.90 exe.  It doesn't bother me that it uses the snap directory, but I thought if I were to use the moviesnp drctry it might fix the problems I was having.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 26, 2005, 12:51:42 pm
When I tried adding moviesnap_directory moviesnp I got the following error:unknown option moviensap_directory on line 23 of file mame.ini, ignoring line.
Mame by default is using the snap directory and there doesn't seem to be anyway to change it.
Title: Re: MAME Movie Maker released
Post by: Popcorrin on January 26, 2005, 01:04:21 pm
That was a typo. :)  I had it spelled correctly. 

I reproduced the same problem I was having earlier with cotton2.  I was using columns 97.  It has the same resolution as cotton2.  I noticed that right away after the batch file starts that in the command line window that I get the error 'The system cannot find the path specified', and this error repeats 6 times.  If I open my snap directory it shows the png's starting at col00006.png,  the first 6 are missing.  Later on in the process I get the same error again.  At this point the error will repeat 100's of times. 

I am not sure what is going on but it sounds like a problem with my system.  Also I noticed the png's are at the resolution of 352x224 and not 704x480.  Not sure if this is right or not. I have been using the mame.90 exe that I downloaded a couple of days ago.  Maybe I will try downloading again.
Title: Re: MAME Movie Maker released
Post by: Silver on January 26, 2005, 01:27:34 pm
I am not sure what is going on but it sounds like a problem with my system.  Also I noticed the png's are at the resolution of 352x224 and not 704x480.  Not sure if this is right or not. I have been using the mame.90 exe that I downloaded a couple of days ago.  Maybe I will try downloading again.

Not sure about the missing 6 pngs (sounds odd - unless your system has a delay when creating the dir??? or if the dir is already made - it does sound odd.) But don't worry about the resolution - there are loads of games where mame reports its big, but the *actual* screen is smaller.  Not sure why...
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 26, 2005, 02:19:54 pm
That was a typo. :)
Title: Re: MAME Movie Maker released
Post by: Popcorrin on January 26, 2005, 02:52:59 pm
I just downloaded the .90 binary again and replaced only the exe and everything seems to be working much better now.  I tried columns97 again and I did not get the error.   

I noticed something strange though. I opened up the snap directory and the first six pngs were there.  I noticed that the resolution of the 1st six pngs were at the resolution of 320x224 and then png's 6-1174 were at the resolution 352x224 and the remainder of the pngs were at the 704x480 resolution.
 Before when I had the problems the first six pngs would not be in the snap directory if I stopped the movie somewhere between frames 6-1174.  If I stopped the movie between 1174-10000 then frames 0-1174 would be missing.  Not sure what would be causing this.

One last question.  With the new binary what do I want to have the moviecompression set to?  If possible it might not hurt to see all of your settings in the mame.ini.  There are alot of new options in there.  Not sure what moviethreshold is for either?

Thanks!
Title: Re: MAME Movie Maker released
Post by: Popcorrin on January 26, 2005, 02:59:01 pm
Update:  I spoke too soon.  Vdub ended up choking on columns 97.  It said it had to do with the difference in resolutions between the 1st image and image 1175.
Title: Re: MAME Movie Maker released
Post by: Popcorrin on January 26, 2005, 03:16:13 pm
I got to thinking.  It must not be detecting the loop then, because I think in a previous post you stated that the resolution changes usually aren't a problem as they are not part of the loop.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 26, 2005, 03:24:25 pm
Update:
Title: Re: MAME Movie Maker released
Post by: Popcorrin on January 26, 2005, 09:47:16 pm
Okay, sending it now.  Thanks.
Title: Re: MAME Movie Maker released
Post by: Silver on January 27, 2005, 07:38:19 am
Incidentally - hope I'm not confusing things - but I've just run colmns97 through and it found a loop and made a nice video no problem. This is with standard settings, using Buddabings own mame 0.89 compile dated 11th Jan 2005. Not sure if that means the error is in 0.90 only or is something else......

EDIT: A rerun with identical settings with the latest 0.90 (your build) produces the " image 1248 resolution (704x480) does not match the 1st image (302x240)" error in vdub. Looks like the resolution work around is not overwriting the earlier png's in the newer build?
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 27, 2005, 08:24:35 am
Incidentally - hope I'm not confusing things - but I've just run colmns97 through and it found a loop and made a nice video no problem. This is with standard settings, using Buddabings own mame 0.89 compile dated 11th Jan 2005. Not sure if that means the error is in 0.90 only or is something else......

EDIT: A rerun with identical settings with the latest 0.90 (your build) produces the " image 1248 resolution (704x480) does not match the 1st image (302x240)" error in vdub. Looks like the resolution work around is not overwriting the earlier png's in the newer build?

When I added the moviesnap_directory parameter, it broke the resolution change detection code. I'll fix it today.
Title: Re: MAME Movie Maker released
Post by: rerstad on January 27, 2005, 09:23:42 am
Great! I ran it all last night and the only error I got was in vdub when the resolution changed (I also changed batch.bat to clearly delete the files in moviesnp after making each movie--that file was getting so big cumulatively that it would take forever for me to even open it, deleting the files seems to have helped some (of course, it could just be me)).
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on January 27, 2005, 01:16:30 pm
since you asked for examples, some games that don't detect for me

64th street

arabian fight

(virtually the entire "fighter" genre as filtered by the catver)

I'm still thinking that the transition method of many games is what is killing the loop detection code.

Let me give you some examples:  (no I haven't tested these games with the movie maker, they are just examples)

Robocop....  it has a startup cinematic sequence in which the screen is wiped a very very dark grey (It looks black if you aren't paying attention) 4 distinct times.  Then it has a random bit of gameplay in the attract mode, and again, at the start and the end of this sequence, there's another grey wipe, creating at least one solid grey frame. 

Nearly every kof game (bah!!!)  has a seizure-enducing intro that contains several solid color wipes (mostly black and white).  They occur enough times that the code would get confused. 

If it were a few isolated games, then I wouldn't mention it, but sadly nearly every game produced from 1991 on has these type of screen transitions. 


The only way I can think to fix this issue is to somehow check the frames and make sure they aren't a solid color field, rejecting any loops between solid color frames.  Where pngs aren't palletted though, I have no clue how you would do it quickly and accurately enough.   The only thing I can think of is the file size.  The fewer the colors an image has, the smaller it is. 

Sorry I can't think of a solution.  I guess knowing why it isn't working is better than nothing though.  :)


Title: Re: MAME Movie Maker released
Post by: rerstad on January 27, 2005, 02:35:34 pm
Oddly enough, despite any other problems I've had running this, mine produced a movie for Arabian Fight last night.  I haven't looked at it to see what's in it, I just remember seeing it run and know that it completed, so it must have detected. . . .
Title: Re: MAME Movie Maker released
Post by: sWampy on January 27, 2005, 03:39:55 pm
Didn't someone say there was a database of start/end frames for games?
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 27, 2005, 03:53:40 pm
I have uploaded a new executable which should correct the resolution change. I'm creating a video now for colmns97. It looks fine so far. It's taking forever. More than an hour to generate the pngs and another hour for the encoding. But, it detected the demo loop perfectly.

Howard: Thank you for your examples. I've never played any of those games so I don't know anything about their graphical
transitions, but I'll take a look at them.

Swampy: There is such a database. I probably could integrate that start-stop thing with this code. Maybe a movieloops 2 option would use that file.....

Rerstad: I believe Howard was referring to the loop detection, not it making a movie. I haven't looked at those movies either, but they probably run into the max frame limit.

EDIT: The problem with the file (provided by 2600 on the first page of this thread) is that it has the starting frame of the movie but not the end frame!
Title: Re: MAME Movie Maker released
Post by: donnyj on January 28, 2005, 12:52:11 am
question about cbnj, it creates a 44 byte .wav file that can't be played so virtualdub errors out, please confirm???

edit: seems to create correct wav file after the countdown finishes, but what about before (i.e. 10,000 or less frames?)
Title: Re: MAME Movie Maker released
Post by: vibez on January 28, 2005, 04:43:19 am
how do you make listgen create the makemovies.bat. All I'm getting is  a listxml.txt & output.txt
Title: Re: MAME Movie Maker released
Post by: rerstad on January 28, 2005, 06:47:20 am
The latest build of v.90 seems to have taken care of all of the problems.  I've been running it for about 14 hours straight with no errors and no stops.  I haven't looked at each movie, but it keeps plugging away . . . .
Title: Re: MAME Movie Maker released
Post by: vibez on January 28, 2005, 07:24:18 am
I'm getting a 'error creating directsound: 887800a' message. any ideas what this for?
Title: Re: MAME Movie Maker released
Post by: Silver on January 28, 2005, 09:08:56 am
I'm getting a 'error creating directsound: 887800a' message. any ideas what this for?

Is this an error from mame or virtualdub?

can you run the game normally with mame? (just type 'mame romname' at the command line)
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 28, 2005, 09:34:39 am
how do you make listgen create the makemovies.bat. All I'm getting is  a listxml.txt & output.txt

Edit your listgen.ini file so that you have:
frontend moviebatch
output makemovies.bat

Or:
listgen -frontend moviebatch -output makemovies.bat

You must have a filter.sql and the mamepath field in listgen.ini must be valid.

For your sound issue, try -movieaudio 0 and see if that makes any difference.

That 'error creating directsound' error is a MAME error.

HTH,
Buddabing
Title: Re: MAME Movie Maker released
Post by: Lilwolf on January 28, 2005, 01:49:20 pm
Ok, this is probably a pretty stupid question / suggestion.

but wouldn't it be easier to scrap the loop detection and add a key for start / stop... Then record all new changes to a file......

Then have a setting to import new save files...

IE, everyone who uses it does the start/stop to 100 games (an hour)... get 20 people doing it and you could have all games start / stop time / frame... And then just do it...

I think the loop detection is pretty !@# sweet...  but the number of exceptions also seem pretty high...
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 28, 2005, 05:41:47 pm
Ok, this is probably a pretty stupid question / suggestion.

but wouldn't it be easier to scrap the loop detection and add a key for start / stop... Then record all new changes to a file......

Then have a setting to import new save files...

IE, everyone who uses it does the start/stop to 100 games (an hour)... get 20 people doing it and you could have all games start / stop time / frame... And then just do it...

I think the loop detection is pretty !@# sweet...
Title: Re: MAME Movie Maker released
Post by: donnyj on January 28, 2005, 08:30:02 pm
Great idea, I am willing to participate HEAVILY.  I have another suggestion.  Pick a desired frame # per game and it will save a "title" snap.  The existing ones (for snap, title, etc.) seem terrible quality and several haven't been updated, so they just show the old non working screen (i.e. colorbars).

----

separately:

Aquarush seems really odd to me.....,  the command line SAYS 640x480, but it displays and take snaps at 640x240.  (Smashed) ????  If it is a mame problem, then a resize command needs to be added to virtual dub???


AWESOME PROJECT, I am working hard on my end breaking it and seeing how it works...  Would GLADLY contribute within my realm of abilities (i.e., no programming)
Title: Re: MAME Movie Maker released
Post by: donnyj on January 28, 2005, 11:29:24 pm
ok, this will be more difficult than I first thought  :(

Will have to pick the frame numbers from the PNGs, NOT from the AVI's correct?

Also, is ???00000.png  frame 1 or is ???00001.png?

What is the prefererred video?  Just the attract sequence (before or after stuff like "NEO GEO" logo)?  Or is it from power on until it starts to repeat back to some point again?  In other words, until it starts to actually repeat?

Or do you wait for a repeat and start from there until it repeats again?

Title: Re: MAME Movie Maker released
Post by: Buddabing on January 28, 2005, 11:43:09 pm
ok, this will be more difficult than I first thought
Title: Re: MAME Movie Maker released
Post by: donnyj on January 29, 2005, 03:14:23 am
Ok, I am starting from ZZYZZYX and moving towards A

Noting, start, stop, and title frames


My hope is that when i have this list, I can feed it back into MMM and it will return the AVI's.... ?

Because right now, I am just creating pictures only, skipping both audio and avi creation.....

Definately a slow and tedious process  ;D
Title: Re: MAME Movie Maker released
Post by: Silver on January 29, 2005, 05:39:45 am
Hey good plan - keep posting with your progress to make sure people don't repeat work....

Also, it may be worth establishing some guidelines about where to start stop attracts - eg some games have a several minute loop - should you take it all or just a shorter attract? etc..etc...

I suggest you save your work in a simple csv txt file with something like:

romname,startframe,endframe
romname,startframe,endframe.....

to make it nice and easy to use/merge later on.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 29, 2005, 10:47:55 am
Hey good plan - keep posting with your progress to make sure people don't repeat work....

Also, it may be worth establishing some guidelines about where to start stop attracts - eg some games have a several minute loop - should you take it all or just a shorter attract? etc..etc...

I suggest you save your work in a simple csv txt file with something like:

romname,startframe,endframe
romname,startframe,endframe.....

to make it nice and easy to use/merge later on.

Agreed. Unless anyone has any objections, I'll modify ListGen to read this CSV and spit out a new batch file which will call batch.bat with the start and end frames, if they are in the CSV, or with the original parameters, if not.

This requires adding some % parameters to batch.bat: a movieloops parameter (1 or 2 depending on if the game is in the CSV), a moviestartframe parameter, and a movieendframe parameter.

Donny - I would suggesting starting with the games in the ssf.txt file and working backwards like you are doing.

Regards,
Buddabing
Title: Re: MAME Movie Maker released
Post by: Silver on January 29, 2005, 11:38:09 am
In case anyone missed it I've cleaned up and put the new ssf.txt file on my website in the format:

romname,startframe,endframe

there are no endframes yet (obviously) as this was only used to identify end-of-bios points.

Its worth checking these points, and it is an old file so there is a (slim) chance that some of the romnames may have changed slightly...

Cleaned up file: http://www.silverfoxy.plus.com/ssf-csv.txt

Original file: http://www.silverfoxy.plus.com/ssf.txt

I'll happily host updates as people work through the games.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 29, 2005, 12:07:41 pm
For anyone looking to find start and end frames, I have a tool I find extremely useful.

It's called I-fun viewer from Xequte Software:

Here's a link to download (http://www.xequte.com/other/index.html#ifun)

It shows a scrolling list of thumbnails of the png snapshots, with the currently selected snapshot shown larger. It can scroll through hundreds of images very quickly.

I highly recommend it, and the price is right.
Title: Re: MAME Movie Maker released
Post by: 2600 on January 29, 2005, 01:12:36 pm
Hey good plan - keep posting with your progress to make sure people don't repeat work....

Also, it may be worth establishing some guidelines about where to start stop attracts - eg some games have a several minute loop - should you take it all or just a shorter attract? etc..etc...

I suggest you save your work in a simple csv txt file with something like:

romname,startframe,endframe
romname,startframe,endframe.....

to make it nice and easy to use/merge later on.

I see you all are still hard at work. Great work all of you. Since these are attract mode movies, I vote for the whole thing.   Seems much more official that way.  This would mean several loops for some games.
Title: Re: MAME Movie Maker released
Post by: Silver on January 29, 2005, 01:45:38 pm
I vote for the whole thing.   Seems much more official that way.  This would mean several loops for some games.

I'm in..... ;D

People can always change the file to individual taste, but we can have an offical file for people to start with....

Title: Re: MAME Movie Maker released
Post by: donnyj on January 29, 2005, 11:05:53 pm
suggestions for listgen:

put the default makemovies.bat "script" in the filters.sql file as an example

do the syntax checking BEFORE loading all the data files (so errors bomb out faster)

question:

how would I reverse the sort order?  for example, sort by year in reverse?
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on January 30, 2005, 02:36:29 am
I didn't think the problem was detecting unique frames, MMM probably does something similar (haven't looked at the code). The problem is that there can be 2 identical frames even though the loop isn't finished, such as a fully black frame during a "fade to black".
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on January 30, 2005, 09:03:50 am
I didn't think the problem was detecting unique frames, MMM probably does something similar (haven't looked at the code). The problem is that there can be 2 identical frames even though the loop isn't finished, such as a fully black frame during a "fade to black".

close.... the detector has some common sense built in if I'm reading the code properly, so a single fade to black won't screw it up.  Unfortunately two or more fades to black (or any color for that matter)  will, and since many games do this we are kinda screwed at this point.  :(
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 30, 2005, 04:41:22 pm
suggestions for listgen:

put the default makemovies.bat "script" in the filters.sql file as an example

do the syntax checking BEFORE loading all the data files (so errors bomb out faster)

question:

how would I reverse the sort order?  for example, sort by year in reverse?

Are you talking about syntax checking in the SQL? I might implement something like a "-sqltest" option. Do you really think that's worth the effort it will take?

Reversing the sort order is done with "order by":

select * from gamedata
   order by year desc;

For ascending order use "asc"

select * from gamedata
   order by year asc;

Some of the years are missing so you will have modern games at the end of the descending order list.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 30, 2005, 04:48:27 pm
I didn't think the problem was detecting unique frames, MMM probably does something similar (haven't looked at the code). The problem is that there can be 2 identical frames even though the loop isn't finished, such as a fully black frame during a "fade to black".

Fades to black aren't a problem. If you change the -moviethreshold value, fades to dark gray won't be a problem either.

Fades to a non-black color will cause the loop detection to trigger on the second fade.

I could try figuring the max and min pixel value of each image, and not triggering loop detection if the difference between max and min is less than -moviethreshold. This will prevent a false loop detect of all solid colors where the color is the same, at the cost of considerably more calculation.

When I looked at at Robocop, the movie looped at the high score list. For kof94, you can see the "credit 00" at the beginning and end of the movie on an otherwise black screen. On 64th street, the loop detection happens when the dialogue between the two characters is blanked out, the screen is not blank then.

Kof94 and 64street may be improved by increasing the -minmovielength parameter. Otherwise, someone can go and manually get the start and end frame and generate a movie from that.

The coding is complete on the next version which will have the -moviestartframe and -movieendframe parameter. Using those parameters may make the movie making process a bit faster.

Now I have to go and port everything over again now that .91 is out.

Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on January 30, 2005, 05:54:32 pm
Now I have to go and port everything over again now that .91 is out.

I could spend my entire spare time upgrading rather than playing if tried to keep up with MAME. In fact the only reason I upgraded from 0.88 is MMM, now I may have to do it again? Aaarg!
I haven't looked at the code and patches so I'm not sure if I can keep up with MMM by diffing the code or I'm better off upgrading to 0.91 when you release MMM for 0.91.

I guess I could probably jsust upgrade MAME itself without worrying about keeping the ROMS, screenshots, flyers, etc... in sync with the MAME version, since that's where I spend 99% of the upgrade time.
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 30, 2005, 10:06:44 pm
Now I have to go and port everything over again now that .91 is out.

I could spend my entire spare time upgrading rather than playing if tried to keep up with MAME. In fact the only reason I upgraded from 0.88 is MMM, now I may have to do it again? Aaarg!
I haven't looked at the code and patches so I'm not sure if I can keep up with MMM by diffing the code or I'm better off upgrading to 0.91 when you release MMM for 0.91.

I guess I could probably jsust upgrade MAME itself without worrying about keeping the ROMS, screenshots, flyers, etc... in sync with the MAME version, since that's where I spend 99% of the upgrade time.

Yeah, I hear you, which is one reason my cab still runs 0.78.

It turns out that the key file that most of the MMM code is in (common.c) didn't change from version 0.90 to 0.91. So it will be very simple to port MMM. The interface code to CPMaker is in artwork.c, which didn't change either.

Long story short, look for "BuddaMAME" v0.91 very soon.
Title: Re: MAME Movie Maker released
Post by: donnyj on January 30, 2005, 11:29:53 pm
suggestions for listgen:

put the default makemovies.bat "script" in the filters.sql file as an example

do the syntax checking BEFORE loading all the data files (so errors bomb out faster)

question:

how would I reverse the sort order?
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 31, 2005, 12:23:48 pm
I have uploaded a new version of MMM which supports the -moviestartframe and -movieendframe parameters.

When using -moviestartframe and -movieendframe, MAME ran at 38.5 fps when capturing the frames for defender. Using the original loop detection, MAME ran at 34.7 fps. That's about 10% faster, your mileage may vary.

They've changed the compile environment so that version 0.91 of MAME won't compile anymore on my machine. So MMM 0.91 will be delayed somewhat.

Title: Re: MAME Movie Maker released
Post by: Silver on January 31, 2005, 12:36:50 pm
I've been playing around a fair bit with png's and mng's recently. I was wondering if it is easy to alter the zlib compression level used when mame creates a png image?
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 31, 2005, 02:14:31 pm
I've been playing around a fair bit with png's and mng's recently. I was wondering if it is easy to alter the zlib compression level used when mame creates a png image?

Yes, in fact I did so when I was investigating calculating the MD5 from the image data instead of the image file.

Here is the relevant code from png.c:

int png_deflate_image(struct png_info *p)
{
   unsigned long zbuff_size;

   zbuff_size = (p->height*(p->rowbytes+1))*1.1+12;

   if((p->zimage = (UINT8 *)malloc (zbuff_size))==NULL)
   {
      logerror("Out of memory\n");
      return 0;
   }

Title: Re: MAME Movie Maker released
Post by: Silver on January 31, 2005, 02:40:31 pm
aha thanks... I presume the default is around 5?

If its no hassle to you, it would be very handy (to me) if you could add an option as described - in particular both disabling the compression completely (uncompressed png's - large I know) and max compression.

My compiling environment for mame is still out of data from the last time they updated.... need to sort that!
Title: Re: MAME Movie Maker released
Post by: Buddabing on January 31, 2005, 03:33:29 pm
aha thanks... I presume the default is around 5?

If its no hassle to you, it would be very handy (to me) if you could add an option as described - in particular both disabling the compression completely (uncompressed png's - large I know) and max compression.

My compiling environment for mame is still out of data from the last time they updated.... need to sort that!

Okay, done.

-moviecompression now reflects compression used in the zlib. Allowable values are -1 (default, which is currently 6 but is the system's compromise between speed and compression) or 0-9.
0 = no compression
1 = fastest
9 = best compression

I ran a quick test on defender with -moviestartframe 222 and -movieendframe 888. A proper test would make many more png images of several different games.

X       fps          png size
-1     42.93      6799933
0      45.08      18014856
1      43.51      6851916
2      42.33      6850810
3      43.88      6850060
4      43.21      6814655
5      42.67      6809736
6      43.45      6799933
7      40.98      6799592
8      43.02      6793833
9      23.46      6787289

Don't know why -1 and 6 took different amounts of time.
Title: Re: MAME Movie Maker released
Post by: Silver on January 31, 2005, 05:46:52 pm
Thanks for that, much appreciated!
Title: Re: MAME Movie Maker released
Post by: 2600 on February 02, 2005, 02:34:40 pm
Just a note, but the original ssf.txt was used for an entirely different purpose so use it as a guide not an absolute truth.

That being said I'm not having much of a problem with loop detection for the most part.  Any that happen to not get detected or detected incorrectly, I change the minmovielength and sometimes the maxmovielength and the loop is detected no problem.  Not a big fighter fan, but just did the KOF series and MK series and verified the loop was detected properly with no problem.  Will try the others mentioned above.  Recently, I've been running the batch and then outputting the messages to a txt file.  With some creative search and replace or a script you get the romname,startframe,endframe.

Silver, do you still want to maintain the list?  Is PMing you the results ok or would you rather have it sent to another address.
Title: Re: MAME Movie Maker released
Post by: Silver on February 02, 2005, 06:48:33 pm
Just a note, but the original ssf.txt was used for an entirely different purpose so use it as a guide not an absolute truth.

Yes I knew that - I was using the ssf for its oringinal purpose, but thought it would make a good starting point!

Quote
Recently, I've been running the batch and then outputting the messages to a txt file.  With some creative search and replace or a script you get the romname,startframe,endframe.

Execellent - I was actually going to post and suggest this, especially if you are going to the trouble of adjusting the settings for some games. Most of the work for this can be done by 'BuddaMame' and just thoses that are problematic manually. If you've saved all the vdb files or messages, thats fantastic - you can just zip them up and email if thats easier, or Pm'ing is fine.
I've actually thrown together a Mysql database on the web with all the 0.91 roms - partually just for the learning experience for sql/php - although I currently have a nasty "No OS" situation so thats not up and runnning yet.

Quote
Silver, do you still want to maintain the list?  Is PMing you the results ok or would you rather have it sent to another address.

Basically yes, in anyway you like, to Silver@silverfoxy.plus.com

Thanks
Title: Re: MAME Movie Maker released
Post by: donnyj on February 02, 2005, 08:30:56 pm
After making 50 or so movies, I have decided that manually is DEFINATELY not the way to go  :'(

Even if you ignore the time and frustration of doing it manually, there is the much bigger concern that I have that running the same game from different versions is going to create a slightly different loop.  I believe the best way to go would be to improve the loop detection and possibly adding some kind of hinting system.

For example, rather than absolute frames, if a correct loop could be detected by changing the min and max settings, etc. then record those...

I am definatly looking forward to the .91 update  ;)

Also, there HAS to be a way to create much smaller .AVI files without sacrificing quality???   Some codec that takes into account limited colors being used or something?  How much affect does using cartoon mode on XVid, etc. ?
Title: Re: MAME Movie Maker released
Post by: Silver on February 02, 2005, 09:20:16 pm
After making 50 or so movies, I have decided that manually is DEFINATELY not the way to go  :'(

Even if you ignore the time and frustration of doing it manually, there is the much bigger concern that I have that running the same game from different versions is going to create a slightly different loop.  I believe the best way to go would be to improve the loop detection and possibly adding some kind of hinting system.

For example, rather than absolute frames, if a correct loop could be detected by changing the min and max settings, etc. then record those...

Seems like to be the consensus - it also seems that the loop detection currently does rather well. We can build a database automatically from this, then as people work through them make changes manually. Once 1 person has done it, everyone can then do it first time....

Quote
Also, there HAS to be a way to create much smaller .AVI files without sacrificing quality???   Some codec that takes into account limited colors being used or something?  How much affect does using cartoon mode on XVid, etc. ?

Havn't thought about this for a while. Forgot about it once it was all up and working.... Because of the annoying way that virtualdub sends config data to the encoder, settings have to be hard coded (ie Buddabing can't just add an option to let you set any bitrate).

Currently Xvid is configured to do a "quality based" encode. That means that it alters the bitrate as required to keep to the quality at a certain level. This is the best way of encoding a bunch of very different videos - eg if we had a fixed bitrate it would probably be hopelessy over-the-top for something lo-res like missle command, but make really ugly videos for something complex and hi-res like coolboarders.

The current "quality level" is generous and it  makes (IMHO) high quality videos (You can play them back full-screen, and they look good).  Its possible to alter the setting, or perhaps add "options" like  low/medium/high quality but it would mean more work and some ugly copying/pasting for Buddabing. Not sure what he feels - if he agrees then I can try out a few settings and post him the changes.

However, if you wish as a workaround you can compress them however you want: set the movievideo option to 0 (no compression) and then you can use Virtualdub to recompress this using whatever video codec you like. Note the uncompressed videos will be *massive* until you compress them.

NB you could also try using the DivX (movievideo=1)  or cinepak (movievideo=2) options. I do not know what settings the divx is set to. I would suggest that the cinepak is of a much lower quality, and therefore maybe smaller.

Also - is it the overall size of so many videos that is too big, or are there particular files that are much bigger? Could you list them if so?
Title: Re: MAME Movie Maker released
Post by: donnyj on February 02, 2005, 10:28:46 pm
overall the movies are too big, IMHO.

The way virual dub does the codec settings is a major limitation.

I am hoping to use the AVI's as an "animated gif with sound"....  Picture a mame FE that has tabs for titleshot, marquee..., attract avi....

The quality-based is the best way to go because of changing resolutions also...

Is the MP3 encoding quality-based as well?  Is there an easier way to add the new codec string to the source without manually breaking the lines and adding quotes?
Title: Re: MAME Movie Maker released
Post by: Silver on February 03, 2005, 06:42:43 am
I forgot to add that obviously you can just alter the source and include any settings you like - this may be your best solution. (Just make a 'job' with the settings you want in Vdub, and replace the equivalent lines in the Source where it builds the job file.)

If you after something really small like an animated gif this may be your best bet. You could add resize filters to chop the image size right down too.

MP3 - no this is just a constant bitrate. Can't remember what bitrate it is, but its not that high (and doesn't need to be). I don't believe you will gain much size improvement by changing the sound compression, its relatively irrelevant compared to the video.

To add a new codec I would choose one you don't want - eg divx - and just place your own vdb file settings over that so you can use your own.

I will look to see if there are other ways of configuring encoders (such as a config file).
Title: Re: MAME Movie Maker released
Post by: 2600 on February 03, 2005, 08:36:55 am
I guess I'm in the minority in thinking that Budda has already done a damn fine job.  I just hate to see his time wasted with more and more options, although it really is up to him. 

Even with this database setup with all the hints or exact frames people are still going to complain because they have to do a little work.  Those people are only going to be happy when we can provide a torrent with everything already done for them (Of course they will complain about size, but they are many programs that can recompress them better for us to maintain the Higher Quality for those that appreciate it).  So maybe after we get everything set up a bit more, we could provide a torrent, possibly a DAT.


Silver, SSF comment was targeted more generally for those that didn't know what SSF was and was wondering why there may be differences from the SSF.txt file I posted and what they see from the loop detection.
Title: Re: MAME Movie Maker released
Post by: Lilwolf on February 03, 2005, 08:49:58 am
Ok, I haven't been able to look after the start/end frame post... but it looks like some real great progress..

Question...

Will it ignore roms if you already have an attract movie for it?  So you can rerun an updated batch file that has additions... and only do the new ones?  (ie, make it just exit right away if one exists)?

Would it be worth distributing a single batch file with both autos and start / end  in file.  It seems like it would be pretty cool to have all the games that the auto works fine.  So in the end the start/end is only used for the problem cases.

I really wish I had some more time at home to play with this! 

Thanks for all the work!

Title: Re: MAME Movie Maker released
Post by: 2600 on February 03, 2005, 09:04:14 am
lilwolf,
Budda has updated the first post with instructions, in it he list's a sample batch.bat that checks for existing avi's and doesn't make an attract movie if it exists.
Title: Re: MAME Movie Maker released
Post by: Popcorrin on February 03, 2005, 09:11:41 am
I guess I'm in the minority in thinking that Budda has already done a damn fine job.
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 03, 2005, 10:11:38 am
Ok, I haven't been able to look after the start/end frame post... but it looks like some real great progress..

Question...

Will it ignore roms if you already have an attract movie for it?
Title: Re: MAME Movie Maker released
Post by: Silver on February 03, 2005, 10:48:13 am
I guess I'm in the minority in thinking that Budda has already done a damn fine job.  I just hate to see his time wasted with more and more options, although it really is up to him.
Quote

Great point. I agree strongly.

Quote
Even with this database setup with all the hints or exact frames people are still going to complain because they have to do a little work.  Those people are only going to be happy when we can provide a torrent with everything already done for them (Of course they will complain about size, but they are many programs that can recompress them better for us to maintain the Higher Quality for those that appreciate it).  So maybe after we get everything set up a bit more, we could provide a torrent, possibly a DAT.
Quote

Agreed again. I'm realising that any stuff not to do with detecting loops and and such is pretty much bug-free, and is now down to personal preferences.

Quote
Silver, SSF comment was targeted more generally for those that didn't know what SSF was and was wondering why there may be differences from the SSF.txt file I posted and what they see from the loop detection.

Aha excellent....!
Title: Re: MAME Movie Maker released
Post by: Silver on February 03, 2005, 11:01:04 am
I am changing ListGen to read the "ssf" file (which needs to have the end frame on it) and generate a new makemovies.bat with the -moviestartframe and -movieendframe. The games with no entry in the ssf file will generate movies with normal loop detection.

Excellent work Buddabing - again...

Quote
I agree that the start and end frame should be used first for the problem movies.

I would prefer not adding a new video codec, since a highly compressed or reduced AVI can be produced by changing the -resolution parameter or by using external software. But I would not be totally opposed to it.

With a little extra work, people can make avi's of any type to suit there preference. So maybe best to not overdo it for now?

The only other option I would suggest is to import an external txt file for people to use their own settings. This may be more hassle than its worth as you still have to incorporate the work-around filters, but you could make a generic external settings file and remove all the movieaudio/movievideo options from your mame.
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 03, 2005, 11:12:18 am
Quote

The only other option I would suggest is to import an external txt file for people to use their own settings. This may be more hassle than its worth as you still have to incorporate the work-around filters, but you could make a generic external settings file and remove all the movieaudio/movievideo options from your mame.


Good idea. -movievideo 4 can be "roll your own". Instead of preset or hard-coded SetCompression and SetCompData, it will read a file and copy the file contents into the .vdb file. That way, people can put in whatever codec they want. If they want to change something in the .vdb file other than the video compression, they can run a sed script on the vdb file before virtualdub is run.
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 03, 2005, 12:01:04 pm
Okay,

My latest version of ListGen is ready. Get it here (http://cpmaker.mameprojects.com/files/LISTGEN.ZIP).

This version implements preliminary support for Dragon King game lists. Use -frontend dk to create a game list. Final support will have to wait until the final version of DK is released.

Another new feature is support for a new way of generating MAME movies. If you have a comma-delimited file named "ssf.txt" in the same directory as ListGen, it will try to parse it into rom name, start frame, and end frame. Then it will pass the parameters into each call to batch.bat.

You'll need to modify your batch.bat to add -movieloops %3 -moviestartframe %4 -movieendframe %5 to your call to MAME in batch.bat. I updated the first page of this thread to reflect thus.

There are a few new filter fields. Most notably, you can do a select * from gamedata where movieloops='2'; which will generate a makemovies.bat to only create movies that have entries in the ssf.txt. See filter.sql for documentation.

I am now shifting my attention to porting "BuddaMAME" over to version 0.91 of MAME.
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 03, 2005, 06:03:33 pm
Hello,

I have made a small change. I've implemented -movievideo 4 as discussed above.

When -movievideo 4 is set, the program looks for a file named codec.dat in the current directory. It copies the contents of the file, verbatim, into the active .vdb file. All you need to have in the codec.dat is the Video.SetCompression and the Video.SetCompData lines that are to go into the .vdb file.

EDIT: The file needs to be named vcodec.dat.

It should be fairly easy for an experienced VirtualDub user to create a .jobs file and pull the relevant parts out to put into the codec.dat file.

Donny: if you can't get your animated-gif size movies to work, let me know. Also, I can make a custom -movieaudio similar to this custom -movievideo if need be.

Regards,
Buddabing
Title: Re: MAME Movie Maker released
Post by: donnyj on February 03, 2005, 08:38:48 pm
Thank you for mode 4!!!!!
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 03, 2005, 11:15:16 pm
Thank you for mode 4!!!!!  I must have mis-represented myself (no surprise, I do it often).  I meant "like an animated .gif"  Is it possible to do an actual animated gif that big (long)?

I was trying to say that I want a screenshot-sized avi.  I have no desire to play them full-screen etc.

There has gotta be a better codec that takes into account the fact that there is a very limited color count compared to an actual movie.  I believe that AVI is the right container though!  I don't understand how many of the AVIs are bigger than the actual .PNG files???  Shouldn't it just be encoding the changes and a keyframe every so often?


I don't know. Silver may be able to answer that.

Quote
Keep up the great work!!!!   As for me, yes I would love the availability of external audio codec info...  No need for a 2 minute clip to contain 1/2 meg of audio when the audio is blank...  OGG Vorbis is nice but it doesn't work well in an AVI format...  Although external audio files would work nicely with FE's that play sound clips too.......   I digress....


Adding -movieaudio 2 should be trivial. I'll do that asap.

Quote

I'll probably regret asking, but what FE's work well with the AVIs?


Attract videos are currently supported by 3d Arcade, Mamewah, Dragon King, Kymaera and Ultrastyle. I'm writing my own front end (creatively titled QFront) which will also support the attract videos.
Title: Re: MAME Movie Maker released
Post by: Silver on February 04, 2005, 08:18:18 am
There has gotta be a better codec that takes into account the fact that there is a very limited color count compared to an actual movie.  I believe that AVI is the right container though!  I don't understand how many of the AVIs are bigger than the actual .PNG files???  Shouldn't it just be encoding the changes and a keyframe every so often?

Hi,

Well first thing to remember is that the png's themseleves are all individually compressed. And a lot of older games - with lots of 'black' on the sceen, happen to compress quite well as pngs.

The avis are encoded as a keyframe + changes (IPB frames) and to be honest are designed for more complex media ie films. You will find that some of the more complex hi-res games have larger pngs than avis. (And don't forget the audio too. In almost all cases pngs+wav is bigger than the avi).

Also, you could compress the avis a lot more and they will look fine. Which you can now do with option 4.....
Title: Re: MAME Movie Maker released
Post by: Silver on February 04, 2005, 08:25:49 am
@Buddabing

This may be irrelevant now you have already introduced an option to load the video/audio compression externally.... But just in case:

The newest version of Vdub (1.6.3 - not sure about 1.6.2) can pass some paramaters from the command line into the script. So for example, if you included the line:

VirtualDub.audio.SetSource(VirtualDub.params[0]);

in the script, you can pass the audio filename from the command line:

vdub /i "settings_with_audio.vcf" <audio.wav> /p <in> <out> /r /x

where <in> can be the first png in the sequence and <out> is the avi.

Obviously this does not solve the other issues that require script adjustment, so you are probably best off leaving it as you are now...

The author of Vdub, Avery Lee, kindly informed me of the above.
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 04, 2005, 08:43:48 am
@Buddabing

This may be irrelevant now you have already introduced an option to load the video/audio compression externally.... But just in case:

The newest version of Vdub (1.6.3 - not sure about 1.6.2) can pass some paramaters from the command line into the script. So for example, if you included the line:

VirtualDub.audio.SetSource(VirtualDub.params[0]);

in the script, you can pass the audio filename from the command line:

vdub /i "settings_with_audio.vcf" <audio.wav> /p <in> <out> /r /x

where <in> can be the first png in the sequence and <out> is the avi.

Obviously this does not solve the other issues that require script adjustment, so you are probably best off leaving it as you are now...

The author of Vdub, Avery Lee, kindly informed me of the above.

Hi Silver,

Does he know about the crash when the sequence of uncompressed pngs is used? Was it fixed in 1.6.3?

Some users may want to use uncompressed pngs via -moviecompression 0 -movievideo 0 to generate the highest quality video possible, then compress it themselves later on. As of version 1.6.2, Vdub crashes when this is selected.
Title: Re: MAME Movie Maker released
Post by: donnyj on February 04, 2005, 09:35:26 am
Thank you Silver and Buddabing for explaining the technical sides to me!!!
Title: Re: MAME Movie Maker released
Post by: Silver on February 04, 2005, 09:40:19 am
Hi Silver,

Does he know about the crash when the sequence of uncompressed pngs is used? Was it fixed in 1.6.3?

Some users may want to use uncompressed pngs via -moviecompression 0 -movievideo 0 to generate the highest quality video possible, then compress it themselves later on. As of version 1.6.2, Vdub crashes when this is selected.

Hi,

1.6.3 still crashes with uncompressed pngs. I've emailed him explaining the error, as well as sending a compressed/uncompressed sample.

Interestingly uncompressing crashtests MNG's to uncompressed pngs (which is an option in advmng.exe advancetool) and using those png's does not cause Vdub to crash).
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 04, 2005, 10:37:37 am
Okay, I have implemented the -movieaudio 2 change (custom) and uploaded a new binary.

To use -movieaudio 2, you need a file called acodec.dat. Put the SetConversion and SetCompression statements in there and have fun. I included the SetConversion because IIRC we were having a bit of trouble getting that to work so Silver hacked that parameter. This way he can experiment with changing the MP3 encoding.

I've also changed -movievideo 4 to use a file named vcodec.dat instead of just codec.dat.

After much wailing and gnashing of teeth, I've finally gotten the basic 0.91 MAME to compile. All I need to do is make sure all my changed code compiles.

Regards,
Buddabing


Title: Re: MAME Movie Maker released
Post by: Silver on February 04, 2005, 12:38:42 pm
Incidentally, if anyone is wondering how to setup these dat files correctly, here's how:

Open Virtualdub manually, open any movie file or png/wav combo (doesn't matter what).

Then make sure you select "Full processing" mode for both audio and video in the menus, then select "Compression" for both. This will pop up a menu  where you can select which codec you want to use, and you will also be able to configure this codec in its own menus exactly how you want it.

Once ready, select "Save avi" from the File menu, and make sure you tick the box "Save this as a job to run later" (or similar). Instead of processing, Virtualdub will save a file called "Virtualdub.jobs" in its home folder. Open this with notepad or similar, and then copy out just the lines that Buddabing mentioned:

VirtualDub.video.SetCompression...
VirtualDub.video.SetCompData...

and paste these into a blank txt file and save it as "codec.dat" and place it in you BuddaMame directory. Exactly the same for the audio, except copy out the lines:

VirtualDub.audio.SetConversion...
VirtualDub.audio.SetCompression...

and save them in acodec.dat.


Hope that helps.
Title: Re: MAME Movie Maker released
Post by: donnyj on February 05, 2005, 02:45:48 am
How's the update to .91 going?  Anything I can do to help?
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on February 05, 2005, 09:51:50 am
Just something I wanted to suggest....

I've noticed that even with compression the bitrate is suprisingly high.  You would be suprised how low you can knock down the bitrate and still have identical picture quality.  Even my near lossless captures I did for the old 3darcade videos had 1/3 the bitrate of the vids the mm makes with any of the compressors.  The reason I mention it is the bitrate acounts for a lot of the file size.  It may be possible to make these vids much smaller without any noticable difference. 
Title: Re: MAME Movie Maker released
Post by: donnyj on February 05, 2005, 10:00:03 am
Just something I wanted to suggest....

I've noticed that even with compression the bitrate is suprisingly high.
Title: Re: MAME Movie Maker released
Post by: Silver on February 05, 2005, 10:13:36 am
Just something I wanted to suggest....

I've noticed that even with compression the bitrate is suprisingly high.  You would be suprised how low you can knock down the bitrate and still have identical picture quality.  Even my near lossless captures I did for the old 3darcade videos had 1/3 the bitrate of the vids the mm makes with any of the compressors.  The reason I mention it is the bitrate acounts for a lot of the file size.  It may be possible to make these vids much smaller without any noticable difference. 

Its a good point. This is especially true of some of the older, simpler games in mame.... As mentioned, the default settings are generous... but now you can "mix your own" everyone should be happy
Title: Re: MAME Movie Maker released
Post by: Silver on February 05, 2005, 10:15:12 am
Any ideas on what quantifiers you used?

I've found that comparing quantizer numbers across different codecs doesn't always match up... but you never know.

The default in mm for Xvid is around 4 (ie high quality high bitrate) and you could make the Target Quantizer a lot higher and have good results, as Howard suggests....
Title: Re: MAME Movie Maker released
Post by: Silver on February 05, 2005, 10:18:51 am
Hi Silver,

Does he know about the crash when the sequence of uncompressed pngs is used? Was it fixed in 1.6.3?

Some users may want to use uncompressed pngs via -moviecompression 0 -movievideo 0 to generate the highest quality video possible, then compress it themselves later on. As of version 1.6.2, Vdub crashes when this is selected.

Avery Lee (author of Vdub) has confirmed that he is found and resolved the crash caused by uncompressed pngs, and the fix will be included in 1.6.4 - the next release...
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 05, 2005, 10:32:55 am
Just something I wanted to suggest....

I've noticed that even with compression the bitrate is suprisingly high.  You would be suprised how low you can knock down the bitrate and still have identical picture quality.  Even my near lossless captures I did for the old 3darcade videos had 1/3 the bitrate of the vids the mm makes with any of the compressors.  The reason I mention it is the bitrate acounts for a lot of the file size.  It may be possible to make these vids much smaller without any noticable difference. 

If you guys want to play around with the settings for Xvid via -movievideo 4, and you think you get settings that would be useful as the default, I'll change the defaults. I just put the code in, Silver did the encoding part of this project.

It would be definitely worth decreasing the bitrate if the playback is better on lower-spec machines with no perceptible loss of image quality.

Look for "BuddaMAME" version 0.91 on Monday.
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on February 05, 2005, 05:01:57 pm
yeah... i think we just need to play around with it a bit more and see the results.
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on February 05, 2005, 06:59:58 pm
Look for "BuddaMAME" version 0.91 on Monday.

Cool!
Title: Re: MAME Movie Maker released
Post by: rerstad on February 07, 2005, 07:14:49 am
I've been running the program, plugging along, cranking out the movies--they're a great addition to the FE. 

However, last night, I kept getting a Virtual Dub Crash Error--"An out-of-bounds memory access (access violation) ocurred in module 'Virtual Dub'".  It appears to have just happened with one rom. 
Title: Re: MAME Movie Maker released
Post by: Silver on February 07, 2005, 08:06:05 am
Hmm, there is a simliar error when using uncompressed pngs. Assuming its only 1 rom, its not your settings.... what rom causes it?
Title: Re: MAME Movie Maker released
Post by: rerstad on February 07, 2005, 09:14:14 pm
I happened with two roms in the last day--"sprint8" and "subs"--neither is too important, but what I've liked is that the app just keeps plugging away without stopping.  These roms, unfortunately, have stopped it.  Once I exit VirtualDub all appears to run fine again.   These are the only two I've stumbled across (so far) going alphabetical through the roms, so hopefully it will be done in the next few days. . .
Title: Re: MAME Movie Maker released
Post by: donnyj on February 07, 2005, 10:09:44 pm
Not sure why, but the new 91 (with u1 patch) and information (Thanks buddabing!!!!) is available here: http://forum.arcadecontrols.com/index.php/topic,31699.0.html
Title: Re: MAME Movie Maker released
Post by: donnyj on February 08, 2005, 06:22:28 am
am I the only one compiling from source from buddabing?

I believe there is an error...


I get:

Compiling src/usrintrf.c...
src/usrintrf.c: In function `handle_user_interface':
src/usrintrf.c:4074: warning: implicit declaration of function `save_movie_snapshot'
make: *** [obj/mamep4/usrintrf.o] Error 1

and it aborts back to the prompt....


When I modify usrintrf.o to say:

#include "ui_text.h"
#include "state.h"
#include "common.h"   /* DonnyJ added this line */

#ifdef MESS
  #include "mess.h"

worked until linking, then caused A LOT of problems!!!  Didn't work =[

so I modified common.h (REALLY have no idea what I'm doing here!)

/* generic NVRAM handler */
extern size_t generic_nvram_size;
extern data8_t *generic_nvram;
extern data16_t *generic_nvram16;
extern data32_t *generic_nvram32;
extern void nvram_handler_generic_0fill(mame_file *file, int read_or_write);
extern void nvram_handler_generic_1fill(mame_file *file, int read_or_write);

/* DonnyJ */
extern int save_movie_snapshot(struct mame_bitmap *bitmap);

/* bitmap allocation */
struct mame_bitmap *bitmap_alloc(int width,int height);
struct mame_bitmap *bitmap_alloc_depth(int width,int height,int depth);
void bitmap_free(struct mame_bitmap *bitmap);

and it "APPEARS" to work....

what's the real solution?

The only change I made to the makefile, is commenting CPMAKER=1 line (never could get cpmaker to compile)
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 08, 2005, 09:26:38 am
am I the only one compiling from source from buddabing?

I believe there is an error...


I get:

Compiling src/usrintrf.c...
src/usrintrf.c: In function `handle_user_interface':
src/usrintrf.c:4074: warning: implicit declaration of function `save_movie_snapshot'
make: *** [obj/mamep4/usrintrf.o] Error 1

and it aborts back to the prompt....


When I modify usrintrf.o to say:

#include "ui_text.h"
#include "state.h"
#include "common.h"
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on February 08, 2005, 10:41:31 am
am I the only one compiling from source from buddabing?

Nope!, I am too (Iike to enable the optimizations for my target CPU, plus it's interesting to look at Budda's code)). I was missingas few pieces that I just got in the other thread, so I should be building this latest version later today.
Title: Re: MAME Movie Maker released
Post by: Silver on February 08, 2005, 01:35:42 pm
I'm compiling mine too, although I spent a while sorting out the compiling tools on Hazes site a couple of releases back - and now its changed again.

Think I will start off again from 0.92....
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on February 08, 2005, 06:44:04 pm
budda... if you are interested... i've been playing around and I think i have a solution for the several fighters that don't get their loop detected properly.

You need to add the option to do a sample check after a possible loop is found.  Try a simple rgb point sample in each corner and in the center.... if the colors all match up... keep going.  This way the loop only detects loops with actual frames, not solid color fields and screen wipes. 

So the loop would start and end with the first frame of the title screen, not the blank wipe before it. 
Title: Re: MAME Movie Maker released
Post by: donnyj on February 09, 2005, 12:00:42 am
Thanks buddabing for helping me fix it!

Thanks everyone else for telling me you compiled from scratch too, was worried I was just making my life hard!!!

Now I'll try making cpmaker, just to punish myself some more!  :laugh:
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 09, 2005, 09:42:40 am
budda... if you are interested... i've been playing around and I think i have a solution for the several fighters that don't get their loop detected properly.

You need to add the option to do a sample check after a possible loop is found.
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on February 09, 2005, 11:22:56 am
budda... if you are interested... i've been playing around and I think i have a solution for the several fighters that don't get their loop detected properly.

You need to add the option to do a sample check after a possible loop is found.
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 09, 2005, 12:53:51 pm
Howard,

I coded up your idea except I am sampling the whole image and taking the maximum and minimum r,g,and b values over the whole thing. The frame is skipped if the max r minus the min r is less than the -moviethreshold parameter, and the max g minus min g, and the max b minus the min b.

I need more specific information on what games are having a problem. "Allfighters made by x,y,z" means nothing to me since I don't play fighters. I need rom names, not game names.

You mentioned 64street and arabfgt earlier. 64street has a static picture on it with changing text below the picture. A loop is detected when the text is blanked out and just the picture is showing. The new method of blank frame detection does not detect this.

On arabfgt, a loop is detected at a screen blank also, but this time the screen is not completely blanked, it has the "insert coin" text at the top and "sega 1991" at the bottom.

A black detection that excluded the top and the bottom of the screen would help arabfgt but not 64street, and may break other games.

I agree with you that having the game's title screen at the beginning of the video is important. I just don't think the solid color blanking is as common as you think.

But, give me a sample of a game with this solid color blanking, and I'll see if this changed blank frame detection will help.

In fact, you can try it yourself. I've uploaded the test executable here (http://cpmaker.mameprojects.com/files/TESTMAME.ZIP).


Title: Re: MAME Movie Maker released
Post by: 2600 on February 09, 2005, 01:33:48 pm
Howard,
I believe most/all of these can be solved by changing the minmovielength field.  I put in 5200 and ran in on the kof series(you mentioned them earlier), aof, and aof2. I beleive all made the movies fine except for aof and kof94.  Those would of probably been made fine if I picked 5100 instead or changed one other field.

Now you may argue 7 out of 9 aren't good enough odds, but realize this was one number I picked (on purpose not out of my @) and made the the movies in what an hour since your last post.  If I tuned it I probably could of gotten them all.  And because I logged them to a file, I can post the start and stop frames to Silver so everyone can make them without any effort.

You impiled that you aren't sure we know what an attract mode is.  Can you try the above and verify that the movies were attract modes would be captured properly?

Edit: I started to look at the movies and the first one kof2000 wasn't completely done (it only did one of the fight scenes and the characters change on each loop so a proper loop would get all of the fight scenes), but it still can be done properly if you change the minmovielength and maxmovielength field.  I imagine the rest need a bit more modification as well.
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 09, 2005, 03:46:52 pm
In case anyone missed it I've cleaned up and put the new ssf.txt file on my website in the format:

romname,startframe,endframe

there are no endframes yet (obviously) as this was only used to identify end-of-bios points.

Its worth checking these points, and it is an old file so there is a (slim) chance that some of the romnames may have changed slightly...

Cleaned up file: http://www.silverfoxy.plus.com/ssf-csv.txt

Original file: http://www.silverfoxy.plus.com/ssf.txt

I'll happily host updates as people work through the games.

Silver:

Please post a link to the up-to-date modified csv. I'll repost it to the first page of this thread.

Title: Re: MAME Movie Maker released
Post by: Silver on February 09, 2005, 06:27:52 pm
Hi,

At the moment I've not had anyone send in contributions, and due to my main pc being down-and-out I can't add my own additions so far - sorry. I've got a MySQL database online waiting, but can't add a web interface till the pc is rescued from the dead. Hopefully not too long, but I've got a mad week at work or so.

If anyone wants to email me there progress so far (either a .csv file or even just a collection of successful .vdb files) I'll throw it into a file and post the link here - I would be able to keep that updated every day no problem until the online db is running.

email:  silver@silverfoxy.plus.com

or just PM me.
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on February 09, 2005, 07:31:39 pm
Howard,

I coded up your idea except I am sampling the whole image and taking the maximum and minimum r,g,and b values over the whole thing. The frame is skipped if the max r minus the min r is less than the -moviethreshold parameter, and the max g minus min g, and the max b minus the min b.

I need more specific information on what games are having a problem. "Allfighters made by x,y,z" means nothing to me since I don't play fighters. I need rom names, not game names.

You mentioned 64street and arabfgt earlier. 64street has a static picture on it with changing text below the picture. A loop is detected when the text is blanked out and just the picture is showing. The new method of blank frame detection does not detect this.

On arabfgt, a loop is detected at a screen blank also, but this time the screen is not completely blanked, it has the "insert coin" text at the top and "sega 1991" at the bottom.

A black detection that excluded the top and the bottom of the screen would help arabfgt but not 64street, and may break other games.

I agree with you that having the game's title screen at the beginning of the video is important. I just don't think the solid color blanking is as common as you think.

But, give me a sample of a game with this solid color blanking, and I'll see if this changed blank frame detection will help.

In fact, you can try it yourself. I've uploaded the test executable here (http://cpmaker.mameprojects.com/files/TESTMAME.ZIP).




The zip file you've linked to isn't downloading properly... it gets corrupted.  I'll be glad to try it though. 

It's an extremely common problem, but since you don't play fighters, you'll never see it.  :)  It happens on virtually all snk and virually all capcom fighters.... that's 600 or so odd parents, which is a noticable chunk of mame. 

as i said.... snk fighters are the most effected.....

take a look at aof-aof3 and the kof games  I think some of the metal slug games might also suffer from it, but I can't sware to it. 

Besides that... your loop detection is just "too good".  Even if there isn't an apparent transition, many games have single frames of either a blank screen or a colored screen several times durring the attract mode.  If it happens enough times, the loop detection will fail. 

Let me know what I can do to help.


About 2600's comments:

I'm sure that if I adjusted the minmovie length to an insainely high number it might fix some of the games, but at the cost of "breaking" many of the old vector games as well as any game with a really short attract mode.   

More importantly, you hit the nail right on the head.... 7 out of 9 isn't good odds.  For me at least, 8 out of 9 isn't good odds either.  This project is great, but it's only useful if the ratio is something like 98%, not 80. 

Remember... the whole idea is to be able to use a giant batch file and have mmm automatically make the vids.  If we have to be tweaking numbers for each game then it's easier to just use )p( or my capture rigs on those games. 



Title: Re: MAME Movie Maker released
Post by: Buddabing on February 09, 2005, 09:15:07 pm
Howard,

I coded up your idea except I am sampling the whole image and taking the maximum and minimum r,g,and b values over the whole thing. The frame is skipped if the max r minus the min r is less than the -moviethreshold parameter, and the max g minus min g, and the max b minus the min b.

I need more specific information on what games are having a problem. "Allfighters made by x,y,z" means nothing to me since I don't play fighters. I need rom names, not game names.

You mentioned 64street and arabfgt earlier. 64street has a static picture on it with changing text below the picture. A loop is detected when the text is blanked out and just the picture is showing. The new method of blank frame detection does not detect this.

On arabfgt, a loop is detected at a screen blank also, but this time the screen is not completely blanked, it has the "insert coin" text at the top and "sega 1991" at the bottom.

A black detection that excluded the top and the bottom of the screen would help arabfgt but not 64street, and may break other games.

I agree with you that having the game's title screen at the beginning of the video is important. I just don't think the solid color blanking is as common as you think.

But, give me a sample of a game with this solid color blanking, and I'll see if this changed blank frame detection will help.

In fact, you can try it yourself. I've uploaded the test executable here (http://cpmaker.mameprojects.com/files/TESTMAME.ZIP).




The zip file you've linked to isn't downloading properly... it gets corrupted.  I'll be glad to try it though. 

It's an extremely common problem, but since you don't play fighters, you'll never see it.  :)  It happens on virtually all snk and virually all capcom fighters.... that's 600 or so odd parents, which is a noticable chunk of mame. 

as i said.... snk fighters are the most effected.....

take a look at aof-aof3 and the kof games  I think some of the metal slug games might also suffer from it, but I can't sware to it. 

Besides that... your loop detection is just "too good".  Even if there isn't an apparent transition, many games have single frames of either a blank screen or a colored screen several times durring the attract mode.  If it happens enough times, the loop detection will fail. 

Let me know what I can do to help.


About 2600's comments:

I'm sure that if I adjusted the minmovie length to an insainely high number it might fix some of the games, but at the cost of "breaking" many of the old vector games as well as any game with a really short attract mode.   

More importantly, you hit the nail right on the head.... 7 out of 9 isn't good odds.  For me at least, 8 out of 9 isn't good odds either.  This project is great, but it's only useful if the ratio is something like 98%, not 80. 

Remember... the whole idea is to be able to use a giant batch file and have mmm automatically make the vids.  If we have to be tweaking numbers for each game then it's easier to just use )p( or my capture rigs on those games. 






Howard,

I must have forgotten to set binary mode when uploading that zip. Sorry about that.....

I had an idea which I want to bounce off of you and anyone else reading this thread. Currently, MMM detects the end of a loop by matching exact frames. So, if frame number 100 and 500 are identical, a loop is detected. But, as we have seen, there are many games which give false matches. Now suppose we introduce a new parameter, -moviematchlength. If this parameter is one, it does the matching the exact same way it does now. Let's say we set the parameter is 10. So, frame 100 and 500 can match, but frame 101 and 501, 102 and 502, etc. have to match all the way up to 109 and 509. Considering the case of 64street, the loop is detected when the text is cleared below the picture. If the length of the match was changed, the number of matched frames would be below the -moviematchlength.

The more I think about it, the more I think it will work and solve a lot of the problems.

LMK your thoughts.

Title: Re: MAME Movie Maker released
Post by: Silver on February 09, 2005, 09:33:08 pm
Hey I really like that idea.... I don't think you'll even need a very high value to take advantage.

The only place I can see it fall down is if some games have a loop-within-a-loop...  ie if the attract mode is loop A then loop B then loop A then loop C etc.... but I can't think there are many of those.. Good idea!
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 09, 2005, 11:14:47 pm
Success!

I changed the code tonight for this idea of mine and it works. I tested kof94, 64street, and arabfgt. All these games had places which would have loops detected but now passed through.

I used a value of -moviematchlength equal to 10. 64street had a false match of length 7, and another game had one of length 5.

You don't want to use too large a value of -moviematchlength. Zookeeper was affected but not too badly. Other games may be affected adversely. For now I will set the default value to 10.

I will upload a new binary and source tomorrow.
Title: Re: MAME Movie Maker released
Post by: donnyj on February 10, 2005, 01:52:02 am
I had an idea which I want to bounce off of you and anyone else reading this thread. Currently, MMM detects the end of a loop by matching exact frames. So, if frame number 100 and 500 are identical, a loop is detected. But, as we have seen, there are many games which give false matches. Now suppose we introduce a new parameter, -moviematchlength. If this parameter is one, it does the matching the exact same way it does now. Let's say we set the parameter is 10. So, frame 100 and 500 can match, but frame 101 and 501, 102 and 502, etc. have to match all the way up to 109 and 509. Considering the case of 64street, the loop is detected when the text is cleared below the picture. If the length of the match was changed, the number of matched frames would be below the -moviematchlength.

The more I think about it, the more I think it will work and solve a lot of the problems.

LMK your thoughts.


I like this idea a lot.  My thoughts are having some kind of "variability" for the detection.  Why?  Because as CPU speeds are changed/corrected, and emulation improved/deprecates, the attract mode won't get recorded wrong.  That is why I stopped doing start/stop frames.  The numbers may work for one person on one build, but will they work on another machine with another build?  How about using ASM cores and different optimizations...

BUT, having a detection scheme (that works) should be a lot more robust to any code / optimization changes / quirks.

Thanks for all the hard work buddabing and others!!!  I believe this is a worthwhile project!
Title: Re: MAME Movie Maker released
Post by: donnyj on February 10, 2005, 04:14:09 am
Related, but unreleated:  Anyone know how to do a "diff" and have it act on all files in a directory and subdirectories?

I manually added buddabing's changes to the mame 91u2 source and I would MUCH prefer to take future versions of MMM and diff them with the version before it and manually make the changes myself...  Probably not making sense =[

TIA
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 10, 2005, 08:16:22 am
Related, but unreleated:
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 10, 2005, 10:12:25 am
I've uploaded a new version with the -moviematchlength parameter implemented. The default value of the option is one to match the existing loop detection. I've found a value of 10 to work nicely. The value can range from 1 to 99.

Also, I've uploaded a corrected version of Howard's test black detection which detects all monochromatic images, not just black. The test black detection, testing all pixels instead of a subsample, runs considerably slower on Zookeeper, 17.41 fps versus 26.38 for the standard black detection.

I'm thinking maybe I can get by without any black detection at all it the -moviematchlength is sufficiently high. But, that wouldn't work for games with long stretches of black (greater than 10 frames) within their demo loops.

EDIT:
I've added a new parameter, called -movieskipblack. It's in the test executable only. A value of 0 for -movieskipblack does not skip black frames when calculating loops. A value of 1 for -movieskipblack will ignore frames which have at least one pixel's red,green,or blue value above -moviethreshold. A value of 2 for -movieskipblack will calculate the maximum and minimum red, green, and blue value for each frame and will ignore frames which have the maximum red minus the minimum red less than -moviethreshold, and likewise for green and blue. This "ignoring" is for the purposes of loop detection only.

I added this parameter because I want to test getting rid of the black detection altogether. It runs faster that way.
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on February 11, 2005, 11:34:07 am
when you say you uploaded a new version, is it just the binary or the sources too?
I assume that if there is new source, the safest is to erase the whole source tree and re-apply the changes to mame 0.91u1?
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 11, 2005, 11:47:10 am
when you say you uploaded a new version, is it just the binary or the sources too?
I assume that if there is new source, the safest is to erase the whole source tree and re-apply the changes to mame 0.91u1?

That is the safest thing to do. Typically, all I do is extract the new source over my existing source, then go to the obj/mame folder and del *.o and deltree windows. This will force a recompile, but it won't recompile the cpu cores and drivers, which saves a good bit of time.

When I upload a new version it is the binary and sources. For the test black detection I wrote for Howard it was just the binary.
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on February 11, 2005, 12:53:22 pm
Hey I really like that idea.... I don't think you'll even need a very high value to take advantage.

The only place I can see it fall down is if some games have a loop-within-a-loop...
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 11, 2005, 03:38:47 pm
I had an idea which I want to bounce off of you and anyone else reading this thread. Currently, MMM detects the end of a loop by matching exact frames. So, if frame number 100 and 500 are identical, a loop is detected. But, as we have seen, there are many games which give false matches. Now suppose we introduce a new parameter, -moviematchlength. If this parameter is one, it does the matching the exact same way it does now. Let's say we set the parameter is 10. So, frame 100 and 500 can match, but frame 101 and 501, 102 and 502, etc. have to match all the way up to 109 and 509. Considering the case of 64street, the loop is detected when the text is cleared below the picture. If the length of the match was changed, the number of matched frames would be below the -moviematchlength.

The more I think about it, the more I think it will work and solve a lot of the problems.

LMK your thoughts.


I like this idea a lot.
Title: Re: MAME Movie Maker released
Post by: 2600 on February 11, 2005, 04:41:17 pm
I've played around with -moviematchlength.  Works really well, especially for the games that were causing problems aqua jack, kof series, etc.

I don't know if we will find one setting that works with everything, but your findings about varying the movielength per year are what I was going to suggest.  Although, one other parameter should be adjusted as well -minmovielength.  The reason I suggest this is -minmovielength 800 didn't work for kof96 because it has a really long section in the middle where it displays the name and has the flame/clouds at the bottom.  For games above 1990, I'd say use a -minmovielength of around 2000.

There is one more idea for games like Howard was talking about TMNT or the MK series.  Here are the start and stop for MK series so you can see the entire attract mode.
mk3,178,23553
mk2,60,18251
umk3,2369,22852

I'm sure you can think of a better idea, but here are two.
1. Add a -movieloop, this would require subsequent loops have to match the first.  So the loop detection would keep going until a loop matches the first, but only makes a video for the one.
2.  A slight modification to the except with a -moviesamples where instead of matching the loop entirely, you match every 50 samples.  So loop 2 frame 0,50,100 have to match loop 1's respective frames.

The only problem with this is when I was trying kof2000, it appeared that the fight scene was generated randomly.  (Howard is that your view on it)


Howard,
You were right about the odds and to accept lower odds, but I had posted too fast.  Maybe I should of worded that it is possble, where I believe you were saying it isn't.  Or Maybe I've been reading too many of your posts in getting the user's to learn how to fish.  ;)  In any case, I'm not sure if one bat file will ever be possible, but the odds are getting higher.



Title: Re: MAME Movie Maker released
Post by: Silver on February 11, 2005, 04:53:35 pm
Hey good progress - this new addition is looking good!

Here are the start and stop for MK series so you can see the entire attract mode.
mk3,178,23553
mk2,60,18251
umk3,2369,22852

Heyhey! First additions to the collection. Thanks..  ;)
Title: Re: MAME Movie Maker released
Post by: 2600 on February 11, 2005, 04:59:50 pm

Heyhey! First additions to the collection. Thanks..  ;)


Yeah, sorry about that.  I've got a list, but haven't verified them.  Don't want to post numbers that I'm not positive about.
Title: Re: MAME Movie Maker released
Post by: Silver on February 11, 2005, 06:13:03 pm
No problem...

The way progress is ticking along here - kudos to all for the ideas and BuddaBing for implementing them so quick - it won't be too long till we can run 1 long batch and get a very high success rate to start with. Then its just a case of spotting any flaws....
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 11, 2005, 11:28:53 pm
I've played around with -moviematchlength.  Works really well, especially for the games that were causing problems aqua jack, kof series, etc.

I don't know if we will find one setting that works with everything, but your findings about varying the movielength per year are what I was going to suggest.  Although, one other parameter should be adjusted as well -minmovielength.  The reason I suggest this is -minmovielength 800 didn't work for kof96 because it has a really long section in the middle where it displays the name and has the flame/clouds at the bottom.  For games above 1990, I'd say use a -minmovielength of around 2000.

There is one more idea for games like Howard was talking about TMNT or the MK series.  Here are the start and stop for MK series so you can see the entire attract mode.
mk3,178,23553
mk2,60,18251
umk3,2369,22852

I'm sure you can think of a better idea, but here are two.
1. Add a -movieloop, this would require subsequent loops have to match the first.  So the loop detection would keep going until a loop matches the first, but only makes a video for the one.
2.  A slight modification to the except with a -moviesamples where instead of matching the loop entirely, you match every 50 samples.  So loop 2 frame 0,50,100 have to match loop 1's respective frames.

The only problem with this is when I was trying kof2000, it appeared that the fight scene was generated randomly.  (Howard is that your view on it)


Howard,
You were right about the odds and to accept lower odds, but I had posted too fast.  Maybe I should of worded that it is possble, where I believe you were saying it isn't.  Or Maybe I've been reading too many of your posts in getting the user's to learn how to fish.  ;)  In any case, I'm not sure if one bat file will ever be possible, but the odds are getting higher.


I'll make -moviematchlength 0 equal to "let the application decide" as well as -minmovielength (it really should be -movieminlength) 0. You can be the arbiter of what the application decides.

Your other suggestions are getting into the realm of diminishing returns. It would probably be best to treat multiloop games as exceptions and just get the start and end frame manually like you did for mk2.

The loop detection doesn't currently keep track of where the match occurs, only that a match happened n times in a row. So maybe an improvement is possible there.
Title: Re: MAME Movie Maker released
Post by: donnyj on February 12, 2005, 05:55:28 am
Like I originally said quite awhile ago (got a lucky guess), I believe the best system will end up being "general generic rules", with manual "hints"

For example

Game1, 3 loops
Game2, automatic
Game3, end on frame 25000

and the general generic rules could vary internally to handle situations like: fighting game between 1990-1995

Quite complicated but I believe quite workable (of course I don't do the programming so what do I know?)

anywho, a solid generic rules system with "hints" for the games that don't work well with those...

I am excited about the changes that are being made and the diligence of the people working on it (especially budabing and silver)
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 12, 2005, 01:09:36 pm
Like I originally said quite awhile ago (got a lucky guess), I believe the best system will end up being "general generic rules", with manual "hints"

For example

Game1, 3 loops
Game2, automatic
Game3, end on frame 25000

and the general generic rules could vary internally to handle situations like: fighting game between 1990-1995

Quite complicated but I believe quite workable (of course I don't do the programming so what do I know?)

anywho, a solid generic rules system with "hints" for the games that don't work well with those...

I am excited about the changes that are being made and the diligence of the people working on it (especially budabing and silver)

I'm mulling over how to implement this "rules" system.

What would be cool is a genrules program which takes the rom name as a parameter and spits out a .ini file with the correct movie parameters.

The genrules program would operate with a SQL engine:

-- defaults
set minmovielength='800';
set maxmovielength='10000';
set moviematchlength='1';

set minmovielength = '2000' where year > '1989' and catver_category like '%Fighting%";
set maxmovielength = '25000' where romname= 'mk3';
set moviematchlength='10' where ...... etc.

The genrules program would be called if -minmovielength or -moviematchlength was equal to zero.

It would add a constant amount of time, I figure a couple of seconds or so, to the creation of each movie, but it would be pretty fast.

I would just adapt the source from my ListGen program which already has the SQL stuff.

The question remaining to me is: is it worth it? Does the latest loop detection method meet Howard's criteria? If not, will this improve it?

Please post your thoughts.


Title: Re: MAME Movie Maker released
Post by: donnyj on February 12, 2005, 08:15:35 pm
VirtualDub Build 23174 (1.6.4, experimental): [February 12, 2005] was released

Among A LOT of other changes are:

    * PNG decoder failed if the compressed data contained a stored chunk.
    * PNG decoder crashed if an error occurred during decoding.
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on February 12, 2005, 09:11:46 pm
meaning what? use an older version for MMM?
Title: Re: MAME Movie Maker released
Post by: donnyj on February 12, 2005, 09:43:47 pm
meaning what? use an older version for MMM?

Meaning the last version that we used for MMM choked on uncompressed PNG files, and the problem is now fixed.....

So, if you want to try uncompressed PNG files, upgrade  :laugh:
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 13, 2005, 01:18:53 am
VirtualDub Build 23174 (1.6.4, experimental): [February 12, 2005] was released

Among A LOT of other changes are:

    * PNG decoder failed if the compressed data contained a stored chunk.
    * PNG decoder crashed if an error occurred during decoding.


This pretty much makes the Crashtest mng files redundant. Using MMM and this new VirtualDub we can create lossless AVIs with as good or better resolution.
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on February 13, 2005, 01:12:59 pm
which is great since mngs are the most un-supported file format since ogg vorbis.    8)
Title: Re: MAME Movie Maker released
Post by: donnyj on February 14, 2005, 03:40:23 am
Really stupid question:  Is the "-resolution" command to prevent games that change resolution to change or something else?  Because when I run without that command, I get the same output (on the few games that I checked) ???

Also, just to be a pain in the butt  :angel: When's 0.92 gonna be ready?  :angel:  Just kidding, whenever it's ready is find, just had to throw that in
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 14, 2005, 12:45:39 pm
Really stupid question:
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on February 14, 2005, 02:37:41 pm
there we go again!  ;D
Title: Re: MAME Movie Maker released
Post by: donnyj on February 14, 2005, 08:54:32 pm
Quote

Does anyone have any feedback on my idea on the rules generator?

Quote

The reason that I haven't commented is that I don't want to be responsible for so much effort  :-\  I believe that having a rules-based system will allow creating a settings file that will allow anyone, anywhere to run moviemaker and get the desired results.  As they change drivers, optimizations, cpu cores, fix timings, etc. I think that frame numbers could change...  thus unless someone is willing to manually check each change on every movie, a rules-based system should help....

I have a separate request.  Could you please make an optional switch that tells MMM to continue running and saving frames until  the maxmovielength is reached.  I currently run MMM into a different folder for each gamename....  I can either run MMM twice, the first time with loop detection enabled, then delete the images and re-run with loop detection disabled...  to verify that MMM did indeed find the proper end of the loop(s).   With the "debugging" switch on, I could run MMM once, verify the detected frames as correct, and continue....

The reason I asked about the resolution switch is that some of the artwork (especially for the vector games) doesn't show unless artwork cropping is disabled, and when I did that, without specifying a resolution, it "seemed" to create the proper resolution for the game, and still showed the artwork...
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on February 14, 2005, 11:00:02 pm
Just my 2 cents.... I think anything resembling a "script" jsut to get a movie to record is silly.  If it's that much trouble then do it manually. 

I tested .92 and I was pleasently suprised by the results.  The problem games seem to work now either either the blank option set to skip solid colors or the matchlength set to 10.  Both seem to work pretty well, but as you expected the match length option is much faster.  I obviously haven't had a chance to try em all. But out of the 20 fighters I did today, only C&d (dino.zip) and Bloody roar 2 screwed up.  And C&D is almost certain to screw up anyway due to it's strange attract mode. (It shows the title screen 2 to 3 times before it actually gets to the gameplay sample)

I've noticed a few oddities though and I'm wondering if it's the mmm or the games themselves.  Bloody Roar 2 seems to freeze halfway through it's attract mode.  It uses an video file for it's attract mode so that may be the culprit. 

One other thing and I think this might be a game thing.  Some games seem to get the frist few seconds of their attract mode cut off, yet they are present at the end of the loop.  Does this have something to do with the code you are using?  I honestly doubt it, but I thought I would ask. 

I think at this point the loop detection is about as robust as it's gonna get.  I would suggest that we all start playing with settings and report back with what works best.... then budda can figure out a good set of default settings, use those as the defaults in his code, and the setup would become farily turn key. 

Great job, all in all.  I think this should just about do it.   8)
Title: Re: MAME Movie Maker released
Post by: Lilwolf on February 15, 2005, 09:28:51 am
I would love if when you download it, a script of all known good settings per game...  So you run it, go to bed... wake up with all known good loops and start/end for those who dont...

Of course... this would take a TON to upkeep... And the start/end would have arguments (but it doesn't wait long enough for cammies 3rd intro sequence)...

but it still would be cool to get a list of all known working settings for each game... and just start off with a decent chunk of known working.
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 15, 2005, 10:31:09 am
I can get a bit manic-depressive on some of these projects, so adding more features isn't a problem when I'm in manic mode. :)

Howard: I unfortunately do not have Bloody Roar 2. Sounds like an interesting game, though. The loop detection works as designed on C&D, though. This is a game that would benefit from a "multi-loop" option. And what about your 98%? :) A nice set of rules should accomplish it.

When a loop is detected, the last -moviematchlength frames are subtracted out from the start and the end of the loop, to account for the match length. As an example, suppose a loop is found between frames 123 and 456. The program will start detecting a loop at frame 456 and will continue detecting until frame 465. At that point, the corresponding frame to frame 465 is frame 132. To correct the loop, the program subtracts -moviematchlength and adds 1 to both start and end frame. So 132 becomes 132-10+1=123 and 465 becomes 465-10+1=456. I'll look at the code and I'll make sure the .vdb file is being generated correctly taking the correction into account.

Donny: I've created a -movieloops 3 option. It'll detect a loop but will continue capturing frames. The resulting movie, however, will not have the detected loop, it will be the entire span of frames. Do you want to have the original loop in the movie? Also, the -movieloops option is set by the batch.bat, so you will have to edit your makemovies.bat and set the -movieloops there.

Lilwolf: The mechanism is already there. Silver is compiling a list of exceptions. This list can be read by my ListGen program which generates a big batch file for MAME to generate movies from which have the start and end frame in them. You can even filter out the movies which have exceptions.

When I ran a batch of 2000+ games last month, it took a solid week.

There's a new binary which has the -movieloops 3 option.


Title: Re: MAME Movie Maker released
Post by: Silver on February 15, 2005, 10:51:05 am
Hi,

Great Progress with 0.92 build. Think I will put this one into gear and get my pc churning out videos, and building up the frame info. (Now that my pc is back up and running, after replacing every cap on the board......)

@Buddabing

It appears Vdub 1.6.4 has a slightly different Script format. For me it errors out with an unhelpful "???" error AFTER making the video. The video is fine, but it needs manual intervention to continue. The culprit appears to be the:
"VirtualDub.video.SetDepth(24,24);" line in the cdb file. Removing this works fine - it appears this is no longer recognized in 1.6.4. It would be really helpful if you could remove it from the mame build.....

Also, when supplying the start and end frame inputs, does it still run the dectection routine? I would have expected to be slightly faster due to skipping the detection, but maybe it has no impact.
Title: Re: MAME Movie Maker released
Post by: Silver on February 15, 2005, 11:04:08 am
Oh, and "Bloody Roar 2" is an emulation problem.  Standard Mame chokes and just freezes on 1 frame - hence it wont work in BuddaMame.
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 15, 2005, 11:13:14 am
Hi,

Great Progress with 0.92 build. Think I will put this one into gear and get my pc churning out videos, and building up the frame info. (Now that my pc is back up and running, after replacing every cap on the board......)

@Buddabing

It appears Vdub 1.6.4 has a slightly different Script format. For me it errors out with an unhelpful "???" error AFTER making the video. The video is fine, but it needs manual intervention to continue. The culprit appears to be the:
"VirtualDub.video.SetDepth(24,24);" line in the cdb file. Removing this works fine - it appears this is no longer recognized in 1.6.4. It would be really helpful if you could remove it from the mame build.....

Also, when supplying the start and end frame inputs, does it still run the dectection routine? I would have expected to be slightly faster due to skipping the detection, but maybe it has no impact.


I don't want VDub 1.6.2 to have a problem if I take out the SetDepth line. If it doesn't I'll remove it.

I think the problem is that the program is still testing for black even if it being supplied the start and end frames. I should remove that, but as a workaround you can set -movieskipblack 0 for those movies.

EDIT: I forgot to ask if you had tried uncompressed pngs with Vdub 1.6.4.

Title: Re: MAME Movie Maker released
Post by: Silver on February 15, 2005, 11:32:03 am
I've tested Vdub 1.6.2 without the SetDepth line, and it worked fine - creating an identical avi file. I will explore more though, to see if there is any impact.

Vdub 1.6.4 works fine with the uncompressed pngs. (though I find compression level 1 much better)

-movieskipblack 0 works great - adds a 15-20% speed boost for me when you supply the start/end frames.
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 15, 2005, 03:28:46 pm
I've tested Vdub 1.6.2 without the SetDepth line, and it worked fine - creating an identical avi file. I will explore more though, to see if there is any impact.

Vdub 1.6.4 works fine with the uncompressed pngs. (though I find compression level 1 much better)

-movieskipblack 0 works great - adds a 15-20% speed boost for me when you supply the start/end frames.

Okay, I've removed the SetDepth line.

Also, I've made it so that if you are using -movieloops 2 it doesn't check for black frames.

Have you tried tweaking the Vdub settings to reduce the bitrate like Howard suggested?

Also, the new front end AtomicFE crashes on Xvid videos, but works okay (aspect ratio wrong, though) on Cinepak. Have you looked at that? Would that be something weird with the Xvid settings we are using?

I've uploaded a new executable.
Title: Re: MAME Movie Maker released
Post by: Silver on February 15, 2005, 03:44:06 pm
Thanks....

Okay I've not really looked at changing the Xvid settings as I quite like the defaults, and people can now set up there own. However, I'll get some tighter settings you can use as defaults as email them over.

AtomicFE crashing: Hmmm could do with some more info here. I would be highly surprised its to do with Xvid settings, although its possible. With Xvid installed you have a fully compliant MPEG4 Directshow encoder/decoder available to the system. Does DivX also crash? Can the author of AtomicFE give us some feedback on this?

Title: Re: MAME Movie Maker released
Post by: Howard_Casto on February 15, 2005, 04:36:16 pm
Looking at amotic fe... my guess is the improper aspect ratio is due to the fact that afe forces an aspect instead of letting the picture self correct.  I've noticed that in all the screenshots the images are forced to 3:4 which is a big no-no.  It may make the skin look better, but it causes distortion. 

My guess on the videos crashing is that it's using a plugin rather than a true directshow window.  ActiveX plugins often aren't fully direct show complaint. 

Again this is all a guess though. 
Title: Re: MAME Movie Maker released
Post by: sWampy on February 15, 2005, 06:15:25 pm
I put in the latest listgen, and didn't notice it was set to generate all roms and clones overwriting my filter.  I don't really need the clone movies do I?  IE won't most fontends show you the parent movie if the clone movie doesn't exist. 
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 15, 2005, 06:33:20 pm
I put in the latest listgen, and didn't notice it was set to generate all roms and clones overwriting my filter.  I don't really need the clone movies do I?  IE won't most fontends show you the parent movie if the clone movie doesn't exist. 

Try setting -unique 1 in your listgen.ini. That way you'll still get a video for Pac-Man. You can also set use_clones 0 if you want.

Obviously, creating 5500 movies will take a lot more time and disk space than 2000.
Title: Re: MAME Movie Maker released
Post by: sWampy on February 15, 2005, 08:00:06 pm
I put in the latest listgen, and didn't notice it was set to generate all roms and clones overwriting my filter.  I don't really need the clone movies do I?  IE won't most fontends show you the parent movie if the clone movie doesn't exist. 

Try setting -unique 1 in your listgen.ini. That way you'll still get a video for Pac-Man. You can also set use_clones 0 if you want.

Obviously, creating 5500 movies will take a lot more time and disk space than 2000.

Is there a reverse of that where I can easily make a batch file to delete the junk?
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 15, 2005, 08:13:38 pm
I put in the latest listgen, and didn't notice it was set to generate all roms and clones overwriting my filter.  I don't really need the clone movies do I?  IE won't most fontends show you the parent movie if the clone movie doesn't exist. 

Try setting -unique 1 in your listgen.ini. That way you'll still get a video for Pac-Man. You can also set use_clones 0 if you want.

Obviously, creating 5500 movies will take a lot more time and disk space than 2000.

Is there a reverse of that where I can easily make a batch file to delete the junk?

how about:
1) put select * from gamedata where isclone='1'; in your filter.sql, and set unique to 0 and use_clones=1 in your listgen.ini
2) run listgen
3) rename your batch.bat to something temporary
4) create a new batch.bat which has the line "del /Q movies\%1.avi" in it (or wherever you store your movies)
5) run makemovies.bat
6) change filter.sql back to what it was and rerun listgen.
7) change your batch.bat back to what it was.

Your mileage may vary, and I do not take responsibility for erased files.  :police: I recommend testing your batch.bat with one file first. :)

Title: Re: MAME Movie Maker released
Post by: sWampy on February 15, 2005, 08:48:44 pm
I put in the latest listgen, and didn't notice it was set to generate all roms and clones overwriting my filter.  I don't really need the clone movies do I?  IE won't most fontends show you the parent movie if the clone movie doesn't exist. 

Try setting -unique 1 in your listgen.ini. That way you'll still get a video for Pac-Man. You can also set use_clones 0 if you want.

Obviously, creating 5500 movies will take a lot more time and disk space than 2000.

Is there a reverse of that where I can easily make a batch file to delete the junk?

how about:
1) put select * from gamedata where isclone='1'; in your filter.sql, and set unique to 0 and use_clones=1 in your listgen.ini
2) run listgen
3) rename your batch.bat to something temporary
4) create a new batch.bat which has the line "del /Q movies\%1.avi" in it (or wherever you store your movies)
5) run makemovies.bat
6) change filter.sql back to what it was and rerun listgen.
7) change your batch.bat back to what it was.

Your mileage may vary, and I do not take responsibility for erased files.  :police: I recommend testing your batch.bat with one file first. :)



I wasn't sure that wouldn't throw out a bunch I didn't want to throw out like pacman. ;-)
Title: Re: MAME Movie Maker released
Post by: donnyj on February 15, 2005, 09:35:14 pm
Donny: I've created a -movieloops 3 option. It'll detect a loop but will continue capturing frames. The resulting movie, however, will not have the detected loop, it will be the entire span of frames. Do you want to have the original loop in the movie? Also, the -movieloops option is set by the batch.bat, so you will have to edit your makemovies.bat and set the -movieloops there.

Thank you VERY much, yes I would like the vdb to have the "detected loop"  this way I can "verify" that the detected is indeed the correct loop.  Hopefully I will only need to correct a small percent of VDBs.  Then, on the ones that are corrected, I could play with the settings and see if I can get that result "automagically".
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 15, 2005, 11:57:04 pm
I put in the latest listgen, and didn't notice it was set to generate all roms and clones overwriting my filter.  I don't really need the clone movies do I?  IE won't most fontends show you the parent movie if the clone movie doesn't exist. 

Try setting -unique 1 in your listgen.ini. That way you'll still get a video for Pac-Man. You can also set use_clones 0 if you want.

Obviously, creating 5500 movies will take a lot more time and disk space than 2000.

Is there a reverse of that where I can easily make a batch file to delete the junk?

how about:
1) put select * from gamedata where isclone='1'; in your filter.sql, and set unique to 0 and use_clones=1 in your listgen.ini
2) run listgen
3) rename your batch.bat to something temporary
4) create a new batch.bat which has the line "del /Q movies\%1.avi" in it (or wherever you store your movies)
5) run makemovies.bat
6) change filter.sql back to what it was and rerun listgen.
7) change your batch.bat back to what it was.

Your mileage may vary, and I do not take responsibility for erased files.  :police: I recommend testing your batch.bat with one file first. :)



I wasn't sure that wouldn't throw out a bunch I didn't want to throw out like pacman. ;-)


Hey, easy come, easy go! :) Truly, it shouldn't deleted that many you want to keep. Just eyeball the makemovies.bat before you run it.

Alternatively, make the batch.bat not delete, but move them to another folder, deadmov for example:
move movies\%1.bat deadmov
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 16, 2005, 04:27:05 pm
Okay,

I've uploaded a new binary which contains donny's requested change, which is to create a movie with the original loop even if snapshots are created all the way to -maxmovielength when -movieloops 3 is selected.

When testing I also hand-tweaked a few loops for Silver:
zookeep,2774,5491
startrek,2,3923
mario,26,2816
gorf,9,2730
frogger,93,5240
Title: Re: MAME Movie Maker released
Post by: donnyj on February 16, 2005, 07:01:26 pm
Okay,

I've uploaded a new binary which contains donny's requested change, which is to create a movie with the original loop even if snapshots are created all the way to -maxmovielength when -movieloops 3 is selected.


Thank you very much!!!
Title: Re: MAME Movie Maker released
Post by: Lilwolf on February 16, 2005, 08:38:19 pm
And one thing that I don't believe is mentioned enought..

Buddabing...

You have the best animated signature image I've seen in AGES!  It cracks me up every time I look at it. 
Title: Re: MAME Movie Maker released
Post by: Silver on February 16, 2005, 09:48:25 pm
Ok Apologies this took me much longer than planned!! (Had to give myself a crash course in PHP and MySQL)

I've got a simple webpage up where you can download an up-to-date list on the start/end frames for roms. Its generated on the fly from a SQL database so its nice and easy for me to update.  :)

http://www.silverfoxy.plus.com/AttractVideos.htm

The DB has NO clones - it should be just parent romnames (around 3000). I generated this from Buddabings Listgen so shout if I set it up wrong..

It's currently based on the Mame 0.92 romset. At the moment, its configured to only create a text file with roms that have start/end frame data (so no "abc,0,0"). There are only about 8 roms listed at the moment as that's all that has been posted here and I've not started ploughing through them.

It names the file "ssf.txt" by default as that's what Listgen currently looks for.

If anyone is creating videos, please save your vdb files (by removing the "del %1.vdb" from the batch.bat). You can just zip them and email them to me and I'll do the rest.
Title: Re: MAME Movie Maker released
Post by: donnyj on February 17, 2005, 12:10:47 am
after downloading 4 different ways, I think the mame092.zip on your site is corrupt
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 17, 2005, 12:37:20 am
after downloading 4 different ways, I think the mame092.zip on your site is corrupt  ???

So it would seem. I'll fix it in the morning.


Sometimes I forget to set binary mode when uploading..   :(

Lilwolf you should check out starwarskid.com



Title: Re: MAME Movie Maker released
Post by: 2600 on February 17, 2005, 08:24:27 am
Ok Apologies this took me much longer than planned!! (Had to give myself a crash course in PHP and MySQL)

I've got a simple webpage up where you can download an up-to-date list on the start/end frames for roms. Its generated on the fly from a SQL database so its nice and easy for me to update.  :)

http://www.silverfoxy.plus.com/AttractVideos.htm

The DB has NO clones - it should be just parent romnames (around 3000). I generated this from Buddabings Listgen so shout if I set it up wrong..

It's currently based on the Mame 0.92 romset. At the moment, its configured to only create a text file with roms that have start/end frame data (so no "abc,0,0"). There are only about 8 roms listed at the moment as that's all that has been posted here and I've not started ploughing through them.

It names the file "ssf.txt" by default as that's what Listgen currently looks for.

If anyone is creating videos, please save your vdb files (by removing the "del %1.vdb" from the batch.bat). You can just zip them and email them to me and I'll do the rest.

Thanks Silver, I just sent you tmnt and xmen(which is really long).  I'll send you vdb files from now on if it is easier.

Offhand does anyone know of any other games which are troublesome, use multiple loops, etc.  As I'll try to get some of those out of the way.
Title: Re: MAME Movie Maker released
Post by: Silver on February 17, 2005, 09:00:26 am
Not sure offhand, although it may be worth making mame set a flag or a comment to the console or output vdb stating that no loop was found, and its just hit the max 10000 frame point. This is ok if you don't want too long videos, but the catch is you have all the bios rubbish....

Alternitively if you send me vdb files, and can check if any are ending on 10000 frames. (Although for you, 2600, it looks like you've upped this limit anyway....
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 17, 2005, 09:21:36 am
Okay I fixed the latest binary.



Silver: My impression was that the ssf.txt file would contain only the files that were hand-created by actually going out and looking for the start and end frames by hand. I don't think it does any good to extract the information from the vdbs, since someone can get a more accurate loop by hand and future optimizations can possibly improve the loop detection.

The binary I just fixed prints out a message when -maxmovielength is reached.
Title: Re: MAME Movie Maker released
Post by: 2600 on February 17, 2005, 10:23:15 am
I tend to agree with Buddabing on this.  It's one thing to have a list of start,stop frames.  It's another to have a list of correct start,stop frames.

For the list, I can currently run and see which one's exceed the 10000 frame count so that's not a problem.  But currently I am trying to do the games where there is multiple loops as these are the ones a moviemaker user will have a problem with because it will tend to get Loop A, but not Loop B, C, etc with out tweaking your ini file a bit.  These are also a bit more troublesome as they won't exceed the 10000 frame count because a loop will be detected.

Howard, do you know of any more off the top of your head?
Title: Re: MAME Movie Maker released
Post by: Silver on February 17, 2005, 11:06:54 am
Okay agreed - the database will be restricted hand-tweaked accurate frame listings.

If there is call in the future for a 2nd db with just the detected frame listings, Its easy to make - it just makes the whole process faster for anyone else.

@2600

I think a lot of the fighters, particualry neogeo ones. look at the kof series, last blade 1+2, garou... and maybe some newer capcom fighters?
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on February 18, 2005, 03:59:59 am
If you guys are talking the technically correct loop (all bios obtained by multiple loops)  then ALL fighters do this as well as all beat-em ups.

I think it's a tad silly to do them though... it makes for an abnormally long video that nobody would watch all the way through. 

I made vids for tmnt and xmen back in the day because they were my favs.... after living with the full attracts for a few years I've found that I've never sat through the whole thing for these games... not even when I'm exploring a room in 3darcade. 

I think it's important to get a nice loop in case someone does watch a movie to the end  but usually after about 30 seconds, people loose interest anyway. 

Also it may prove to be impossible.  Take the mortal kombat games for example, the bios they show after the attract mode is random.  So is the gameplay sample.  Most of the newer fighters are like this too. 

Beat-em ups and sidescrollers are notorious for this too in that they randomly show the gameplay samples of various levels.  Of course, most are coded not to show the same one twice in a row. 


As for non-standard loops.... there aren't that many. 

I think the capcom beat-em-ups do.  Like knights of the round ect.... (sorry the names escape me atm) 

If you just want one full loop with the title and a gameplay sample, then suprisingly most fighters pass fine with budda's latest improvments.  I haven't really ran across any problems yet, save c&d (which isn't a fighter, it's a beat-em-up). 
Title: Re: MAME Movie Maker released
Post by: )p( on February 18, 2005, 06:55:54 am
The xvid output of moviemaker can also crash 3darcade i was told. The demo file the guy send me turned out to not providing the fe with the correct height and width info. ie both reported as 0. The main, maybe related, issue is that it causes an error in the video dll when it tries to grab a frame. Not much I can do about preventing this.  :(

peter
Title: Re: MAME Movie Maker released
Post by: 2600 on February 18, 2005, 08:49:01 am
It did appear to me that the kof series was random.  Which if no one minds I'll skip because if I have to watch the kof attract modes one more time, ugh.  I'll skip other fighters as well unless someone thinks a particular one doesn't fit the mold. ( I should probably do kof96 since that has the potential of not being as cleanly detected)

That being said the MK series at least 2 and 3 didn't appear random to me and along with XMEN and TMNT the start,stop frames are saved.  Using Xvid, XMEN makes an 87MB movie and the rest are about 20MB not too bad and the user has the ability to make them smaller.

I'm trying Zaxxon currently as that one doesn't appear right, then I'll take a look at C&D(dino.zip).  After that unless I notice something or someone else mentions something.
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 18, 2005, 09:33:55 am
The xvid output of moviemaker can also crash 3darcade i was told. The demo file the guy send me turned out to not providing the fe with the correct height and width info. ie both reported as 0. The main, maybe related, issue is that it causes an error in the video dll when it tries to grab a frame. Not much I can do about preventing this.
Title: Re: MAME Movie Maker released
Post by: Silver on February 18, 2005, 10:04:14 am
The xvid output of moviemaker can also crash 3darcade i was told. The demo file the guy send me turned out to not providing the fe with the correct height and width info. ie both reported as 0. The main, maybe related, issue is that it causes an error in the video dll when it tries to grab a frame. Not much I can do about preventing this.  :(

peter

Could you test an Xvid file not made with Vdub/MMM? It would be helpful to know if this is a problem just with the codec. (unlikely but possible)

The fact that all players I've tried report the resolution correctly makes me slightly suspicious. Are you using a Directshow decoder?
Title: Re: MAME Movie Maker released
Post by: Silver on February 18, 2005, 10:06:05 am
I would like Silver to contact the author of Virtual Dub regarding this issue. I wonder if it is fixed in 1.6.4.


I will do after a bit of testing here first. Its possible that if Vdub was at fault all videos made by it would fail if it failed to but the resoution info in the header. If only xvid videos fail it could be the codec or a setting or the decoding side.
Title: Re: MAME Movie Maker released
Post by: Silver on February 18, 2005, 10:09:03 am
I've sent some new xvid settings to Buddabing that should roughly half the size of the videos. Xmen went from 90meg to about 48meg. Obviously some quality is lost, should look fine in small preview window though.

I'll try and look into the problems xvid is creating - I may make a few test avis and post them here for people to test to try and rule out some issues.
Title: Re: MAME Movie Maker released
Post by: vibez on February 18, 2005, 12:29:04 pm
I'm thinking of using this tool to make my own video's.

Is it worth me using this tool yet, or hanging fire until the development progresses some more? I'm under the impression this process can take upto a week. is that correct?

I don't want to sacrifice my machine for that long if the tool isn't 99% yet.

Oh, & thanks to the guys who made this possible. It looks amazing
Title: Re: MAME Movie Maker released
Post by: Zero_Hour on February 18, 2005, 12:48:29 pm
I've been using MMM for the last few weeks, and I think that the results are already great for what I need. Yes, it will take you a while to generate a full set of vids, but I just set up batches to run at night or when I'm at work.

I've had minimal issues - and they were mostly related to user error.

I'd say go for it.

And thanks again Buddabing for an excellent tool.
Title: Re: MAME Movie Maker released
Post by: Silver on February 18, 2005, 01:08:42 pm
I'm thinking of using this tool to make my own video's.

Is it worth me using this tool yet, or hanging fire until the development progresses some more? I'm under the impression this process can take upto a week. is that correct?

I don't want to sacrifice my machine for that long if the tool isn't 99% yet.

Oh, & thanks to the guys who made this possible. It looks amazing

I'd say its pretty good right now. Recent work has made the loop detection highly successful.

There is a current issue that the xvid videos seem to crash in some FE's - I'm looking into this now. It works in Mamewah for me, thats the only FE I've tried.

Do a test run of like 20 games you often play, and see if you are happy with the videos. You can set your own compression details, or use the defaults. If you use the defaults - they should be about to change to make the videos smaller so you could hang on for a day or so. Be aware a full set is quite large!

Even when there are 'errors' - ie the full attract mode is not detected - you often end up with a perfectly good attract video that is just not as long as the actual attract (look at dino.zip for an example).

Oh, and definately only create videos for parent roms (set unique 1 and useclones 0 in listgen.ini). This will save loads of space and time.

Anything I've missed anyone?
Title: Re: MAME Movie Maker released
Post by: Lilwolf on February 18, 2005, 01:21:08 pm
http://www.wired.com/news/culture/0,1284,59757,00.html
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 18, 2005, 03:57:01 pm
I've sent some new xvid settings to Buddabing that should roughly half the size of the videos. Xmen went from 90meg to about 48meg. Obviously some quality is lost, should look fine in small preview window though.

I'll try and look into the problems xvid is creating - I may make a few test avis and post them here for people to test to try and rule out some issues.


I got your new xvid settings. 64street's video went down by about a third. I don't see any difference in the video, so I'll definitely put in the changes. I'll keep the old ones around, ifdefed out, for a while. Unfortunately, it looks like elpresidente has changed things around on the mameprojects.com site and I can't upload temporarily.

Vibez: You can always interrupt the movie making process with control-c and rerun it later. The batch process doesn't remake movies that are already made. I ran it 24/7 for a week and interrupted it whenever I needed to.

There is one thing people should do before creating their videos. It was mentioned in this thread before, and I should put it on the first post. They should run each game once in order to create the nvram settings. Some games (Robotron, Qix, Zookeeper, for example) don't behave right the first time the game is run until it is either reset or run again.

I'm going to end up deleting all my videos once everything is finalized. My computer doesn't do anything except fold proteins when it is idle anyway, and electricity is cheap where I live.
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on February 18, 2005, 04:47:11 pm
The xvid output of moviemaker can also crash 3darcade i was told. The demo file the guy send me turned out to not providing the fe with the correct height and width info. ie both reported as 0. The main, maybe related, issue is that it causes an error in the video dll when it tries to grab a frame. Not much I can do about preventing this.
Title: Re: MAME Movie Maker released
Post by: Popcorrin on February 18, 2005, 05:38:26 pm
Maybe one of you guys could clear up a question I have on resolution.
Specifically I am curious on how mmm utilizes the resolution option on the command line.  I recently made a video of tekken and the resolution specified by the listgen is 640x480.  This is of course what I used in the batch but I noticed though that the pngs all had a resolution of 512x240 and that the resulting movie was twice as wide as it is tall.  While mmm is running mame in order to create the movie the aspect ratio looks correct.  I also tried the moviesquare option but the resulting movies looked the same as before.  I have my mame.ini set as follows.  Just curious what I need to do to get movies with the correct aspect ratio.

### MAME.ini ###

### Frontend Related ###
clones                  1

### Windows path and directory options ###
rompath                 roms
samplepath              samples
# inipath               <NULL> (not set)
cfg_directory           cfg
nvram_directory         nvram
memcard_directory       memcard
input_directory         inp
hiscore_directory       hi
state_directory         sta
artwork_directory       artwork
snapshot_directory      snap
moviesnap_directory     moviesnp
diff_directory          diff
ctrlr_directory         ctrlr
cheat_file              cheat.dat
history_file            history.dat
mameinfo_file           mameinfo.dat

### Windows video options ###
autoframeskip           0
frameskip               0
waitvsync               1
triplebuffer            0
window                  1
ddraw                   1
direct3d                0
hwstretch               1
# screen                <NULL> (not set)
cleanstretch            auto
resolution              auto
refresh                 0
scanlines               0
switchres               0
switchbpp               1
maximize                1
keepaspect              1
matchrefresh            1
syncrefresh             0
throttle                1
full_screen_brightness   0.000000
frames_to_run           0
effect                  none
screen_aspect           4:3

### Windows Direct3D 2D video options ###
zoom                    2
d3dtexmanage            1
d3dfilter               1
d3dfeedback             0
d3dscan                 100
d3deffectrotate         1
d3dprescale             auto
d3deffect               none
# d3dcustom             <NULL> (not set)
# d3dexpert             <NULL> (not set)

### Windows misc options ###
sleep                   1
rdtsc                   0
high_priority           0

### Windows sound options ###
audio_latency           1
# wavwrite              <NULL> (not set)

### Input device options ###
mouse                   0
joystick                0
lightgun                0
dual_lightgun           0
offscreen_reload        0
steadykey               0
keyboard_leds           1
led_mode                ps/2
a2d_deadzone            0.300000
# ctrlr                 <NULL> (not set)
paddle_device           keyboard
adstick_device          keyboard
pedal_device            keyboard
dial_device             keyboard
trackball_device        keyboard
lightgun_device         keyboard
digital                 none

### Mame CORE video options ###
norotate                0
ror                     0
rol                     0
autoror                 0
autorol                 0
flipx                   0
flipy                   0
debug_resolution        auto
gamma                   1.000000
brightness              1.000000
pause_brightness        0.650000

### Mame CORE vector game options ###
antialias               1
translucency            1
beam                    1.000000
flicker                 0.000000
intensity               1.500000

### Mame CORE sound options ###
samplerate              44100
samples                 1
resamplefilter          1
sound                   1
volume                  0

### Mame CORE misc options ###
artwork                 0
use_backdrops           1
use_overlays            1
use_bezels              1
artwork_crop            0
artwork_resolution      2
cheat                   0
debug                   0
# playback              <NULL> (not set)
# record                <NULL> (not set)
log                     0
maxlogsize              10000
oslog                   0
skip_disclaimer         1
skip_gameinfo           1
skip_validitychecks     1
crconly                 0
bios                    default
# state                 <NULL> (not set)

### Configuration options ###
readconfig              1
verbose                 0

### Options added by Buddabing ###
intmakectrl             1
extmakectrl             0
noshowctrl              0
makemovie               1
minmoviestart           200
minmovielength          800
maxmovielength          10000
moviethreshold          2
movieaudio              0
movievideo              3
skip_warnings           1
movieloops              1
moviesquare             0
moviecompression        1
moviestartframe         0
movieendframe           0
moviematchlength        10
movieskipblack          1


While on the subject of resolution I have always been confused with the fact that some games have resolutions that are nowhere near a 4/3 aspect ratio but they are almost always displayed on a standard screen with a 4/3 aspect ratio.  Exactly how does that work?
Title: Re: MAME Movie Maker released
Post by: donnyj on February 18, 2005, 11:26:24 pm
possible bug, please check....

I cannot get reset to work with "kiwame", when just using mmm without movie mode, it works.... but I cannot get it to reset in movie mode.... ????????????????????

reset is required to get the game to run....
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 18, 2005, 11:42:18 pm
possible bug, please check....

I cannot get reset to work with "kiwame", when just using mmm without movie mode, it works.... but I cannot get it to reset in movie mode.... ????????????????????

reset is required to get the game to run....


That's not a bug, that's a feature. :)

All user interface input (tab, pause, etc) except ESC is disabled in movie mode.

I did it so accidental keypresses would not mess up the movie.

I guess I can rethink that strategy. I did not foresee this problem, I've never played "kiwame", or even heard of it. No wonder, it's mahjong, and it's not even pr0n!!

I'll think about your suggestion.
 
Title: Re: MAME Movie Maker released
Post by: donnyj on February 19, 2005, 12:09:10 am
I think it's a good feature....  just wondered what was up =]
Title: Re: MAME Movie Maker released
Post by: vibez on February 19, 2005, 08:02:59 am
Thanks guys. I'll maybe give this movie maker a run next week :)
Title: Re: MAME Movie Maker released
Post by: Popcorrin on February 19, 2005, 04:13:51 pm
Buddabing or anyone else have any advice regarding my earlier post about my resolution issues?
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 19, 2005, 04:25:40 pm
Buddabing or anyone else have any advice regarding my earlier post about my resolution issues?

ListGen gets the resolution out of the XML data generated by MAME. If the resolution of the png snapshots is different, it's possible that MAME changes the resolution on the fly. It happens with several games, there was a mini-discussion about it in this thread.

The batch file feeds the resolution parameter directly into MAME. This is done so that the movie frames, and thus the resulting movie, will be exactly the size that the original game was. If you want, edit your batch.bat so that the -resolution parameter is not there. That will let MAME decide what resolution to use (change other appropriate options in mame.ini if applicable) I think you'll find that MAME will run at a much higher resolution and your aspect ratio will be fixed, but at the cost of a lot of time and space.

Also make sure artwork is turned off during movie generation.
Title: Re: MAME Movie Maker released
Post by: Popcorrin on February 19, 2005, 06:29:42 pm
I guess I am not so much concerned with the resolution as I am the aspect ratio.  The game is displayed with the correct 4/3 aspect ratio but the resulting png's are not and the movie ends up with the same aspect ratio as the pngs.  With tekken for instance the movie ends up being twice as wide as it is tall.  I know most frontends can stretch the movies to the correct aspect ratio but I would rather create movies that have the correct aspect ratio.
I also tried the moviesquare option and it didn't seem to change a thing in the creation process.  The movies looked identical to what was created without it.
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on February 19, 2005, 10:13:43 pm
Buddabing or anyone else have any advice regarding my earlier post about my resolution issues?

ListGen gets the resolution out of the XML data generated by MAME. If the resolution of the png snapshots is different, it's possible that MAME changes the resolution on the fly. It happens with several games, there was a mini-discussion about it in this thread.

Actually.....  even in windowed mode.... windows mame doesn't support "tweaked" resolutions  (ie screen sizes that you normally wouldn't see windows suporting) and thus 90% of the resolutions supplied by the listdetails data are simply ignored when inputted into mame.  They will be close, but not always the same. 

Thus why I simply set them all to 320x240 and let mame figure out the rest.....  i'm assured that the resulting video won't be larger than 320 pixels wide.  You can do the same thing with smaller resolutions..

For an example of this simply type:

mame pacman -window -resolution 255x255x32

pacman will show up with the height being no greater than 255, but the aspect ratio of the game will not be ignored and thus the resulting window will not be square.

I thought you guys knew this.... it's mame 101 ;)

You can turn off aspect ratio enforcment of course... but what's the point if mame does all the work for you?
Title: Re: MAME Movie Maker released
Post by: Popcorrin on February 20, 2005, 10:02:16 am
Howard, why do the png's and the resulting video have a totally different aspect ratio than what mame displays while the game is being played?  The aspect ratio on the videos is proportional to the resolution rather than your standard 4/3 aspect ratio. 
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on February 20, 2005, 02:46:47 pm
well... afaik  when mame takes a screenshot, it just dumps the video buffer.... snapshots will always be the same size regardless of what resolution you are in when they are taken.  However this isn't the issue here. 

I guess the real question is... is mmm sending vdub the actual resolution of the window, or is it just going by the "resolution" flags you send mame through the command line.  Because as I've pointed out....  the resolution flags essentially have no bearing on actual output.  It would make sense to me at least, to have the video the same size as the window you had mame in when you captured the thing.  Makes for wysiwyg  user-friendlyness
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 20, 2005, 03:08:41 pm
well... afaik  when mame takes a screenshot, it just dumps the video buffer.... snapshots will always be the same size regardless of what resolution you are in when they are taken.  However this isn't the issue here. 

I guess the real question is... is mmm sending vdub the actual resolution of the window, or is it just going by the "resolution" flags you send mame through the command line.  Because as I've pointed out....  the resolution flags essentially have no bearing on actual output.  It would make sense to me at least, to have the video the same size as the window you had mame in when you captured the thing.  Makes for wysiwyg  user-friendlyness


Vdub uses the resolution of the pngs. It needs the pngs to be all the same size, which is the cause of the problems we had with resolution-switching games.

I suppose we can remove the -resolution thing. I thought it was important at the time to get the window to be at the same resolution that the original game used, to get the wysiwyg effect.
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on February 20, 2005, 04:50:12 pm
well... afaik
Title: Re: MAME Movie Maker released
Post by: Popcorrin on February 21, 2005, 12:00:29 am
I have my ini set up as you suggest and the game looks right while it is playing it's just that the resulting video is squashed.  Just curious, has anyone else tried to make a video of tekken and how did it turn out?
Title: Re: MAME Movie Maker released
Post by: Silver on February 21, 2005, 12:35:00 am
@Popcorrin:

I've just tried Tekken, and yes it looks squashed - or rather, stretched horizontally. The pngs (and thus the video) are all 512 pixels wide by 240 pixels high. (ie stretched). This appears to be similar to other tekken (psx?) games... although interestingly Tekken3 actually switches to 512x480 according to mame.

I'm not sure what the problem is here as the games look fine playing. Either they really are 512x240 and mame is doing some aspect correcting / pixel resizing (although I would have hoped this would happen for the snapshots too) or there is a bug/error where the snaps are being stretched because the game is reporting its size incorrectly at some point.

I think its an error as the game is clearly NOT playing in 512x240.
I also noticed that I appear to be un-able to force the resolution for the tekken games. Is this a driver limitation? eg I can run mslug at 512x240 and looks completely streched - just like the tekken snaps.
Title: Re: MAME Movie Maker released
Post by: Silver on February 21, 2005, 12:40:58 am
RE: Xvid crashing some FE's.

I've made a few test avis that should help to rule out whether its settings in Xvid or Xvid itself.

First off, could someone try the original Xvids with Post-processing turned off. (Startmenu-Xvid-DevoderConfig. Uncheck boxes in post-processing section.

Then it would be great if someone with the FE's could try these files and report back. They are about 50k and just have a few frames from zookeeper:

http://www.silverfoxy.plus.com/zkNoAQ-GMC-QP.avi
http://www.silverfoxy.plus.com/zkNoAQ-GMC-QP-ASL1.avi
http://www.silverfoxy.plus.com/zkNoAQ-GMC-QP-Chroma.avi
http://www.silverfoxy.plus.com/zkNoAQ-GMC-QP-Chroma-BVOP.avi
http://www.silverfoxy.plus.com/zkNoAQ-GMC-QP-Chroma-BVOP-DX.avi
http://www.silverfoxy.plus.com/zkDivx.avi

Note you may need DivX installed to test the last one or two.
Title: Re: MAME Movie Maker released
Post by: Popcorrin on February 21, 2005, 01:13:13 am
@Popcorrin:

I've just tried Tekken, and yes it looks squashed - or rather, stretched horizontally. The pngs (and thus the video) are all 512 pixels wide by 240 pixels high. (ie stretched). This appears to be similar to other tekken (psx?) games... although interestingly Tekken3 actually switches to 512x480 according to mame.

I'm not sure what the problem is here as the games look fine playing. Either they really are 512x240 and mame is doing some aspect correcting / pixel resizing (although I would have hoped this would happen for the snapshots too) or there is a bug/error where the snaps are being stretched because the game is reporting its size incorrectly at some point.

I think its an error as the game is clearly NOT playing in 512x240.
I also noticed that I appear to be un-able to force the resolution for the tekken games. Is this a driver limitation? eg I can run mslug at 512x240 and looks completely streched - just like the tekken snaps.

At least now I know it's not me! :P
Title: Re: MAME Movie Maker released
Post by: Silver on February 21, 2005, 01:46:28 am
Ok realised I was being lazy...   ;D

I'm not going to look at AtomicFE as I saw a post from the author saying video support was basic and uncomplete....

I've tried my own files in 3DArcade, and DivX files made in Vdub are fine - Xvids are not. They all come up with a script "property not found" error, which I'm guessing is the No width or Height Values supplied,as )p( mentioned....

However, using an Xvid video with a FourCC 'header' for DivX makes the Xvid video decode perfectly. All this does is make the video be decoded by the DivX decoder not the Xvid decoder (As they are both Mpeg4 compliant, we would expect them to be able to decode each other). This suggests to me that the error lies either in the Xvid decoder, or (unlikely) a strange bug in Vdub that only applies to videos with a Xvid FourCC.

If I lost you, don't worry - just in case someone who knows this stuff can help. I will continue looking into it.
Title: Re: MAME Movie Maker released
Post by: Silver on February 21, 2005, 02:10:12 am
@3D arcade users:

A workaround that worked for me is to go into Xvid Decoder Configuration, and select "Compatibility Renderer".

This may be to do with aspect ratio. Does anybody know if 3D Arcade attempts to change the aspect ratio of video files?
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 21, 2005, 09:43:53 am
@3D arcade users:

A workaround that worked for me is to go into Xvid Decoder Configuration, and select "Compatibility Renderer".

This may be to do with aspect ratio. Does anybody know if 3D Arcade attempts to change the aspect ratio of video files?

I think it does. That's why the -moviesquare option was created.
Title: Re: MAME Movie Maker released
Post by: Silver on February 21, 2005, 03:34:07 pm
Aha yes I had forgotton about the moviesquare option...

@Popcorrin

the moviesquare option changes the resolution to 256x256 within Vdub, not the size of the pngs from mame. It works for me (tekken comes out square - better but still ugly, but not stretched). This is not a good solution though.

Buddabing do you know why tekken/tekken2 png's come out a completely different size to the game?

Also regarding scripting changes in Vdub 1.6.4 - I think I've missed another change to do with:

VirtualDub.video.SetInputFormat(0);
VirtualDub.video.SetOutputFormat(7) ;

It appears he has changed it to read:

VirtualDub.video.SetInputFormat(5);
VirtualDub.video.SetOutputFormat(5);

This appears to work in 1.6.2 as well, but as there is absolutely no documentation in existence for these that i can find I will contact the author to confirm....
Title: Re: MAME Movie Maker released
Post by: Popcorrin on February 21, 2005, 03:49:26 pm
I noticed while playing tekken if you pull up the tab menu and select game information it does give a resolution of 512x240 and tekken2 shows a resolution of 512x480, so I am guessing the png snapshot resolution is directly related to the pixel resolution that the game is outputting and not necessarily what is showing up on the screen.

Silver thanks for  letting me know how the moviesquare option works.
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 21, 2005, 04:09:56 pm
Aha yes I had forgotton about the moviesquare option...

@Popcorrin

the moviesquare option changes the resolution to 256x256 within Vdub, not the size of the pngs from mame. It works for me (tekken comes out square - better but still ugly, but not stretched). This is not a good solution though.

Buddabing do you know why tekken/tekken2 png's come out a completely different size to the game?


No idea. Unfortunately I don't have those roms. I would need to play around with putting messages in the png library and logging the output.

Quote

Also regarding scripting changes in Vdub 1.6.4 - I think I've missed another change to do with:

VirtualDub.video.SetInputFormat(0);
VirtualDub.video.SetOutputFormat(7) ;

It appears he has changed it to read:

VirtualDub.video.SetInputFormat(5);
VirtualDub.video.SetOutputFormat(5);

This appears to work in 1.6.2 as well, but as there is absolutely no documentation in existence for these that i can find I will contact the author to confirm....

Does the new SetOutputFormat have anything to do with fixing the Xvid decoder issue? What effect does this change make?

I'll make this change in the next binary, probably tomorrow.
Title: Re: MAME Movie Maker released
Post by: Silver on February 21, 2005, 04:20:42 pm
Does the new SetOutputFormat have anything to do with fixing the Xvid decoder issue? What effect does this change make?

I'll make this change in the next binary, probably tomorrow.


No the decoder issue seems seperate - and not Vdub related. I can see no difference in the resulting file using 5,5 instead of 0,7 but I have not tested many files. I have emailed the author for more info as the instructions are un-documented.

RE: tekken - I can send you the rom for testing if you wish although its 15megs. I have not found any smaller games that do this yet....
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 21, 2005, 05:10:26 pm
Does the new SetOutputFormat have anything to do with fixing the Xvid decoder issue? What effect does this change make?

I'll make this change in the next binary, probably tomorrow.


No the decoder issue seems seperate - and not Vdub related. I can see no difference in the resulting file using 5,5 instead of 0,7 but I have not tested many files. I have emailed the author for more info as the instructions are un-documented.

RE: tekken - I can send you the rom for testing if you wish although its 15megs. I have not found any smaller games that do this yet....

I'd rather you post it to your site, if possible. You can email me a link to it.
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 21, 2005, 11:05:17 pm
I have my ini set up as you suggest and the game looks right while it is playing it's just that the resulting video is squashed.  Just curious, has anyone else tried to make a video of tekken and how did it turn out?

Okay, I've gotten the tekken rom and I'm getting the funny pngs.

But Tekken's video is "not 100% accurate" and the game has no sound. Maybe the not 100% part is a hack to get the squished image back into correct aspect. Since the game isn't completely working, we should not expect a perfect movie to be produced, should we?

Is there a 100% working game that has the problem? Does any non-namcos11 game have the problem? Do all the namcos11 games have this same issue? I don't have the roms so I can't tell.


Title: Re: MAME Movie Maker released
Post by: Popcorrin on February 21, 2005, 11:38:46 pm
Tekken 2 produces a movie that looks decent.  I believe the pngs had a resolution of 512x480.
 Another game that is fully emulated that produces a video that is somewhat stretched is 1941, albeit not to the degree that tekken does.
Title: Re: MAME Movie Maker released
Post by: Silver on February 22, 2005, 12:00:34 am
Namco system 11 games in mame:

tekken
tekkena
tekkenb
tekken2
tekken2a
tekken2b
souledge
souledga
souledgb
dunkmnia
dunkmnic
xevi3dg
primglex
danceyes
starswep
myangel3
ptblank2


ptblank2,myangel3,starswep do not appear to exhibit the problem.

tekken,tekken2,souledge,dunkmnia,xevi3dg,primglex all do.

I did not test the clones. Interestingly, it appears the the games without the issue do not use 3D, but the others do. So it clearly seems to be an issue with the 3D part of the driver.

Obviously its not listed as a 100% driver, but it would be interesting to know if this is an actual error or in fact a side effect of how the orignal games worked. Its PSX based hardware so I'm not sure who to ask.

@popcorrin - funny, I get the streched pngs produced for tekken2....?
Title: Re: MAME Movie Maker released
Post by: Silver on February 22, 2005, 06:23:40 am
@Buddabing

I was incorrect in my post about the SetInputFormat/Setoutputformat changing. This is incorrect.

The error messagebox is actually caused by an incorrect command line parameter in the batch - in this case the /wait command (In your 1st post of the thread). I believe this is ignored by 1.6.2 and simply errors 1.6.4. Removing the /wait from batch.bat solves the error.

On the plus side, I now have documentation for the SetInput instructions. I believe we should use:

VirtualDub.video.SetInputFormat(0);
VirtualDub.video.SetOutputFormat(0);

This simply autodetects the input and matches the output to this. This works fine in 1.6.2 and 1.6.4
I'll email you the full docs.
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 22, 2005, 02:12:20 pm
New binary uploaded.

Changes:

- XVid decoder (-movievideo 3) changed to reduce the size of the resulting avi.
- SetInputFormat(0) and SetOutputFormat(0) instead of 7 in vdb script.

I've also edited the batch.bat on the first page to remove the /wait parameter to VirtualDub.



Title: Re: MAME Movie Maker released
Post by: donnyj on February 22, 2005, 11:28:06 pm
ok, I ran a bunch of test before (91) and now all the numbers are off several frames....  frustrating!  Also, I've upgraded to 92 and I cannot get movieloops 3 to work and still show detected loops, I am sure I am doing something wrong, but what?  =[

makemovie               1
minmoviestart           0
minmovielength          800
maxmovielength          10000
movieaudio              1
movievideo              3
skip_warnings           1
movieloops              3
moviesquare             0
moviesnap_directory     E:\\mamesnap
moviecompression        3

mamemm %1 -window -moviesnap_directory E:\\mamesnaps\\%1 -wavwrite %1.wav

BTW, while waiting for the code to settle, I used (abused) MMM to make hi-res titleshots of ALL the non-clones, fun eh?
Title: Re: MAME Movie Maker released
Post by: Taborious on February 23, 2005, 09:08:44 am
Ok, I read the first 2 pages of this post and didn't see anything so I'm going to post the stupid semi-newbie question.

What is this used for? Creating demo game play?
Title: Re: MAME Movie Maker released
Post by: donnyj on February 23, 2005, 09:28:12 am
Ok, I read the first 2 pages of this post and didn't see anything so I'm going to post the stupid semi-newbie question.

What is this used for? Creating demo game play?

For the creation of attract-mode videos, for front end usage (or whatever usage you come up with)
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 23, 2005, 09:33:07 am
ok, I ran a bunch of test before (91) and now all the numbers are off several frames....
Title: Re: MAME Movie Maker released
Post by: donnyj on February 23, 2005, 10:26:01 am
could you kindly try movieloops 3 mode and see if you get the detected loop inserted into the VDB file?

I really want to test out the new detection.

Also, I don't understand how changing the MMM portion would change the actual loops?  I am saying that the physical frame numbers have changed with hand-optimized values  ???

Keep up the awesome work!
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 23, 2005, 11:45:13 am
could you kindly try movieloops 3 mode and see if you get the detected loop inserted into the VDB file?

I really want to test out the new detection.

Also, I don't understand how changing the MMM portion would change the actual loops?
Title: Re: MAME Movie Maker released
Post by: DreamWeb on February 24, 2005, 12:17:15 am
Huy Buddabing!

This looks like a great program.. and I'm anxious to see it in action.  However, I can't even get listgen to create a makemovies.bat with something inside it.

This is what my listgen.ini looks like.

rompath e:\roms\
mamepath d:\mame\
frontend moviebatch
verbose 0
silent 0
audit_roms 1
use_clones 1
unique 0
us_version_priority 0
world_version_priority 0
strip_description 0
japan_version_priority -1
reuse_mame_data 1
output makemovies.bat
force_uppercase_romnames 0
force_lowercase_romnames 0

My directories are definitely correct.

This is what happens when I run listgen.exe

D:\Documents and Settings\David Pritchett\Desktop\movies>listgen
Calling MAME to get version
MAME version is 0.92
Calling MAME to build listxml.txt
Calling MAME to build gamelist.txt
Calling MAME to build listful.txt
Scanning XML game info
Failed to open catver.ini, list may be inaccurate
Failed to open nplayers.ini, list may be inaccurate
Failed to find gameplay.ini, list may be inaccurate
Processing gamelist.txt
Processing listfull.txt
Writing intermediate file listgen.tmp
Reading intermediate file into filter database
Filtering database into result.tmp
Writing game list to makemovies.bat

D:\Documents and Settings\David Pritchett\Desktop\movies>

I suspect it might be because of my catver.ini, nplayers.ini, and gameplay.ini...  but those are all in the mame root.

I'm missing something obvious, huh?

Thanks!

d.
Title: Re: MAME Movie Maker released
Post by: Silver on February 24, 2005, 12:52:17 am
check the filter.sql file. This is where which games are selected are defined....

Lines starting with -- are ignored.

The first line should be:

select * from gamedata;

make sure it does not have -- in front of it, and make sure all the other lines do. See if that helps.
Title: Re: MAME Movie Maker released
Post by: DreamWeb on February 24, 2005, 02:08:32 am
Thanks, Silver.

That definitely did it.  I now have my makemovies.bat

But.. now there must be a problem with the batch.bat

This is my batch.bat

@if not exist D:\Documents and Settings\David Pritchett\Desktop\movies mkdir D:\Documents and Settings\David Pritchett\Desktop\movies\movies
@if exist D:\Documents and Settings\David Pritchett\Desktop\movies\movies\%1.avi goto end
time /T
@mame %1 -window -makemovie -resolution %2 -wavwrite %1.wav
@if not exist %1.vdb goto end
@\virtualdub\virtualdub /s"%1.vdb" /x
@del %1.wav
@del %1.vdb
@del /Q moviesnp\*.png
@move /Y %1.avi D:\Documents and Settings\David Pritchett\Desktop\movies\movies
time /T
:end

And this is what I get when I run it or makemovies.bat

----

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

D:\Documents and Settings\David Pritchett\Desktop\movies>batch
'and' is not recognized as an internal or external command,
operable program or batch file.

D:\Documents and Settings\David Pritchett\Desktop\movies>time /T
02:07 AM
'mame' is not recognized as an internal or external command,
operable program or batch file.

D:\Documents and Settings\David Pritchett\Desktop\movies>


---

sorry for the ridiculously newbie questions.   And thanks again for the help.

david
Title: Re: MAME Movie Maker released
Post by: Silver on February 24, 2005, 03:29:10 am
Try putting " " around all your directory names in the batch - at least all the ones with spaces in them.

ie:

@if not exist D:\Documents and Settings\David Pritchett\Desktop\movies mkdir D:\Documents and Settings\David Pritchett\Desktop\movies\movies

becomes:

@if not exist "D:\Documents and Settings\David Pritchett\Desktop\movies" mkdir "D:\Documents and Settings\David Pritchett\Desktop\movies\movies"

that should help. (Personally, I don't like having stuff in directories off the desktop - although this makes no difference.)

If you still have problems try using a directory with no spaces.

eg: C:\MameMovies

EDIT: Also its not finding mame - you have to run this batch file from the (buddabing) mame directory.

Goto Start menu, select run, type in "cmd" and hit return. Then change to the directory where mame is (eg "cd C:\Emus\Mame") which is hopefully where you also have buddabings mame and run it there.
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 24, 2005, 09:18:47 am
check the filter.sql file. This is where which games are selected are defined....

Lines starting with -- are ignored.

The first line should be:

select * from gamedata;

make sure it does not have -- in front of it, and make sure all the other lines do. See if that helps.


I need to fix that. ListGen should error out if filter.sql (or user specified SQL file) is not found.

You can also use Windows' 8.3 equivalent filename instead of the quotes. On my computer cd \docume~1 is equivalent to cd "\Documents and Settings".

Title: Re: MAME Movie Maker released
Post by: Silver on February 24, 2005, 04:28:41 pm
At one stage my filter.sql was defaulted to (I think from one for your zips?):

select * from gamedata where movieloops='2';

which meant listgen.ini ran fine, but produced a blank output.bat.

And they 8.3 worked fine on my laptop, but I got very confused when it failed on my desktop with files copied over. (Both were Windows XP, NTFS partitions). It turned out that my desktop was configured to not create 8.3 filenames at all - dues to some system-tweak program I ran a while ago. Scratched my head for ages over that one!
Title: Re: MAME Movie Maker released
Post by: donnyj on February 24, 2005, 07:37:40 pm
could you kindly try movieloops 3 mode and see if you get the detected loop inserted into the VDB file?

I really want to test out the new detection.

Also, I don't understand how changing the MMM portion would change the actual loops?
Title: Re: MAME Movie Maker released
Post by: donnyj on February 24, 2005, 07:57:06 pm
It turned out that my desktop was configured to not create 8.3 filenames at all - dues to some system-tweak program I ran a while ago. Scratched my head for ages over that one!

I'm surprised you haven't ran into other problems with that setting (probably have and didn't know it)  I would LOVE to be done with 8.3, but too many old compilers, etc. in use.....

Donny
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 24, 2005, 08:08:19 pm
could you kindly try movieloops 3 mode and see if you get the detected loop inserted into the VDB file?

I really want to test out the new detection.

Also, I don't understand how changing the MMM portion would change the actual loops?  I am saying that the physical frame numbers have changed with hand-optimized values  ???

Keep up the awesome work!


I am sorry Buddabing, I am not communicating well here.  Could you please show me how to run zookeep with both loop detection and running until maxframe is met?

P.S.  In my own defence I just had nose surgery yesterday, so I am even less coherent than normal (scarey eh?)


Modify your batch.bat like Silver recommended:

@if not exist "D:\Documents and Settings\David Pritchett\Desktop\movies" mkdir "D:\Documents and Settings\David Pritchett\Desktop\movies\movies"
@if exist "D:\Documents and Settings\David Pritchett\Desktop\movies\movies\%1.avi" goto end
time /T
@mame %1 -window -makemovie -resolution %2 -wavwrite %1.wav
@if not exist %1.vdb goto end
@\virtualdub\virtualdub /s"%1.vdb" /x
@del %1.wav
@del %1.vdb
@del /Q moviesnp\*.png
@move /Y %1.avi "D:\Documents and Settings\David Pritchett\Desktop\movies\movies"
time /T
:end

I strongly recommend you use a simpler file name, such as given in the sample batch.bat on the first page, because I'm not sure if the directory creation part will work.

Listgen is designed to generate the movieloops parameter. So, if you use the default batch.bat, manually edit the makemovies.bat so that each call to batch.bat uses movieloops 3 instead of 1 or 2.

So, each line of makemovies.bat should say something like:
batch zookeep 320x240 3 0 0
for -movieloops 3

Then, in your mame.ini, set -maxmovielength to whatever you want.

Please post back with any more problems. Hope you recover quickly.
Title: Re: MAME Movie Maker released
Post by: donnyj on February 24, 2005, 08:44:07 pm
thanks for the recovery comment!!!  me too!!!  lots of pain and bleeding

the screen output looks like everything went ok:

<snip>
10-frame match detected between frame 3912 and 9364
movie will run between frames 3903 and 9355
max movie length reached, generating movie between frames 996 and 3729
Average FPS: 29.054363 (9501 frames)

but the vdb isn't....

<snip>
VirtualDub.video.SetRange(0,0);
<snip>
VirtualDub.subset.Clear();
VirtualDub.subset.AddRange(0,0);
<snip>
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 24, 2005, 11:09:56 pm
thanks for the recovery comment!!!  me too!!!  lots of pain and bleeding

the screen output looks like everything went ok:

<snip>
10-frame match detected between frame 3912 and 9364
movie will run between frames 3903 and 9355
max movie length reached, generating movie between frames 996 and 3729
Average FPS: 29.054363 (9501 frames)

but the vdb isn't....

<snip>
VirtualDub.video.SetRange(0,0);
<snip>
VirtualDub.subset.Clear();
VirtualDub.subset.AddRange(0,0);
<snip>


Do you have the most recent binary? It's dated 2/22/05. Also, you can look at the log file (run mame with -log) and see what some of the movie options are set to.  Look for "Movie options set:"

Title: Re: MAME Movie Maker released
Post by: donnyj on February 24, 2005, 11:35:03 pm
I built it from the source 2-22, is the binary different than what is created by compiling the source?

Movie options set:
   movieloops=3, moviesquare=0, moviethreshold=2
   minmoviestart=0, minmovielength=800, maxmovielength=10000
   movieaudio=1, movievideo=3, moviesnap_directory=E:\mamesnaps\4dwarrio
   moviestartframe=0, movieendframe=0, moviematchlength=10
   movieskipblack=1


Title: Re: MAME Movie Maker released
Post by: Silver on February 25, 2005, 12:46:16 am
I'm surprised you haven't ran into other problems with that setting (probably have and didn't know it)  I would LOVE to be done with 8.3, but too many old compilers, etc. in use.....

I have - although only one issue -  16bit msi installers won't run correctly. Apart from that its nice not to see ~1 everywhere....
Title: Re: MAME Movie Maker released
Post by: DreamWeb on February 25, 2005, 01:06:53 am
Hey guys.

Definitely making some progress now.

I moved all the files into my mame directory and this is what I get now when I run makemovies.bat

--------------


D:\mame>time /T
01:00 AM
Could Not Find D:\mame\moviesnp\005*.png
1-frame match detected between frame 268 and 1365
movie will run between frames 268 and 1365
Average FPS: 58.653034 (1305 frames)
The system cannot find the path specified.
The system cannot find the file specified.

D:\mame>time /T
01:00 AM

D:\mame>time /T
01:00 AM
------

And it just sits there.

The mame window came up and displayed the game going through the attract.. and as it was, it sent the screen captures to moviesnp..  So, I know that's at least working.

Then they get deleted... Virtualdub pops up, and performs a dub.  005.avi gets added to my movies directory..  (95 megs)  and then it just sits there.  I'm assuming that it's getting lost at the compression stage or something?   I have Divx installed.

Any suggestions now?

Thanks!

d.
Title: Re: MAME Movie Maker released
Post by: Silver on February 25, 2005, 01:17:11 am
When you say its sits there, does it sit at the:

D:\mame>

prompt?  If the avi is made and moved to the movies directory then you know Vdub has worked and finished. (95 meg sounds very big - it is probably uncompressed? If you want divx you need to set this in the batch file...

I recommend you edit your batch.bat and remove all the @ symbols at the beginning of any lines. This will show you what command is running each time, so you can see where it is hanging. Do that, run it and post here where it is stopping.....
Title: Re: MAME Movie Maker released
Post by: DreamWeb on February 25, 2005, 01:27:28 am
Actually!  I just figured out the problem I described in the previous post.

I installed Xvid and it did the job just fine.  There's no sound yet (for whatever reason)... but I've got a movie that is now 496K as opposed to 95 megs.

After it does the virtualdub job on the first movie.. it just kinda hangs there and does not go on to the next one.  It does not go back to the c: prompt... it just sits there after it shows me the time.

Hmmm

d.
Title: Re: MAME Movie Maker released
Post by: DreamWeb on February 25, 2005, 01:49:45 am
It appears to be having problems with the rom 11beat.zip

If I delete that one from the makemovies.bat... it seems to continue on.

I feel like such a novice here..  but, I'm guessing I need to edit something in filter.sql to make sure than listgen doesn't generate a makemovies.bat with any of the clones?  How would I do this?

You guys are a terrific help.

d.
Title: Re: MAME Movie Maker released
Post by: Silver on February 25, 2005, 06:47:29 am
can you run 11beat.zip with mame normally? check that first.

To only use clones, edit the listgen.ini file so that you have:

audit_roms 1
use_clones 0
unique 1

in there. This should only make a list of parent roms....

Although I've been meaning to ask Buddabing what the unique function does - as all mame roms have a unique name, and there is a use_clones option...
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 25, 2005, 08:32:06 am
can you run 11beat.zip with mame normally? check that first.

To only use clones, edit the listgen.ini file so that you have:

audit_roms 1
use_clones 0
unique 1

in there. This should only make a list of parent roms....

Although I've been meaning to ask Buddabing what the unique function does - as all mame roms have a unique name, and there is a use_clones option...

When you have the unique flag set, it includes only games that have a unique game name. All games will have a unique game name unless the -strip_descriptions flag is set. The strip description removes all text from the game name in parentheses or after a forward slash. That way you don't have set 1, set 2, bootlegs, etc. I like to include clones so that I will have Pac-Man.

I use:
audit_roms 1
use_clones 1
strip_description 1
unique 1


Title: Re: MAME Movie Maker released
Post by: vibez on February 25, 2005, 09:20:21 am
mamewah has an option when generating lists that will only include a clone if it is considered better than the parent. Is there such an option in MMM. I'd like to use clones, but feel its a waste of time if only a few are better than the original
Title: Re: MAME Movie Maker released
Post by: donnyj on February 25, 2005, 08:16:42 pm
11beat is busted, no go whatsoever, mame problem NOT mmm one
Title: Re: MAME Movie Maker released
Post by: DreamWeb on February 26, 2005, 04:05:52 am
Thanks guys.  It's all working now.  And it's terrific.  Thank you for your patience!!

d.
Title: Re: MAME Movie Maker released
Post by: soroth on February 26, 2005, 03:53:52 pm
Isn't there a new mame32-version out with the avi-capture thingie from older mame32 versions built-in ?? This seems a lot easier?  ;)
Title: Re: MAME Movie Maker released
Post by: Buddabing on February 26, 2005, 08:19:47 pm
Isn't there a new mame32-version out with the avi-capture thingie from older mame32 versions built-in ?? This seems a lot easier?  ;)


It's not easier if you want to generate 2000 videos. :)

Title: Re: MAME Movie Maker released
Post by: donnyj on February 28, 2005, 06:32:48 am
Definatly appears as if 93 is a lemon
Title: Re: MAME Movie Maker released
Post by: 2600 on February 28, 2005, 11:28:25 am
A little FYI:

Recently, I was a victim of the squashed aspect ratio problem that was mentioned in a previous post.  Did a little testing and turns out it was the XVID binary I had downloaded (Nic's Binary) instead of the one I believe Buddabing originally suggested www.koepi.org (http://www.koepi.org)

I'm sure it was just a setting somewhere, but by default Nic's resulted in huge files and the aspect ratio was screwed up on playback.  I played the video back on a different player that used a different codec and it displayed correctly.  Don't know if this needs to be added to the first post or if you want to look at it Silver since xvid doesn't have a binary and another user may do what I did and google for an xvid binary.
Title: Re: MAME Movie Maker released
Post by: donnyj on February 28, 2005, 08:06:51 pm
THANK YOU VERY MUCH[/u] (yes I was yelling) for updating past 0.92 !!!!!
Title: Re: MAME Movie Maker released
Post by: donnyj on February 28, 2005, 08:46:31 pm
...the XVID binary I had downloaded (Nic's Binary) instead of the one I believe Buddabing originally suggested www.koepi.org (http://www.koepi.org)

I'm sure it was just a setting somewhere, but by default Nic's resulted in huge files and the aspect ratio was screwed up on playback. I played the video back on a different player that used a different codec and it displayed correctly. Don't know if this needs to be added to the first post

The link to the working xvid codec that creates MUCH smaller (2 megs instead of Nic's 50 megs on 005) is Latest stable binaryXviD-1.0.3-20122004.exe (621kb)
Title: Re: MAME Movie Maker released
Post by: Silver on March 01, 2005, 01:01:02 pm
RE: Xvid. If people stick to the latest Stable binary it should be fine. I have not messed with the others....

Regarding the '11beat' hanging problem, it is a VERY good idea to get the latest catver.ini file in your Buddamame dir and in the filter.sql file include the sql filter to EXCLUDE unplayable games from your batch. If you want to run a lot, this will avoid lots of problems.
The correct syntax is:

select * from gamedata where catver_category <> 'Unplayable';

I'm going to do a run on parents-only of a complete .92 romset (.93 mame is buggy), so long as the game is not listed as unplayable.
Title: Re: MAME Movie Maker released
Post by: brianoneill on March 01, 2005, 01:54:36 pm
Hi. I've started creating movies to use in gameex fe.
The problem I have currently is that the completed videos are running at what seems double speed !
Anyone run into this in there work creating videos ?

Cheers,
Brian.
Title: Re: MAME Movie Maker released
Post by: Silver on March 01, 2005, 01:58:07 pm
I've just made some videos now and they are fine - are you checking them in a standard media player or in a FE?

All the video's are created at 1/2 the original games frame rate. So for a 60fps game we only make a video of 30fps. If played back at 60fps, obviously this would double the speed.... However, all the videos are matched to the length of the audio by Virtualdub, so come out looking fine.
Title: Re: MAME Movie Maker released
Post by: Silver on March 01, 2005, 02:27:10 pm
The AddRange line tells Vdub where to end the movie. So AddRange(0,3291) tells Vdub to end the movie at frame 3291.

The SetRange lines tells Vdub where to start the movie. This value is in milliseconds. To get this value, MMM takes the starting frame number, divides by 29.97 frames per second and multiplies by 1000 milliseconds per second.

It does appear that the movie runs slightly offset from where it should be. I'll experiment with it to see if anything should be changed.


I was thinking about this "slightly offset" problem. It could be due to how you are calculating the start point in milliseconds (which even the Vdub author agrees "is stupid").  To calculate the start point accurately you will ideally need to use the frame rate of the game (and halve it), as some games run at slightly different speeds (57/60/63fps?) - is this info availble in mame?

Also, if most games are 60Hz, you would want to divide by 30 not 29.97.

For example, looking at zookeep: with a start frame of 2774 and it is a 60fps game, the difference is around 100ms, or 6 frames... so currently the video is starting 100ms after the beginning of the detected loop....

On a seperate note, I have been playing with matchlength feature. Are you still planning to add a filter based on year?
Title: Re: MAME Movie Maker released
Post by: brianoneill on March 01, 2005, 03:41:40 pm
I've just made some videos now and they are fine - are you checking them in a standard media player or in a FE?

All the video's are created at 1/2 the original games frame rate. So for a 60fps game we only make a video of 30fps. If played back at 60fps, obviously this would double the speed.... However, all the videos are matched to the length of the audio by Virtualdub, so come out looking fine.

Thanks for the reply.
WHen I play the vid in divx, media player or gameex it runs 2xnormal speed.
When I open it in VirtualDub and select video->frame rate, it states 59.728 as the current frame rate !?
If I change it to 30 and re-save the avi it runs at normal speed but a bit choppy.

It must be how I'm creating the avi in the first place.
Heres some of my mame.ini...

### Windows video options ###
autoframeskip           0
frameskip               0
waitvsync               1
triplebuffer            0
window                  1
ddraw                   1
direct3d                0
hwstretch               1
# screen                <NULL> (not set)
cleanstretch            auto
resolution              auto
refresh                 0
scanlines               0
switchres               0
switchbpp               1
maximize                1
keepaspect              1
matchrefresh            1
syncrefresh             0
throttle                1

### Options added by Buddabing ###
skip_warnings           1
intmakectrl             0
extmakectrl             1
noshowctrl              0
makemovie               0
minmoviestart           200
minmovielength          800
maxmovielength          10000
moviethreshold          2
movieaudio              1
movievideo              3
movieloops              2
moviesquare             0
moviecompression        -1
moviestartframe         0
movieendframe           0
moviematchlength        1
movieskipblack          1
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 01, 2005, 03:46:04 pm
The AddRange line tells Vdub where to end the movie. So AddRange(0,3291) tells Vdub to end the movie at frame 3291.

The SetRange lines tells Vdub where to start the movie. This value is in milliseconds. To get this value, MMM takes the starting frame number, divides by 29.97 frames per second and multiplies by 1000 milliseconds per second.

It does appear that the movie runs slightly offset from where it should be. I'll experiment with it to see if anything should be changed.


I was thinking about this "slightly offset" problem. It could be due to how you are calculating the start point in milliseconds (which even the Vdub author agrees "is stupid").
Title: Re: MAME Movie Maker released
Post by: Silver on March 01, 2005, 04:08:36 pm
Thanks for the reply.
WHen I play the vid in divx, media player or gameex it runs 2xnormal speed.
When I open it in VirtualDub and select video->frame rate, it states 59.728 as the current frame rate !?
If I change it to 30 and re-save the avi it runs at normal speed but a bit choppy.

It must be how I'm creating the avi in the first place.

Hmmm. could you edit your batch.bat file to comment out the line that deletes the vdb file. (try: "rem @del %1.vdb" instead of "@del %1.vdb"). Then create a video - there will be a file called romname.vdb left in the mame directory. Could you open it in a txt editor and paste it here? You can omit the "Setcompression" lines (really long unreadable stuff).

I assume this happens with the binary from Buddabings zip and you have not modified the source etc, and I assume you have installed Xvid binary 1.03...
Title: Re: MAME Movie Maker released
Post by: Silver on March 01, 2005, 04:13:01 pm
I ran zookeep with -movieloops 1 and it detects a loop between frames 558 and 3291. MMM frame numbers start at zero, not one. That might cause a very small discrepancy, depending on how Vdub treats it.

MMM currently takes the start frame, divides by 29.97 and multiplies by 1000. 558*1000/29.97=18618.

I changed it to take the start frame, multiply by 2000 and divide by the frame rate. This gives 558*2000/60=18600.

That's 18 ms difference. Would that be noticible?

I thought the consensus was that the loop detection was good enough so that we didn't need it. But I'll be glad to add the matchlength by year stuff, if yousomeone works out the particulars. :)

I wonder if Avery is going to eliminate the milliseconds issue.


That would not be noticeable I do not think. I just looked at the tweaked figures you posted for zookeep - as this starts at a much later frame, the error is around 100ms - 6 frames. Even thats not massive.

I was only looking because of this error offset mentioned. Could you give me an example of where it occurs?

Matchlength - well only if its needed! I'm away for a few days and going to create a video set, then take a look to see how it does. If its mostly working with the movie match length, then we should leave it.

I have emailed Avery about this, although he mentions in the script docs he knows its really poor.....
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 01, 2005, 04:24:07 pm
I ran zookeep with -movieloops 1 and it detects a loop between frames 558 and 3291. MMM frame numbers start at zero, not one. That might cause a very small discrepancy, depending on how Vdub treats it.

MMM currently takes the start frame, divides by 29.97 and multiplies by 1000. 558*1000/29.97=18618.

I changed it to take the start frame, multiply by 2000 and divide by the frame rate. This gives 558*2000/60=18600.

That's 18 ms difference. Would that be noticible?

I thought the consensus was that the loop detection was good enough so that we didn't need it. But I'll be glad to add the matchlength by year stuff, if yousomeone works out the particulars. :)

I wonder if Avery is going to eliminate the milliseconds issue.


That would not be noticeable I do not think. I just looked at the tweaked figures you posted for zookeep - as this starts at a much later frame, the error is around 100ms - 6 frames. Even thats not massive.

I was only looking because of this error offset mentioned. Could you give me an example of where it occurs?

Matchlength - well only if its needed! I'm away for a few days and going to create a video set, then take a look to see how it does. If its mostly working with the movie match length, then we should leave it.

I have emailed Avery about this, although he mentions in the script docs he knows its really poor.....

I was looking at the end of the Zookeeper video rather than the beginning.

I was playing with Ultrastyle last night and I was able to quickly run through my big batch of videos. They mostly look great. Some of the exceptions are games that need to be run once before creating videos, zookeeper is one. And this was with the old loop detection. I'm going to cull out the ones that don't look good and rerun the batch. Then we'll see if we need any of the matchlength stuff.

I like Ultrastyle. If I can get ListGen to create Ultrastyle game lists, I may end up abandoning my plans to go back to DOS on my cabinet.
Title: Re: MAME Movie Maker released
Post by: brianoneill on March 01, 2005, 04:35:01 pm
thanks.
I'm using buddabings mame & teh 1.03 xvid codec.
heres my mslug4.vdb

VirtualDub.Open("moviesnp\\msl00000.png","",0);
VirtualDub.audio.SetSource("mslug4.wav");
VirtualDub.audio.SetMode(1);
VirtualDub.audio.SetInterleave(1,500,1,0,0);
VirtualDub.audio.SetClipMode(1,1);
VirtualDub.audio.SetVolume();
VirtualDub.audio.SetConversion(0,0,0,0,0);
VirtualDub.audio.SetCompression(85,22050,1,0,3000,1,12,"AQACAAAATgABAHEF");
VirtualDub.audio.EnableFilterGraph(0);
VirtualDub.video.SetInputFormat(0);
VirtualDub.video.SetOutputFormat(0);
VirtualDub.video.SetMode(3);
VirtualDub.video.SetFrameRate(-1,2);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(0,0);
VirtualDub.video.SetCompression(0x64697678,0,10000,0);
..setcomp stuff removed...
VirtualDub.video.filters.Clear();
VirtualDub.audio.filters.Clear();
VirtualDub.subset.Clear();
VirtualDub.subset.AddRange(0,3038);
VirtualDub.project.ClearTextInfo();
VirtualDub.SaveAVI("mslug4.avi");
VirtualDub.audio.SetSource(1);
VirtualDub.Close();

and my batch.bat
@if not exist C:\Emulation\Emus\MameMovie\movies mkdir C:\Emulation\Emus\MameMovie\movies
@if exist C:\Emulation\Emus\MameMovie\movies\%1.avi goto end
time /T
@mame %1 -window -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
rem @del %1.vdb
@del /Q moviesnp\*.png
@move /Y %1.avi C:\Emulation\Emus\MameMovie\movies
time /T
:end

and my makemovies.bat
@call batch mslug4 255x255 2 250 8000
Title: Re: MAME Movie Maker released
Post by: Silver on March 01, 2005, 05:20:48 pm
Hmmm The importnat line in the vdb file is:

VirtualDub.video.SetFrameRate(-1,2);

Which you have and is correct. I just ran your batch and your commandline, and it created a perfect movie for me, which plays at 29.593. Virtualdub reports it as a 29.593fps XviD file too...

What version of Vdub are you using? If its 1.6.3 try 1.6.4. If that solves it let me know as I may have overlooked something when 1.6.4 came out... If its 1.6.4, try uninstalling and reinstalled to set defaults. Again, if this works please say (as it should not make any difference).

If that doesn't work... which Xvid binary did you install? (keoki or Nik.. or something else...)
Title: Re: MAME Movie Maker released
Post by: brianoneill on March 02, 2005, 05:10:39 am
Hmmm The importnat line in the vdb file is:

VirtualDub.video.SetFrameRate(-1,2);

Which you have and is correct. I just ran your batch and your commandline, and it created a perfect movie for me, which plays at 29.593. Virtualdub reports it as a 29.593fps XviD file too...

What version of Vdub are you using? If its 1.6.3 try 1.6.4. If that solves it let me know as I may have overlooked something when 1.6.4 came out... If its 1.6.4, try uninstalling and reinstalled to set defaults. Again, if this works please say (as it should not make any difference).

If that doesn't work... which Xvid binary did you install? (keoki or Nik.. or something else...)

VDub 1.6.4
Xvid 1.0.3 Koiki

When you say re-install virtual dub.
what virtual dub install is there ?
Its just a zip file to be unzipped.

I've tried on two pcs now and both give the same result !? :(
Title: Re: MAME Movie Maker released
Post by: Silver on March 02, 2005, 05:45:31 am
Bingo - found the problem.

I had not realised there was a 0.93 build of MMM was out (sorry). It looks like all the mass changes in the soundsystem in this version may have broken the -wavwrite command. It creates a wav that runs at twice the speed.

Virtualdub uses the duration of the wav to set the length of the video made from all the pngs - this keeps the audio and video in sync. (The beginning of both is then trimmed off as per loop detected.)

In short, use the 0.92 build for now.

@Buddabing

as mentioned above, theres a problem with wavwrite in 0.93. This looks to be system wide (neogeo affected, and zookeep - so I guess its all games).

I will confirm its in the standard 0.93 mame build, then I'll submit a bug report. You may want to pull 0.93 for now....?
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 02, 2005, 09:23:12 am
Bingo - found the problem.

I had not realised there was a 0.93 build of MMM was out (sorry). It looks like all the mass changes in the soundsystem in this version may have broken the -wavwrite command. It creates a wav that runs at twice the speed.

Virtualdub uses the duration of the wav to set the length of the video made from all the pngs - this keeps the audio and video in sync. (The beginning of both is then trimmed off as per loop detected.)

In short, use the 0.92 build for now.

@Buddabing

as mentioned above, theres a problem with wavwrite in 0.93. This looks to be system wide (neogeo affected, and zookeep - so I guess its all games).

I will confirm its in the standard 0.93 mame build, then I'll submit a bug report. You may want to pull 0.93 for now....?


I've removed the links. Did you try updating to .93u1? The patch to update .93 to .93u1 will work on my source.
Title: Re: MAME Movie Maker released
Post by: donnyj on March 02, 2005, 10:42:39 am
&*^*^(*)(*&%^&(&(*), the problem still exists in 93u1!!!!, I just created 48 bad avi files =[... oh well, hopefully the timing won't be broken after the sound is fixed (wah....)
Title: Re: MAME Movie Maker released
Post by: Silver on March 02, 2005, 10:52:55 am
Hmmm, I can't patch -p1 to 93u1 if your files were written in beforehand....

It gives  hunk warning on file usrintrf.c

Anyway, I've had a reply on the Mametesters board saying that this error has already been fixed, so I assume it will be correct in the next update.

There seem to be lots of problems with 0.93, not just audio - several games just crash out. I'd wait for 0.94.....
Title: Re: MAME Movie Maker released
Post by: brianoneill on March 02, 2005, 11:09:33 am
Bingo - found the problem.

I had not realised there was a 0.93 build of MMM was out (sorry). It looks like all the mass changes in the soundsystem in this version may have broken the -wavwrite command. It creates a wav that runs at twice the speed.

Virtualdub uses the duration of the wav to set the length of the video made from all the pngs - this keeps the audio and video in sync. (The beginning of both is then trimmed off as per loop detected.)

In short, use the 0.92 build for now.

@Buddabing

as mentioned above, theres a problem with wavwrite in 0.93. This looks to be system wide (neogeo affected, and zookeep - so I guess its all games).

I will confirm its in the standard 0.93 mame build, then I'll submit a bug report. You may want to pull 0.93 for now....?

thanks.
I went back to 0.92 and all is ok :)
Title: Re: MAME Movie Maker released
Post by: zander on March 03, 2005, 12:21:32 am
I've been following this thread for some time. Great job with this budda and crew.

I was wondering if it is possible to abtract the movie maker program instead of integrating it into a mame build. That way it would be version independent of mame. Sort of like how camtasia studio is independent of mame.

Also I was thinking of building something like maws to host videos for viewing and download. I know the story of roms but what about vids. I'd think there are ok cause no one seems to have problems with the screens shots and flyers all over the place?
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 03, 2005, 09:21:52 am
I've been following this thread for some time. Great job with this budda and crew.

I was wondering if it is possible to abtract the movie maker program instead of integrating it into a mame build. That way it would be version independent of mame. Sort of like how camtasia studio is independent of mame.


A "wrapper" application is possible, I suppose. But the batch file usage is much more convenient.

Quote

Also I was thinking of building something like maws to host videos for viewing and download. I know the story of roms but what about vids. I'd think there are ok cause no one seems to have problems with the screens shots and flyers all over the place?

AFAIK it is okay. However, it is tens of gigabytes of storage we're talking about. MMM was created for the user to create his or her own movies so that he or she could avoid the hassle of so much downloading.

You should host the flyers, cabinets, and panel artwork, too.

Thank you for your interest.

Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on March 03, 2005, 12:14:22 pm
different users may have different requirements as far movie size or encoding, but I'm sure a lot of people would love to not make their movie themselves and just download the finished product. For example even after Buddabing realeased MMM people were asking about the attract video torrent.

On the other side, anyone wanting to host a full set needs to realize the storage and especially bandwidth requirements.
I'd recommend doing "packs" using bittorrent for distribution. For example having the majongh and adults games in separate packs since most people aren't interested in them.
The nice thing about doing a torrent is that not every bit of bandwidth comes from *your* server, and as you do updates, people can still use their old torrent and it will "sync up" and download only the parts that are missing while providing uploads to others for the part that they already have.

Anyway, I compile my own MAME and I want to use the built in CPViewer, so I'll keep using BuddaMame. It gives me total control over the kinds of video I want to make.
Title: Re: MAME Movie Maker released
Post by: zander on March 03, 2005, 03:23:41 pm
OK i understand how big a full set of vids may get. I saw something about ssf discussed earlier. How about if someone (who has the most vids completed already) maintains a database listing of game, resolution, startframe, endframe.  A tested gold standard default list if you will... so others can tweak the list of course but at least we will have a standard to work from. I think having the start and end is important for attracts with non standard loops plus you can cut out any black intro frames, maybe make the overall size smaller, it adds up.  Did anyone do this already? If so where could I get the list. Maybe we should host the list...?
Thanks keep up the cool work.
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 03, 2005, 03:29:40 pm
OK i understand how big a full set of vids may get. I saw something about ssf discussed earlier. How about if someone (who has the most vids completed already) maintains a database listing of game, resolution, startframe, endframe.
Title: Re: MAME Movie Maker released
Post by: zander on March 03, 2005, 03:52:00 pm
Buddabing and silver this is a great thing maintaining the list. It will save many of us time from trying to figure it out.

However when i go to

http://www.silverfoxy.plus.com/AttractVideos.htm

and click the download link i get a file that has only 10 items.

Then if i type this in the browser
http://www.silverfoxy.plus.com/ssf.txt

I get a bigger list  but not still not all the parents. Am I missing something here?
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 03, 2005, 03:57:09 pm
Buddabing and silver this is a great thing maintaining the list. It will save many of us time from trying to figure it out.

However when i go to

http://www.silverfoxy.plus.com/AttractVideos.htm

and click the download link i get a file that has only 10 items.

Then if i type this in the browser
http://www.silverfoxy.plus.com/ssf.txt

I get a bigger list
Title: Re: MAME Movie Maker released
Post by: Popcorrin on March 03, 2005, 10:00:30 pm
Silver or Buddabing, did you guys figure out why mmm videos were not compatible with the 3dArcade frontend?   Did that get fixed?
Title: Re: MAME Movie Maker released
Post by: dbaleckaitis on March 04, 2005, 10:11:51 am
I would like to start off with a big thank you for this; it's a great addon when using MAMEWAH.....

However I seem to be having one problem, Virtualdub doesn't seem to be cutting the videos.
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 04, 2005, 10:17:00 am
I would like to start off with a big thank you for this; it's a great addon when using MAMEWAH.....

However I seem to be having one problem, Virtualdub doesn't seem to be cutting the videos.
Title: Re: MAME Movie Maker released
Post by: dbaleckaitis on March 05, 2005, 12:14:19 am
That worked......Thank you.

Dan
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on March 05, 2005, 11:29:12 pm
the output from listgen is empty.
listgen.tmp contains thousands of lines like this:

005|005|005|1981|Sega|raster|vertical|good|preliminary|preliminary|joy4way|224|256|0|3|4|2|1|2|segar.c||||||||0|0|60.000000|1|yes|no|Yes|Yes|No|Yes|1|0|0|0|
11beat|Eleven Beat|Eleven Beat|1998|Hudson|raster|horizontal|good|preliminary|preliminary||512|512|0|4|3|0|1|1|aleck64.c||||||||0|0|60.000000|0|no|no|No|Yes|No|Yes|1|0|0|0|
1941|1941 - Counter Attack (World)|1941 - Counter Attack|1990|Capcom|raster|vertical|good|good|good|joy8way|224|384|0|3|4|2|2|2|cps1.c||||||||0|0|60.000000|1|no|no|Yes|Yes|Yes|Yes|1|0|0|0|
1941j|1941 - Counter Attack (Japan)|1941 - Counter Attack|1990|Capcom|raster|vertical|good|good|good|joy8way|224|384|1|3|4|2|2|2|cps1.c|1941|1941||||||0|0|60.000000|1|no|no|Yes|Yes|Yes|Yes|1|0|0|0|
1942|1942 (set 1)|1942|1984|Capcom|raster|vertical|good|good|good|joy8way|224|256|0|3|4|2|2|2|1942.c||||||||0|0|60.000000|1|no|no|Yes|Yes|Yes|Yes|1|0|0|0|
1942a|1942 (set 2)|1942|1984|Capcom|raster|vertical|good|good|good|joy8way|224|256|1|3|4|2|2|2|1942.c|1942|1942||||||0|0|60.000000|1|no|no|Yes|Yes|Yes|Yes|1|0|0|0|
1942b|1942 (set 3)|1942|1984|Capcom|raster|vertical|good|good|good|joy8way|224|256|1|3|4|2|2|2|



so I think it finds the games OK
If I set the output to verbose, this is what the end of the log looks like:

Processing listfull.txt
gamelist line: <  turn. Some games also have a "Flip Screen" DIP switch setting
to turn the>
rom name   turn. not found in rom tree
Failed to find ssf.txt, no -movieloops 2 allowed!
Writing intermediate file listgen.tmp
Reading intermediate file into filter database
create temporary table gamedata (  romname varchar[12] unique primary key,  full
_desc varchar[64],  stripped_desc varchar[64] key,  year varchar[4],  manufactur
er varchar[80],  screen varchar[24],  orientation varchar[24],  color varchar[24
],  status varchar[24],   sound varchar[24],   control varchar[36],  width integ
er,  height integer,   isclone integer,  aspectx integer,  aspecty integer,  pla
yers integer,  buttons integer,  coins integer,   sourcefile varchar[24],  clone
of varchar[12],  romof varchar[12],  catver_category varchar[48],  catver_veradd
ed varchar[48],  nplayers_category varchar[32],  gameplay_category varchar[32],
 gameplay_layout varchar[32],  gameplay_mnop integer,  gameplay_nosp integer,  r
efresh varchar[32],  channels varchar[8],  service varchar[8],  tilt varchar[8],
  gamelist_working varchar[8],  gamelist_correct_colors varchar[8],  gamelist_so
und varchar[8],  gamelist_screen_flip varchar[8],  movieloops integer,  moviesta
rtframe integer,  movieendframe integer,  filler integer  );
copy gamedata from 'listgen.tmp' using delimiters '|';
Filtering database into result.tmp
Writing game list to output.txt


What's the filtering step? I see a filter.sql do I need to modify it?
I think I'm missing something.

Thanks

Title: Re: MAME Movie Maker released
Post by: Silver on March 06, 2005, 10:03:55 am
Silver or Buddabing, did you guys figure out why mmm videos were not compatible with the 3dArcade frontend?   Did that get fixed?

Yes its an incompatibility between the Xvid decoder and the call from 3DArcade for video - 3dArcade does not seem to pick up the resolution size and errors out.

To fix - simply go to Xvid Decoder options (Start menu,Xvid,Configure Decoder) and tick the 'Compatibility Renderer' option. They work fine like this. (This should not effect performance at all btw)
Title: Re: MAME Movie Maker released
Post by: Silver on March 06, 2005, 10:06:11 am
the output from listgen is empty.

In my use, I usually find I have the filter.sql file set to filter incorrectly. Check what it is filtering for....
Title: Re: MAME Movie Maker released
Post by: Popcorrin on March 06, 2005, 10:53:04 am
Quote
Yes its an incompatibility between the Xvid decoder and the call from 3DArcade for video - 3dArcade does not seem to pick up the resolution size and errors out.

To fix - simply go to Xvid Decoder options (Start menu,Xvid,Configure Decoder) and tick the 'Compatibility Renderer' option. They work fine like this. (This should not effect performance at all btw)

Quote

Cool, thanks
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on March 06, 2005, 11:14:18 am
the output from listgen is empty.

In my use, I usually find I have the filter.sql file set to filter incorrectly. Check what it is filtering for....

OK, I'm not familiar with the sql syntax but I'll figure it out. Does -- indicate the start of a comment? because if that's the case the default filter file would be set to only generate movies if movieloops=2 (i.e. from your databse rather than autodetect) which wopuld explain my empty list.
I'll experiment...
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on March 06, 2005, 11:41:18 am
OK, I think I'm getting the hang of this. The post on listgen helped too.

Buddabing, my mame executable is not mame.exe but it looks like listgen makes that assumption, putting the name of the executable in mamepath doesn't work either. Not a big deal though, I just renamed the local copy of mame to mame.exe.
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on March 06, 2005, 12:01:54 pm
Buddabing and silver this is a great thing maintaining the list. It will save many of us time from trying to figure it out.

However when i go to

http://www.silverfoxy.plus.com/AttractVideos.htm

and click the download link i get a file that has only 10 items.

Then if i type this in the browser
http://www.silverfoxy.plus.com/ssf.txt

I get a bigger list  but not still not all the parents. Am I missing something here?


so which one are we supposed to get? I assume the one dynamically generated from the htlm page? (the one with 10 entries)

Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on March 06, 2005, 12:09:13 pm
sorry for the deluge of questions today, but after doing some movies by hand I'm now trying to use listgen to automate makingthe full set. The post on listgen mentions PacManFan's gameplay.ini: I can't seem to find a copy of it?

Also: how can I filter out CHD games?

Also: is there some kind of overall log that might alert me to movies that may have failed (I have not played some of the games in my rom collection since I rebuilt my harddrive, so some games may never have had their rom initialized by pressing F2 for example).
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 06, 2005, 12:52:36 pm
sorry for the deluge of questions today, but after doing some movies by hand I'm now trying to use listgen to automate makingthe full set. The post on listgen mentions PacManFan's gameplay.ini: I can't seem to find a copy of it?

Also: how can I filter out CHD games?

Also: is there some kind of overall log that might alert me to movies that may have failed (I have not played some of the games in my rom collection since I rebuilt my harddrive, so some games may never have had their rom initialized by pressing F2 for example).

I don't know how filtering out CHD games can be done. I would sure like to do that, though. I'll look at the source (I need to port 0.94 anyway) and maybe I can make a filter criterion for it.

Gameplay.ini is distributed with Kymaera. I'm not sure how up to date or complete it is.

It might be smart to run each game for a few frames before generating the movies so that the nvram is generated. There was a method for doing this previously in this thread.

The description of your ListGen error tells me you have a missing or bad filter.sql.  All you need is one line:
select * from gamedata;

MAME does not need to be named mame.exe. Do a listgen -showusage for a list of parameters. The one you need is -mamename.

I don't have an overall log, but you can pipe the output of the batch to a file via >, ie. makemovies > log.txt.

HTH,
Buddabing
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on March 06, 2005, 02:43:43 pm
thanks.
I figured out the sql thing.

Great job! I'm glad to see someone that doesn't try to re-invent the wheel every time (such as using mysql), the SQL filtering is very fast and the syntax not that hard to get the hang of.
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on March 06, 2005, 03:14:44 pm
It might be smart to run each game for a few frames before generating the movies so that the nvram is generated. There was a method for doing this previously in this thread.

anyone knows what the option is off hand? I haven't founf it in the thread yet or in the windows.txt file from MAME.
EDIT: the -ftr option is what I was looking for, finally found it in WINDOWS.TXT
I added "mame %1 -ftr 120 -window -resolution %2" before the call to mame that actually generate the movie. Adds a few seconds to the process but it's not that big a deal. I could even check for the presence of an .nv file in the nvram directory to avoid this step when the game has been ran.


Also, I'm toying with the idea of having the movies larger so they are no so fuzzy in full screen playback. I could either post process output.txt to change the resolution when it's below a certain value, or I could add -artres 2 I suppose?
EDIT: I can't seem to figure it out, I can't make a movie at twice the game original resolution.
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on March 06, 2005, 08:34:38 pm
Anyone tried the rom called 4enraya?
It reboots my computer when I try to make a movie! (not just a crash to blue screen or anything)
At first I thought it was because I was using my own athlon XP optimized build(My computer is an Athlon XP 2400+) but it does the same with the buddamame binary provided in the zip file.
I can play the game just fine, I just can't make a movie.

weird and reproduceable.

Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on March 07, 2005, 03:02:02 am
I'm done through the end of "A" and had trouble with the following:

"arlingtn" and "arabian"  both produced the following error in virtualdub" "Cannot initialize video compression due to codec error: the source image format is not acceptable". Not sure what that means. Please note I'm using the DivX codec, not Xvid.

"aircob22" amd "astorm" generated 2:46 minutes of black screen (max frames exceeded). It turns out that when you try to play those it tells you that it doesn't run properly. I thought it would have been filtered by my SQL filter:
select * from gamedata where
   catver_category <> 'Unplayable'
   and catver_category not like '%Mature%'
   and catver_category not like '%Mahjong%'   
   and full_desc not like '%Quiz%'
   and full_desc not like '%Japan%'
order by romname;

Edit: I added "and gamelist_working <> 'No' "

The loop detection still seems to be foiled by black frames, I thought it wasn't supposed to detect black frames?  "avspirit" is one of the games that gets cut short. Others that re not properly detected include: 4in1, 64street, ainferno, alibaba, 8ball, apb, appoooh, 3stooges, ...

several of these games have warnings of sorts but should be playable, although maybe I need to refine my filter to only get really playable ROMS.


other games like 280zzzap don't have the loop detected properly but are good enough to show what the game is about.
Title: Re: MAME Movie Maker released
Post by: Silver on March 07, 2005, 04:37:21 am
so which one are we supposed to get? I assume the one dynamically generated from the htlm page? (the one with 10 entries)

The dynamic one is the correct one - the other ssf.txt is an old file designed to skip startup frames for missing the bios (nothing to do with videos). Perhaps we should change the default name for this? I think listgen looks for ssf.txt though.
Title: Re: MAME Movie Maker released
Post by: Silver on March 07, 2005, 04:45:27 am
I'm done through the end of "A" and had trouble with the following:

"arlingtn" and "arabian"
Title: Re: MAME Movie Maker released
Post by: 2600 on March 07, 2005, 08:11:21 am
Silver,
Haven't had time to help with the SSF recently, but will get to it sometime. 

What version of virtualdub are you using?  I've generated a set using 1.62 on one machine without problems.  I set up another machine with 1.64 and have gotten the out of bounds errors about 5 or so times(I'm up to Y on that machine).  There are a couple of games I noticed may need tweaking, but for the most part everything is great.  Pretty good odds considering well over 2000 attract modes.  (I'm also sticking with .92 romset and .92 version of Mame)
Title: Re: MAME Movie Maker released
Post by: M.A.M.E Power on March 07, 2005, 08:22:54 am
Hi All

Now I really like the idea of this project and would love to be able to incoperate this into my Mamewah. However being relatively new to MAME I need a real basic tuturiol.

This is what I have done so far downloaded the VirtualDub and XvID and Dix X I am running MAME 0.93 what is the binary files for? Do I need these? I have then copied and pasted the two bat files and saved them into the Mame folder under Movies do the bat files stay like this

"@if not exist"?

So i have copied this

 @if not exist e:\mame\movies mkdir e:\mame\movies
@if exist e:\mame\movies\%1.avi goto end
time /T
@mame %1 -window -makemovie -resolution %2 -wavwrite %1.wav
@if not exist %1.vdb goto end
@\virtualdub\virtualdub /s"%1.vdb" /x
@del %1.wav
@del %1.vdb
@del /Q moviesnp\*.png
@move /Y %1.avi e:\mame\movies
time /T
:end
 
and this

@call batch 005 224x256
@call batch 1941 224x384
@call batch 4enraya 256x224
@call batch 4in1 224x256

They have been copied and pasted them as they are in the thread acept I have changed the file paths to accomdate my settings

Ok all where do I copy and paste the Mame.ini file into the ini Mamewah file?

Now I know that this may be really basic to all your programmers etc if anyway has written a simple guide or is just willing to help me try and set this utility up then I would be very grateful.

Thanks for your time

Lea
Title: Re: MAME Movie Maker released
Post by: Silver on March 07, 2005, 08:50:06 am
Silver,
Haven't had time to help with the SSF recently, but will get to it sometime.
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 07, 2005, 08:56:22 am
I'm done through the end of "A" and had trouble with the following:

"arlingtn" and "arabian"
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on March 07, 2005, 11:21:51 am
I'm running this on a 0.92 romset with default settings. The only filter applied is "catver_category <> 'Unplayable'".

I've got to "M" so far. I have had no virtualdub errors at all. There have been a few errors in mame - most of these are due to games not being run before so incorrect bios ram. (Some have run and just made a video of a bios error). I have not had a chance to review them.


I'm running 0.92 also, although my filter is more aggressive for now.
Are you using DivX or XVID? I'm using DivX so that might be the difference?

Not sure why 4enraya crashes my machine. What kind of hardware fo you run on? I wonder if it's something related to the processor type.

Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on March 07, 2005, 11:35:34 am
I'm using the default posted in the first post of this thread for just about everything except that I encode using DivX. If there are better values, could you put them in the top post?

moviematchlength is "hidden" in page 9 of this thread and even though I read the thread several times by now, it didn't "click". I agree that it sounds like the problem though.

since I generated my ini file using buddamame -cc, I'm more than likely using whatever the default is. Is it set to 10 by default? If not is might be a good idea to do that.
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 07, 2005, 11:46:49 am
I'm using the default posted in the first post of this thread for just about everything except that I encode using DivX. If there are better values, could you put them in the top post?

moviematchlength is "hidden" in page 9 of this thread and even though I read the thread several times by now, it didn't "click". I agree that it sounds like the problem though.

since I generated my ini file using buddamame -cc, I'm more than likely using whatever the default is. Is it set to 10 by default? If not is might be a good idea to do that.


It's set to 1 by default for backward compatibility.

I'll make it 10 by default going forward. BuddaMAME v0.94 will be out imminently. I'll also put something about -moviematchlength on the first page.

Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on March 07, 2005, 11:59:50 am
Great thanks!
I'll re-run roms through "A" tonight to see if I get better results (sounds like I will for sure).
Title: Re: MAME Movie Maker released
Post by: Silver on March 07, 2005, 12:23:53 pm
4enraya worked fine for me.

Yes I'm using Xvid not DivX - I've not tested DivX anywhere near as much.

Assuming you can run the game itself normally, then it could be DivX. I will look into it next week to check. The only other thing is if you are using an Athlon64 - I have no idea if that would cause a problem with Vdub/mame but it may be possible. I can't see any other processer having a problem...
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on March 07, 2005, 12:39:12 pm
The problem is not with Vdub, it happens as soon as I launch buddamame with the moveimaking options even though I can play the game with buddamame.
It's pretty rare for a computer to reboot itself consistently like that, which is why I thought that maybe this tried to execute instructions that the Athlon XP doesn't like, but I don't think the binary included in the buddamame 0.92 zip is optimized in any way.
Weird but not a huge issue.
Title: Re: MAME Movie Maker released
Post by: Silver on March 07, 2005, 03:03:49 pm
Hmm, sorry missed the bit about rebooting....

So you can run mame 4enraya and play it fine, but if you run mame -makemovie (moviesettings) 4enraya it reboots your pc?

Does it reboot straight away or at a certain point?

I'm running an AthlonXp too with no problem (WinXP,sp2 for the record). I doubt very much that there is much in BuddaBings code to cause this...

Its possible that its an IO issue with your system. Mame taxes your CPU quite a lot, mame with moviemaker also gets your system to write a load of files as fast as it can - but it would only reboot if you had a faulty system. Do you have another pc to test on?
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on March 07, 2005, 05:07:46 pm
it reboots immediately after running buddamame -makemovie....

I don't buy the "system taxing" part because it's very consistent, always when I run this ROM, and no other that I have found, and always as soon as I start it. My cab comp has been stable and runs pretty cool (47 deg C under load).
 It's possible that it's because of a "flaw" in the comp, but it's got to be very subtle such as generating something that this particular version of the graphics drivers don't like, or something of the sort.  It could be a weird interaction with the sound drivers (Maddog 5.1 in 2.1 mode),  antivirus (AVG), or any number of other things.
I'm not going to worry about it.

I may try it on another comp later, since this is one of the games that's popular with the kids.
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on March 07, 2005, 09:07:45 pm
are you guys happy with the maxmovielength of 10000 or do you run with something different from the default? just wondering, not saying it's a bad default.
Title: Re: MAME Movie Maker released
Post by: 2600 on March 08, 2005, 08:43:34 am
Silver,
I think the virtualdub errors may be my own fault.  I checked 1.6.4 on another machine.  If I see something I'll let you know.
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 08, 2005, 09:11:46 am
are you guys happy with the maxmovielength of 10000 or do you run with something different from the default? just wondering, not saying it's a bad default.

I'm very happy with 10000.

I need to rerun my entire movie collection and then see what exceptions still exist.

For movies in front ends, 10000 should be adequate to hold your attention while selecting a game, thats 2 1/2 minutes or more of video.
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on March 08, 2005, 02:12:15 pm
yes I agree that  it's plenty long for an FE. I just also use the movies for screensaver and I was curious to know if anyone saw a benefit to extend them.

On that same topic, I have been trying to make the movie double their size (at least for the smaller ones) because some look awfull when played (mostly) fullscreen on my 19" monitor.
For the life of me I can't figure it out though :( . I can get mame to render them twice as large on the screen but the movie still ends up smaller.
I tried all kinds of combinations of -artres 2, -zoom 4, manually multiplying the window resolution by 2, etc...

Come to think of it I haven't looked at the virtualdub command file. Maybe buddmame write the resolution in there regardless of what the mame command line does?

I may not not like the results (quality or movie size) once I get it working but I would really like to give this a try. Any help would be appreciated.


Also, for an FE, seeing the NeoGeo animated logo everytime you select a NeoGeo game is kindof annoying, but short of specifying the start frame manually, there isn't much we can do about it is there?
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 08, 2005, 03:04:37 pm
yes I agree that
Title: Re: MAME Movie Maker released
Post by: donnyj on March 08, 2005, 09:40:32 pm
If I understand what papaschtroumpf is saying, he wants to double the resolution of the game itself.  Doubling the resolution of the PNGs is only going to display at the same quality as before.

papaschtroumpf: I haven't found a game yet that the COMPLETE loop extends beyond 20,000 but I am sure a few do.... I believe the best solution currently available would be to extend the minimum frame number...

Buddabing:  how does MMM work?  If I knew a game had the same title sequence, but a different between sequence pattern:

T = Title Screen Loop

T {demo with fighter plane1} T {demo with fighter plane 2} T {demo with fighter plane 3} T {demo with fighter plane 1}....

What would be the best way to detect the end of the loop after plane 3, but before it restarts the loop for 1 again?   Skip to near the end of plane 3 with minmoviestart or minmovielength or something else?

Donny
Title: Re: MAME Movie Maker released
Post by: donnyj on March 09, 2005, 02:34:44 am
Problems please confirm or rebuke these issues...

I ran the # movies that:

select * from gamedata where screen not like 'vector' and status like 'good' and gamelist_working like "Yes";

format:
gamename : Correct/Wrong : Frame Start ( Round(29.97*SetRange/1000) ) [, correct is <frame#>]
1941 : Correct : 860 (28695)
1942 : Wrong : Reported 640 (21354), correct is 5
1943 : Wrong : Reported 5010 (167167), correct is 551
1943kai : Correct : 551 (18385)
1945kiii : Wrong : Reported 52 (1735), correct is 45
19xx : Wrong : Reported 4082 (136202), correct is 1961
2020bb : Wrong : Reported 231 (7707), correct is 222
3countb : Wrong : Reported 231 (7707), correct is 222
3wonders : Correct : 667 (22255)
4dwarrior : Correct : 17 (567)
4enraya : Correct : 204 (6806)
4in1boot : Wrong : Reported 133 (4437), correct is 110
4psimasy : Wrong : Reported 416 (13880), correct is 366
64street : Wrong : Reported 195 (6506), correct is 9
720 : Wrong : Reported 148 (4938), correct is 111
88games : Wrong : Reported 504 (16816), correct is 248
8ballact : Wrong : Reported 264 (8808), correct is 24

Why are we using Setrange () at all?
Title: Re: MAME Movie Maker released
Post by: Silver on March 09, 2005, 06:28:26 am
Well I'm not sure about the correct/incorrect values.

Setrange/Addrange:

Its possible these have changed in recent Vdub updates, but all the docs for scripting only go up to Vdub 1.5.10, and AddRange does not even exist in those.

However, if I recall correctly (cant test right now) we need both so that we can edit the audio to match.

ie we include ALL the pngs in the AddRange when we load vdub, so that we have synced audio/video. Then we tell Vdub only to process what we want with the Setrange command, and it trims BOTH the audio and video.

If we only used Addrange, say starting from frame 500, we would then have to externally trim the wav file correctly. In fact this was how we did it in the original version of MMM by using AviSynth to sync and trim the the video and just feed it into vdub for compressing (Vdub did not support pngs then).

I've emailed about this before (to the Vdub author) and can only hope he allows us to use a frame number in Setrange so we can avoid this silly x29.97 fudge.
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 09, 2005, 10:08:13 am
If I understand what papaschtroumpf is saying, he wants to double the resolution of the game itself.
Title: Re: MAME Movie Maker released
Post by: 2600 on March 10, 2005, 09:09:02 am
Not sure if this one is for Silver or Buddabing, but I was doing some thinking and testing and I noticed the neogeo games are going about 10 frames too far.  It may not just be neogeo, but it was easy to tell because the neogeo bios started up again at the end.  Using latest 94 release and virtualdub 1.64.

I'm not sure if this relates to my moviematchlength, if the checksums don't match, or what.

Title: Re: MAME Movie Maker released
Post by: Buddabing on March 10, 2005, 04:41:16 pm
Not sure if this one is for Silver or Buddabing, but I was doing some thinking and testing and I noticed the neogeo games are going about 10 frames too far.
Title: Re: MAME Movie Maker released
Post by: 2600 on March 10, 2005, 05:04:02 pm
I did a length of 50 and it was definitely longer than 10 frames, more like 50 or 60(i-fun viewer is great). Also, can you explain this.  Here is the output of the last test. Why is Mames FPS Total # frames, less than the other counts?

50-frame match detected between frame 334 and 10212
movie will run between frames 285 and 10163
Average FPS: 33.205449 (10152 frames)


I suppose another possibility is the 29.97 thing, but it does seem to have some correlation with moviematchlength.


BTW, MMM didn't accept 100 as a moviematchlength argument.
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 10, 2005, 05:42:24 pm
I did a length of 50 and it was definitely longer than 10 frames, more like 50 or 60(i-fun viewer is great). Also, can you explain this.
Title: Re: MAME Movie Maker released
Post by: 2600 on March 10, 2005, 07:49:39 pm
Buddabing,
Yeah, 99 is plenty.

I was mainly testing with 3countb I tried it with another neogeo game, aof I believe.  I didn't try it with a non-neogeo game, because I was testing something with the neogeo games.  Let me know if you want me to look at something else though.
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 11, 2005, 10:57:43 am
It might be smart to run each game for a few frames before generating the movies so that the nvram is generated. There was a method for doing this previously in this thread.

anyone knows what the option is off hand? I haven't founf it in the thread yet or in the windows.txt file from MAME.
EDIT: the -ftr option is what I was looking for, finally found it in WINDOWS.TXT
I added "mame %1 -ftr 120 -window -resolution %2" before the call to mame that actually generate the movie. Adds a few seconds to the process but it's not that big a deal. I could even check for the presence of an .nv file in the nvram directory to avoid this step when the game has been ran.


I've added the -ftr 100 nvram generator and a check for %1.nv into the batch.bat on the first page. Good suggestion!
Title: Re: MAME Movie Maker released
Post by: donnyj on March 14, 2005, 05:26:42 am
I'll look at your frame number issue.

Any luck?
Title: Re: MAME Movie Maker released
Post by: donnyj on March 15, 2005, 11:22:23 am
Buddamame:  Did you fix the aspect ratio issues or did mamedev?  Because now all my screenshots are MUCH better?
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 15, 2005, 12:02:18 pm
Buddamame:
Title: Re: MAME Movie Maker released
Post by: 2600 on March 15, 2005, 05:15:11 pm
Buddabing,
I may have found the bug and that I think will start you in the right direction.  If you run it with the a log on, you'll notice that you check the MD5 sum on every other frame.  So for a 10 frame match you have to actually run 20 frames because you are checking every other frame.  You identify the correct end frame when you start matching, but somewhere after I assume is a miscalculation based on the fact that you are on frame 20 instead of 10.

Hopefully this is descriptive enough, I'm in a hurry.
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 15, 2005, 05:33:50 pm
Buddabing,
I may have found the bug and that I think will start you in the right direction.
Title: Re: MAME Movie Maker released
Post by: 2600 on March 15, 2005, 07:57:04 pm
Using Mame .94 and testing with 3countb.   I am using what you suggest for the mame.ini, except for maxmovielength which is 12000.  It's easy to tell using neogeo games because the part that repeats is the BIOS and it has basically a white screen.  Used i-fun viewer to locate the end frame and once you start reading the log from that frame you'll see what I mean. 

I'll rerun the test's tomorrow on 3countb and send you the files.  I'll also test some other roms and maybe another version of mame.

Title: Re: MAME Movie Maker released
Post by: Buddabing on March 16, 2005, 07:38:33 pm
Using Mame .94 and testing with 3countb.
Title: Re: MAME Movie Maker released
Post by: donnyj on March 16, 2005, 08:23:52 pm
Using Mame .94 and testing with 3countb.   I am using what you suggest for the mame.ini, except for maxmovielength which is 12000.  It's easy to tell using neogeo games because the part that repeats is the BIOS and it has basically a white screen.  Used i-fun viewer to locate the end frame and once you start reading the log from that frame you'll see what I mean. 

I'll rerun the test's tomorrow on 3countb and send you the files.  I'll also test some other roms and maybe another version of mame.



I found the problem. When a duplicate frame is found, the match count is not incremented. So, if there is one matched frame, then 100 duplicates, then nine more matched frames, the loop will trigger but will be 100 frames too long.

Changing this to increment the match count even when there are duplicate frames could lead to some false positives. To compensate, I suppose I could not increment the match count, but also count how many duplicates there are during the match, then subtract those out of the loop at the end.

I'll have to experiment both ways. Thanks to 2600 for finding this.



Great News!!!!!

On a lot of movies, if the start is 100 frames too late, then the end goes 100 frames too long which creates a loop (from wrong start to wrong end)...  is this problem related?
Title: Re: MAME Movie Maker released
Post by: 2600 on March 17, 2005, 09:07:08 am
Using Mame .94 and testing with 3countb.   I am using what you suggest for the mame.ini, except for maxmovielength which is 12000.  It's easy to tell using neogeo games because the part that repeats is the BIOS and it has basically a white screen.  Used i-fun viewer to locate the end frame and once you start reading the log from that frame you'll see what I mean. 

I'll rerun the test's tomorrow on 3countb and send you the files.  I'll also test some other roms and maybe another version of mame.



I found the problem. When a duplicate frame is found, the match count is not incremented. So, if there is one matched frame, then 100 duplicates, then nine more matched frames, the loop will trigger but will be 100 frames too long.

Changing this to increment the match count even when there are duplicate frames could lead to some false positives. To compensate, I suppose I could not increment the match count, but also count how many duplicates there are during the match, then subtract those out of the loop at the end.

I'll have to experiment both ways. Thanks to 2600 for finding this.



After thinking about it and rereading your post, I see what you mean by false positives.  Not sure if this is a good solution, but instead of keeping count of the duplicates could you track the first matched frame.  Then you would make the video end with matchframe-1.  Offhand I can't think of any downsides, but maybe you can.
Title: Re: MAME Movie Maker released
Post by: Kook on March 17, 2005, 10:19:51 am
This is a great tool. Nice job Bud. I do have one feature request... when using the automatic loop detection, it would be great if I could specify that I want my saved movies to start in the middle of the loop. Know what I mean? So if I have this option turned on, and let's say the detected loop consists of 300 frames, the AVI will have 300 frames, but the starting frame would be 151 and the ending frame would be 150. Thus when I use the movies as previews in my frontend, and I am scrolling up and down through my list of games, I will see mostly gameplay action in the movie previews instead of intro screens.

Kook
Title: Re: MAME Movie Maker released
Post by: Silver on March 17, 2005, 12:00:00 pm
Thats an interesting idea..... Might look a bit strange starting a random point.

I imagine it would be a lot easier to impliment simply starting the movie from a set point - a fraction of the way into the loop or something. ie miss out the first bit altogther... Not quite as nice, but if you are only after a quick glimpse (and some of the movies are very long) it may serve your purpose....

Having it loop round perfectly would probably require a load of file renaming or building of a script/list.....
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 17, 2005, 12:04:39 pm
I've uploaded a test version which may address the "some videos are too long" issue.

This zip (http://cpmaker.mameprojects.com/files/MAMETEST.ZIP) is 0.94u1, binary only.

I implemented -movieloops 4 for Kook. Basically, it detects the loop as normal, then takes half the length of the loop and keeps capturing frames until that many frames are captured.

So, the movie will contain the second half of the first loop and the first half of the second loop.

Another way to do it would be to shuffle the filenames around. For example, if the loop ran from frame 100 to frame 199, the filenames of the frames would be zoo00100 to zoo00199 (for zookeeper). Then the program would have to rename the files so that zoo00100 would be renamed zoo00150, zoo00101 would become zoo00151, and so forth, and zoo00150 would become zoo00100, zoo00199 would become zoo00149, etc. I chose not to implement it this way for simplicity, but it's the more accurate approach.

<OfficeSpace>Yeeeeah, if you guys would do some tests and see if it runs better, that would be great.</OfficeSpace>

If it does run better for you, I'll go back and change 0.92 and the official source.

Title: Re: MAME Movie Maker released
Post by: 2600 on March 17, 2005, 01:22:31 pm
Speaking of scripts, if anyone is interested I was messing around and have a script that adjusts the start and/or end times.  For example, I run the script in my batch file to remove the neogeo bios screens before virtualdub processes the files.

Let me know if anyone's interested and I'll put it in another thread.

Title: Re: MAME Movie Maker released
Post by: 2600 on March 17, 2005, 01:54:32 pm
Buddabing,
Did a quick test with the test release with the usual 3countb.  The video isn't too long, but something doesn't appear right.

If you take the output,(this changes between runs so don't worry if yours is different):
10-frame match detected between frame 316 and 10194
movie will run between frames 307 and 10185

A: The 10-frame match value is different than the actual run. You'd expect that for the second value under this circumstance, but the begining doesnt' make sense.

B: If you compare the png's the movies is clearly not being made between the two points it says the movie will run between. Looks like the "movie will run between" message is 10 frames too many at the begining and end.  And a quick look at my .vdb file, the addrange is 10175.
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on March 17, 2005, 02:24:50 pm
Speaking of scripts, if anyone is interested I was messing around and have a script that adjusts the start and/or end times.  For example, I run the script in my batch file to remove the neogeo bios screens before virtualdub processes the files.

Let me know if anyone's interested and I'll put it in another thread.


I'm interested. Since I use the videos in mamewah, all the neo-geo games look the same for the first few seconds, whereas the goal is to give the person scrolling down the game list an idea of what gameplay will look like.
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on March 17, 2005, 02:25:54 pm
Buddabing, once you're happy with the fix to the extra frames, can you make a patch for 0.92 (or tell us what to change in what file, I assume it's a pretty localized change).
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 17, 2005, 02:36:23 pm
Buddabing,
Did a quick test with the test release with the usual 3countb.
Title: Re: MAME Movie Maker released
Post by: 2600 on March 17, 2005, 02:44:35 pm

Papa, I promise I will work this change into 0.92.


Sorry, burst into laughter when I saw this.


Got two additional question. 
1. What about the 10-frame match message?
2. You have to fill us in, which method did you implement for this?
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 17, 2005, 03:00:02 pm

Papa, I promise I will work this change into 0.92.


Sorry, burst into laughter when I saw this.


Got two additional question.
Title: Re: MAME Movie Maker released
Post by: 2600 on March 17, 2005, 03:21:15 pm

The way the match algorithm works now, you can have a 10-frame match between frame 100 and frame 200, if the other 90 frames are duplicates. I did not change the "X-frame match detected" message. For clarity, I can change the message to be "X consecutive non-duplicate frames detected between A and B" if you like.


Don't worry I misunderstood what it was saying.


Checked out the new binary and it worked for me. 
Sorry just got your email, let me know if you still need anything.
Title: Re: MAME Movie Maker released
Post by: Kook on March 18, 2005, 01:15:05 am
Less than 24 hours since I asked, and it now does what I asked for! And it works nicely. I did some testing with -movieloops 4. Sure enough, it figures out where the middle of the movie loop is and starts there (instead of at the beginning of the loop). Way to go Buddabing! This is a nice feature when you want to use the movies as previews in your front end. Thus when you are surfing through a list of games in your front end, you only need to look at each preview for a couple seconds to get an idea what the gameplay is like. This is not to say that all videos come out perfect. For example, some games don't show gameplay during their attract sequences, so obviously Movie Maker can't capture it with automatic loop detection and movieloops -4. But hey, this is the best solution I've seen so far.

It would be even better if Movie Maker accomplished the "start in the middle" thing by renaming PNGs before launching VirtualDUB. The movie making process would be faster (I think it would save an average of about 60-90 seconds in generation time per video with my settings) and in some cases the loops would be more perfect. The numbering thing shouldn't be as complicated as you described. Lets say the loop consists of frames blah00100 to blah00199. First, if there are PNGs you don't need (like blah00000 to blah00099) you would erase them, then simply rename the frames in the FIRST HALF of the loop (100 becomes 200, 101 becomes 201, etc). You end up with blah00150 to blah00249. Then just launch VirtualDub. Of course I'm probably totally out to lunch on that. :)

At any rate, I'm a happy camper now.

Kook
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 18, 2005, 10:46:12 am
Less than 24 hours since I asked, and it now does what I asked for! And it works nicely. I did some testing with -movieloops 4. Sure enough, it figures out where the middle of the movie loop is and starts there (instead of at the beginning of the loop). Way to go Buddabing! This is a nice feature when you want to use the movies as previews in your front end. Thus when you are surfing through a list of games in your front end, you only need to look at each preview for a couple seconds to get an idea what the gameplay is like. This is not to say that all videos come out perfect. For example, some games don't show gameplay during their attract sequences, so obviously Movie Maker can't capture it with automatic loop detection and movieloops -4. But hey, this is the best solution I've seen so far.

It would be even better if Movie Maker accomplished the "start in the middle" thing by renaming PNGs before launching VirtualDUB. The movie making process would be faster (I think it would save an average of about 60-90 seconds in generation time per video with my settings) and in some cases the loops would be more perfect. The numbering thing shouldn't be as complicated as you described. Lets say the loop consists of frames blah00100 to blah00199. First, if there are PNGs you don't need (like blah00000 to blah00099) you would erase them, then simply rename the frames in the FIRST HALF of the loop (100 becomes 200, 101 becomes 201, etc). You end up with blah00150 to blah00249. Then just launch VirtualDub. Of course I'm probably totally out to lunch on that. :)

At any rate, I'm a happy camper now.

Kook

I implemented the renaming method instead of the run another loop method. It's faster and more accurate. It's also another 100 lines of code, but who's counting?

What it does is takes the bla00100 and swaps it with bla00150, bla00101 swaps with bla00151, etc, up to bla00149 swapping with bla00199. If the loop has an odd number of frames, lets say from frame 100 to 200 in your example, then frame bla00100 overwrites bla00200 at the end. I don't believe it matters since I believe that VirtualDub uses every other frame anyway.

If you guys want I can implement a -movieskipframes option which would skip a specified number of frames at the beginning of the loop. So if you know the neogeo screen is 150 frames you could specify -movieskipframes 150. The -movieskipframes would be useful if you filter the list beforehand to include only neogeo games. Wouldn't this be easier than a script?

Title: Re: MAME Movie Maker released
Post by: 2600 on March 18, 2005, 10:55:06 am
Buddabing, if you want to add the movieskipframes that would be great.

It would be a lot easier because the script that I wrote has to use the setrange time which I don't think is as accurate as the frames.  At least not the results I'm getting.  I was going to post the script before and decided against it and was in the middle of posting it again, but I think it is just too hard for a casual user to use easily.


Title: Re: MAME Movie Maker released
Post by: Kook on March 18, 2005, 11:57:39 am
I implemented the renaming method instead of the run another loop method. It's faster and more accurate. It's also another 100 lines of code, but who's counting?

Cool. Is there a binary someplace I can download to try it out?

Kook
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 18, 2005, 12:13:16 pm
Buddabing, if you want to add the movieskipframes that would be great.

It would be a lot easier because the script that I wrote has to use the setrange time which I don't think is as accurate as the frames.
Title: Re: MAME Movie Maker released
Post by: Kook on March 18, 2005, 01:11:53 pm
I did some quick testing with the test binary and -movieloops 4. It seems that the audio in the avi is out of sync with the video. Specifically, it seems that the video frames are correctly rearranged, but the audio is un-rearranged. I hadn't noticed this or thought about it before. Is it fixable?

 :-\
Kook
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 18, 2005, 01:45:14 pm
I did some quick testing with the test binary and -movieloops 4. It seems that the audio in the avi is out of sync with the video. Specifically, it seems that the video frames are correctly rearranged, but the audio is un-rearranged. I hadn't noticed this or thought about it before. Is it fixable?

 :-\
Kook


Oh boy. I didn't think about that. I don't know a way to fix it. I'll have to turn off the audio if -movieloops 4 is selected.
Title: Re: MAME Movie Maker released
Post by: 2600 on March 18, 2005, 02:28:06 pm
The new movieskipframes worked for me.  I used 464 for neogeo games if anyone else tries it.

Thanks Buddabing
Title: Re: MAME Movie Maker released
Post by: Kook on March 18, 2005, 02:35:12 pm
Oh boy. I didn't think about that. I don't know a way to fix it. I'll have to turn off the audio if -movieloops 4 is selected.

My vote would be to leave the audio turned on (even if it is out of sync) and maybe make a note about that at the beginning of this thread. It's better than no audio. For me it mostly just means that when you are surfing through a list of games and looking at the video previews, you'll see gameplay video and hear the game's intro music. It's not that big a deal. OR, you could have -movieloops 4 mean "start in the middle with audio out of sync" and -movieloops 5 mean "start in the middle with no audio". Ha! There goes another 100 lines of code :-)

Kook
Title: Re: MAME Movie Maker released
Post by: Silver on March 18, 2005, 02:43:40 pm
The new movieskipframes worked for me.  I used 464 for neogeo games if anyone else tries it.

Thanks Buddabing

Nice one. Is there an easy way to select these from listgen? ie filter so that all neo-geo games have this addition? OR does it need to be in a seperate filter?
Title: Re: MAME Movie Maker released
Post by: 2600 on March 18, 2005, 02:55:55 pm
I just use listgen to make a separate moviebatch file.

Anyone know of other systems that may benefit from this addition.  I seem to remember ones with the warning about country specific(capcom ones maybe), but not off the top of my head.
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 18, 2005, 03:00:19 pm
Oh boy. I didn't think about that. I don't know a way to fix it. I'll have to turn off the audio if -movieloops 4 is selected.

My vote would be to leave the audio turned on (even if it is out of sync) and maybe make a note about that at the beginning of this thread. It's better than no audio. For me it mostly just means that when you are surfing through a list of games and looking at the video previews, you'll see gameplay video and hear the game's intro music. It's not that big a deal. OR, you could have -movieloops 4 mean "start in the middle with audio out of sync" and -movieloops 5 mean "start in the middle with no audio". Ha! There goes another 100 lines of code :-)

Kook

I've decided to revert back to what I had yesterday for -movieloops 4. This will fix the audio at the expense of more time capturing.

I'll keep the code I added around just in case.

I've uploaded a new binary.
Title: Re: MAME Movie Maker released
Post by: donnyj on March 18, 2005, 05:58:32 pm
You know I have to be a pain in the butt too....
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 21, 2005, 05:42:45 am
Okay,

I've updated source and binary to version 0.92 and 0.94 of BuddaMAME.

Version 0.94 may be a bit tricky. My source is 0.94u4 which may not be in sync with your source. If you want to compile BuddaMAME v0.94, I suggest taking fresh 0.94 source and patching it, then extracting my source over it. I've included patches to patch fresh 0.94 source to 0.94u4.

I also retrofit the latest changes to MMM (added -movieskipframes and fixed the video being too long) to version 0.92 so Papa will be happy. :)

Regards,
Buddabing
Title: Re: MAME Movie Maker released
Post by: Silver on March 21, 2005, 07:25:18 am
Are there many fixes for broken sound from 0.92 to 0.94? Or is it mainly new games?


Oh, and I'm making tweaked frame information for all the neo-geo games at the moment. I was using 2600's excellent suggestion of 464 frames skipped, but I noticed that there are a few neogeo games that either have an 'extra' section (The "100 Mega shock" bit) or actually have no standard neo-geo startup at all.
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on March 21, 2005, 12:30:21 pm

I also retrofit the latest changes to MMM (added -movieskipframes and fixed the video being too long) to version 0.92 so Papa will be happy. :)

Regards,
Buddabing



I am happy and Thank You!
Title: Re: MAME Movie Maker released
Post by: Silver on March 21, 2005, 09:28:40 pm
Buddabing:

Do you reckon you could alter the input for the movieskipframes option? Or at least add an alternative method so we could use movieloops 2 option. eg:

breakers 2 500 0

this would be the same as breakers -movieskipframes 500.

If its easier then 0 could be 'x' or something. This is because I have found some games eg breakers have a standard neogeo startup you want to skip, but seem to randomly generate the attract (or at least its based on the nvram file - how many times someone has run it?).

By implimenting it into movieloops 2, you would allow the ssf.txt file to include tweaked start points even when the end point is ambiguous and will need to be detected.... (so in ssf.txt you would have breakers,500,0 or breakers,500,x)
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 22, 2005, 01:54:56 pm
Buddabing:

Do you reckon you could alter the input for the movieskipframes option? Or at least add an alternative method so we could use movieloops 2 option. eg:

breakers 2 500 0

this would be the same as breakers -movieskipframes 500.

If its easier then 0 could be 'x' or something. This is because I have found some games eg breakers have a standard neogeo startup you want to skip, but seem to randomly generate the attract (or at least its based on the nvram file - how many times someone has run it?).

By implementing it into movieloops 2, you would allow the ssf.txt file to include tweaked start points even when the end point is ambiguous and will need to be detected.... (so in ssf.txt you would have breakers,500,0 or breakers,500,x)

I think movieloops 2 should be reserved for loops for which we know the start and end frames.

I don't think movieloops 2 currently supports the movieskipframes option, but it would be easy to add.

Can't you just generate one movie for breakers and be done with it?
:)

Title: Re: MAME Movie Maker released
Post by: Silver on March 22, 2005, 05:51:57 pm

I think movieloops 2 should be reserved for loops for which we know the start and end frames.

I don't think movieloops 2 currently supports the movieskipframes option, but it would be easy to add.

I dont think moviesloops 2 needs movieskipframes as the loop detection is off, so if you want to skip something you just tweak the start frame...

Quote
Can't you just generate one movie for breakers and be done with it?
:)

Hey thats fine for me!

The only functionality I'm after would be a way of initiating -movieskipframes from the ssf.txt or another external file. If you add info to the ssf.txt line does it get passed?
ie:

breakers 1 0 0 -movieskipframes -600

Note I'm only using breakers as an example - there are several games that do this it seems....

EDIT: I've realised that just implimenting -movieskipframes will not help. There are games with a random attract where the detected loop will not always originate from the same frame (it depends on which attract is shown in what order). movieskipframes will not work at all on these games as it only skip frames from the start of the detected loop - whereas I would actually like to force an absolute start frame.

So really I think I am after a new option (groan!) where it detects a loop as standard (movieloops 1) but when creating the vdb file the start point is overwritten.

To be honest - its probably not worth the effort for the small number of games, and the fact that the loop is fine. Ignore me....
Title: Re: MAME Movie Maker released
Post by: Silver on March 24, 2005, 01:46:22 pm
I've added a few more roms to the database, mainly some games that did not have a loop detected. I also tweaked chaseHQ to start on the title, as the detected loop starts at gameplay - some may prefer this without it tweaked...

chasehq
cmissnx
esb
galaga88
galaxian
gaplus
moonal2
mooncrst

I also have a pile of tweaked neogeo games I can add soon. However,  a lot of neogeo games seem to either randomise the attract - or it depends on the state of the nvram possibly. This is why I was asking about setting an absolute start frame - do you think its possible to change listgen so that when it parses ssf.txt it could set up loop detection as normal but overwrite the start frame once the loop is detected?
Title: Re: MAME Movie Maker released
Post by: donnyj on March 25, 2005, 10:26:27 pm
Strange, Strange, Strange....

I was having problems with listgen....
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 25, 2005, 11:39:53 pm
Strange, Strange, Strange....

I was having problems with listgen....  so I downloaded the newest listgen, mamemm (precompiled)...  same thing...

for example, using:

select * from gamedata;

and

mamename mamemm.exe
rompath D:\mame\roms
mamepath D:\mame
frontend moviebatch
verbose 0
silent 0
audit_roms 0
use_clones 1
unique 0
us_version_priority 0
world_version_priority 0
strip_description 0
japan_version_priority 0
reuse_mame_data 0
force_uppercase_romnames 0
force_lowercase_romnames 0
output makemovies.bat

makemovies.bat is missing games, for example:  005, 11beat, 1945kiii, 3kokushi, 47pie2, 47pie2o, 4dwarrio, 4enraya, 64streej, 64street, 720...

what?????

also, I get "parse error, unexpected MERGE" from listgen


What version of MAME? They may have changed the xml in 0.94u5, if you are using that.

Do you have any .dat files in your MAME folder? If so, move them out and see you get the "unexpected MERGE".
Title: Re: MAME Movie Maker released
Post by: donnyj on March 26, 2005, 01:02:25 am

What version of MAME? They may have changed the xml in 0.94u5, if you are using that.

Do you have any .dat files in your MAME folder? If so, move them out and see you get the "unexpected MERGE".


was using the mame.exe straight out of mame94.zip on your website (renamed to mamemm.exe of course)

just tried moving all .dat files out of directory, same thing =[
Title: Re: MAME Movie Maker released
Post by: donnyj on March 26, 2005, 02:04:01 am
listgen barfs halfway through listxml.txt   :'(

found a quick/dirty/faulty/defective replacement for winXP

@echo off
echo . > makemovies.bat
for %%f in (D:\mame\roms\*.zip) do echo @call batch %%~nf >> makemovies.bat


Title: Re: MAME Movie Maker released
Post by: Buddabing on March 26, 2005, 11:00:41 am
listgen barfs halfway through listxml.txt   :'(

found a quick/dirty/faulty/defective replacement for winXP

@echo off
echo . > makemovies.bat
for %%f in (D:\mame\roms\*.zip) do echo @call batch %%~nf >> makemovies.bat


Please run ListGen with -verbose, pipe the output to a file, zip the file, and email it to me at buddabing at houston dot rr dot com.

Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on March 26, 2005, 06:23:18 pm
I'm still trying to figure out how I can make the movies with a higher resolution so that they look OK full screen. The lower resolution games look awfull because of the compression.
How can I modify the .vsb file to get a resolution twice as large? I can't seem to find a virtualdub "script" reference.
Title: Re: MAME Movie Maker released
Post by: Kook on March 27, 2005, 12:00:14 pm
I have another idea for the wish list. Right now, Movie Maker allows you to use loop detection, or specify the set of frames you want to capture. I don't know if this is feasible or not (or maybe it's already built-in and I haven't figured it out), but as a third alternative, it would be nice to have a START RECORDING and END RECORDING hot key. In other words, MAME starts running the game, and when you see the point where you want to start capturing frames you hit the Start Recording key, and when you see the point where you want to stop, you hit the Stop Recording key.

Kook
Title: Re: MAME Movie Maker released
Post by: jdsabin1 on March 29, 2005, 07:54:19 pm
I am in so far over my head trying all this it's not even funny. Anyway, I am trying to now figure out how to make a 'makemovies.bat' file. Buddabing in his initial post said:

--------------------------------------
The second batch file you need is called makemovies.bat, which calls batch.bat for each of your ROMs.

Here's a sample:
@call batch 005 224x256
@call batch 1941 224x384
@call batch 4enraya 256x224
@call batch 4in1 224x256

You can generate your own makemovies.bat by using my ListGen utility, a link to it is above.
-----------

So I ran the listgen utility but I still don't see a 'makemovies.bat' file. Can anyone help me out?

Thanks,

-Jeff
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 29, 2005, 08:58:20 pm
I am in so far over my head trying all this it's not even funny. Anyway, I am trying to now figure out how to make a 'makemovies.bat' file. Buddabing in his initial post said:

--------------------------------------
The second batch file you need is called makemovies.bat, which calls batch.bat for each of your ROMs.

Here's a sample:
@call batch 005 224x256
@call batch 1941 224x384
@call batch 4enraya 256x224
@call batch 4in1 224x256

You can generate your own makemovies.bat by using my ListGen utility, a link to it is above.
-----------

So I ran the listgen utility but I still don't see a 'makemovies.bat' file. Can anyone help me out?

Thanks,

-Jeff

Make sure "frontend moviebatch" is in your listgen.ini file.

If you still have a problem, please post your listgen.ini file.

Title: Re: MAME Movie Maker released
Post by: jdsabin1 on March 29, 2005, 09:26:43 pm
Thank you for the quick reply! I changed the setting (I believe it was romlist instead of moviebatch) in the ini. I have listgen and mame in separate sub-dirs (if that makes any difference). I downloaded and installed everything you listed in the first post. 

At any rate, I reran listgen and this is the message it gave me:

I:\listgen>listgen
listxml.txt already exists
gamelist.txt already exists
listfull.txt already exists
Scanning XML game info
Failed to open catver.ini, list may be inaccurate
Failed to find nplayers.ini, list may be inaccurate
Failed to find gameplay.ini, list may be inaccurate
Processing gamelist.txt
Processing listfull.txt
Processing ssf.txt
Writing intermediate file listgen.tmp
Reading intermediate file into filter database
Filtering database into result.tmp
Renaming result.tmp to xxx.txt

Here is the contents of my listgen.ini:

rompath ..\mame\roms
mamepath ..\mame
frontend moviebatch
verbose 0
silent 0
audit_roms 0
use_clones 1
unique 0
us_version_priority 0
world_version_priority 0
strip_description 1
japan_version_priority -1
reuse_mame_data 1
output xxx.txt
force_uppercase_romnames 0
skip_final_step 1
---------------------

Thanks again!
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 29, 2005, 10:59:53 pm
Thank you for the quick reply! I changed the setting (I believe it was romlist instead of moviebatch) in the ini. I have listgen and mame in separate sub-dirs (if that makes any difference). I downloaded and installed everything you listed in the first post. 

At any rate, I reran listgen and this is the message it gave me:

I:\listgen>listgen
listxml.txt already exists
gamelist.txt already exists
listfull.txt already exists
Scanning XML game info
Failed to open catver.ini, list may be inaccurate
Failed to find nplayers.ini, list may be inaccurate
Failed to find gameplay.ini, list may be inaccurate
Processing gamelist.txt
Processing listfull.txt
Processing ssf.txt
Writing intermediate file listgen.tmp
Reading intermediate file into filter database
Filtering database into result.tmp
Renaming result.tmp to xxx.txt

Here is the contents of my listgen.ini:

rompath ..\mame\roms
mamepath ..\mame
frontend moviebatch
verbose 0
silent 0
audit_roms 0
use_clones 1
unique 0
us_version_priority 0
world_version_priority 0
strip_description 1
japan_version_priority -1
reuse_mame_data 1
output xxx.txt
force_uppercase_romnames 0
skip_final_step 1
---------------------

Thanks again!

I guess I should change the defaults.......

Change skip_final_step to 0 and output to makemovies.bat and strip_description to 0.

That should do it.
Title: Re: MAME Movie Maker released
Post by: jdsabin1 on March 29, 2005, 11:22:34 pm
I made the changes you suggested. When I ran the listgen.exe again I got a hard crash (Windows XP SP2). It did this:

I:\listgen>listgen
listxml.txt already exists
gamelist.txt already exists
listfull.txt already exists
Scanning XML game info
Processing catver.ini
Failed to find nplayers.ini, list may be inaccurate
Failed to find gameplay.ini, list may be inaccurate
Processing gamelist.txt
Processing listfull.txt
Processing ssf.txt
Writing intermediate file listgen.tmp
Reading intermediate file into filter database
Filtering database into result.tmp
Writing game list to makemovies.bat
-------------
And then the crash. Looking at the error dialogue box it tells me:

AppName: listgen.exe
AppVer: 0.0.0.0
ModName: msvcrt.dll
ModVer: 7.0.2600.2180
Offset: 000360cb

If that helps at all. :(
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 30, 2005, 12:09:38 am
I made the changes you suggested. When I ran the listgen.exe again I got a hard crash (Windows XP SP2). It did this:

I:\listgen>listgen
listxml.txt already exists
gamelist.txt already exists
listfull.txt already exists
Scanning XML game info
Processing catver.ini
Failed to find nplayers.ini, list may be inaccurate
Failed to find gameplay.ini, list may be inaccurate
Processing gamelist.txt
Processing listfull.txt
Processing ssf.txt
Writing intermediate file listgen.tmp
Reading intermediate file into filter database
Filtering database into result.tmp
Writing game list to makemovies.bat
-------------
And then the crash. Looking at the error dialogue box it tells me:

AppName: listgen.exe
AppVer: 0.0.0.0
ModName: msvcrt.dll
ModVer: 7.0.2600.2180
Offset: 000360cb

If that helps at all. :(


Edit your filter.sql and comment out (put two dashes at the beginning of the line) the line that says ".separator '' ".

Sorry for the inconvenience. I'll change the defaults.
Title: Re: MAME Movie Maker released
Post by: jdsabin1 on March 30, 2005, 12:37:04 am
Not an inconvenience at all. Happy I can help. This is such a great idea!

That worked but my next hurdle is this:

I edited the makemovies.bat file to only include Amidar just to test with. I noticed when I double clicked the file and the DOS window popped up, I got the message: 'could not find I:\mame\moviesnp\ami*.png' which I assume is fine (at least it didn't appear to hold things up).

Amidar came up in a small window on my desktop and ran just fine, then it ultimately closed.

Anyway, VirtualDub kicks off and it appears to process and when it is nearly done, I get a small, UNhelpful error dialogue box (about the size of a postage stamp) that says: VirtualDub Error followed by three ?'s in the text portion of the box. I am using VirtualDub 1.6.4 (build 23174/release). That was what was on the page that your link provided so that was what I downloaded. At the same time the XVID status windows also pops up.

When I click okay to get past the VDub error I have to manually close the VDub application and the XVID box, and then everything appears to complete although I spotted an amidar.wav and vdb file I believe that then gets deleted. There was an Amidar avi file in the movies subdir that is 13.2 MB in size.

One weird thing when I try to play it in Windows Media Player (old and new versions): the video is 'squished'. The aspect just isn't accurate at all.

Thanks again for all your help. I am close now! :)
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 30, 2005, 07:52:55 am
Not an inconvenience at all. Happy I can help. This is such a great idea!

That worked but my next hurdle is this:

I edited the makemovies.bat file to only include Amidar just to test with. I noticed when I double clicked the file and the DOS window popped up, I got the message: 'could not find I:\mame\moviesnp\ami*.png' which I assume is fine (at least it didn't appear to hold things up).

Amidar came up in a small window on my desktop and ran just fine, then it ultimately closed.

Anyway, VirtualDub kicks off and it appears to process and when it is nearly done, I get a small, UNhelpful error dialogue box (about the size of a postage stamp) that says: VirtualDub Error followed by three ?'s in the text portion of the box. I am using VirtualDub 1.6.4 (build 23174/release). That was what was on the page that your link provided so that was what I downloaded. At the same time the XVID status windows also pops up.

When I click okay to get past the VDub error I have to manually close the VDub application and the XVID box, and then everything appears to complete although I spotted an amidar.wav and vdb file I believe that then gets deleted. There was an Amidar avi file in the movies subdir that is 13.2 MB in size.

One weird thing when I try to play it in Windows Media Player (old and new versions): the video is 'squished'. The aspect just isn't accurate at all.

Thanks again for all your help. I am close now! :)

Try changing -movievideo 3 to 2. Maybe your Xvid is messed up. Maybe Silver can help on this one.
Title: Re: MAME Movie Maker released
Post by: jdsabin1 on March 30, 2005, 09:18:51 am
I tried changing -movievideo in my mame.ini and it didn't help as far as that strange error vdub is spitting out. I also reinstalled XVid and now my AVI is 2.47 MB so I think that part is fixed.

VDub is still broke basically. It comes up with that cryptic error box with three question marks at the end of the process and I have to okay to close it.

The amidar.avi does work, it's now in it's proper aspect (must have been xvid or your setting recommendation?), but I still see amidar.wav and vdb get deleted from the MAME dir (is it supposed to work like that). The Amidar.avi has no sound as a sidenote which is why I am asking.

Any and all input most welcome :).
Title: Re: MAME Movie Maker released
Post by: 2600 on March 30, 2005, 09:25:28 am
Post your batch file.  Does it still have the /wait command on the virtualdub line?
Title: Re: MAME Movie Maker released
Post by: jdsabin1 on March 30, 2005, 12:33:08 pm
Here is my batch file. It's basically identical to Buddabing's suggestion in his first post (and yes, it looks like the /wait switch is still there):

------------------------
@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" /wait /x
@del %1.wav
@del /Q moviesnp\*.png
@del %1.vdb
@move /Y %1.avi movies
time /T
:end
----------------------------
Title: Re: MAME Movie Maker released
Post by: 2600 on March 30, 2005, 12:40:01 pm
Take the /wait out and you won't get the virtualdub error.  Silver mentioned it somewhere around page 10 or 11 of this thread I believe.  He said 1.6.4 didn't support that command or something like that.
Title: Re: MAME Movie Maker released
Post by: jdsabin1 on March 30, 2005, 12:42:57 pm
Thank you for the fast response! Will that take care of the avi not having sound in it as well? I did see an amidar.avi and amidar.vdb file show up in the MAME directory through the creation process, and then they get deleted.  I wasn't sure if this had anything to do with the sound not being in the avi or not.

This is an awesome thing by the way. Really helpful! 
Title: Re: MAME Movie Maker released
Post by: 2600 on March 30, 2005, 12:49:29 pm
I just started amidar, not making a movie and it doesn't have sound during it's attract.  That's why there is no sound.  Try zookeep and see how that goes.
Title: Re: MAME Movie Maker released
Post by: jdsabin1 on March 30, 2005, 01:02:31 pm
I got it. Sorry for some of these 'doofus' questions on my part. I didn't even think to check that.

I believe all is well at this point. I would be willing to help tidy up all this in a 'non-technical' way with a new post if that would help at all, or perhaps host some of these files if we need certain versions to make this all work. Just let me know how (or if) I can help at all.

Thanks! :)
Title: Re: MAME Movie Maker released
Post by: Buddabing on March 30, 2005, 06:34:08 pm
Take the /wait out and you won't get the virtualdub error.  Silver mentioned it somewhere around page 10 or 11 of this thread I believe.  He said 1.6.4 didn't support that command or something like that.

I've removed the /wait from the example batch.bat file on the first page. Thanks for the reminder.

EDIT: I've also added a link to BuddaMAME v0.95.



Title: Re: MAME Movie Maker released
Post by: Silver on April 05, 2005, 01:03:06 am
FYI Virtualdub 1.6.5 is out. Nothing significant for Moviemaker I think, although the ??? error has been removed for incorrect command lines.

However, there is a complete up-to-date rewrite of the scripting documentation which will help explain the vdb file to anyone whos curious.....
Title: Re: MAME Movie Maker released
Post by: Buddabing on April 05, 2005, 08:27:03 am
FYI Virtualdub 1.6.5 is out. Nothing significant for Moviemaker I think, although the ??? error has been removed for incorrect command lines.

However, there is a complete up-to-date rewrite of the scripting documentation which will help explain the vdb file to anyone whos curious.....

Thanks for the info. Maybe there's something in there for Papa's resize issue.
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on April 05, 2005, 11:19:15 am
I'll look at it thanks!
Title: Re: MAME Movie Maker released
Post by: Silver on April 06, 2005, 07:04:50 am
Hmmm, I've updated to 0.95, but listgen reports

listxml.txt already exists
gamelist.txt already exists
listfull.txt already exists
Scanning XML game info
parse error, unexpected MERGE
Failed to find catver.ini, list may be inaccurate
... ...

not sure what the parse error is - is there a incorrect data in the mame xml?

If I pipe listgen -verbose to a file, it reports the parse error only to the command line. No mention of merge in the piped file.

It seems to then not find over half the roms (lots of rom name game not found in rom tree. ie my makemovies.bat with a full "select * from gamelist" goes from around 100kb to 37kb....

any ideas?
Title: Re: MAME Movie Maker released
Post by: donnyj on April 06, 2005, 07:33:06 am
there was a change in the mame XML output, Buddabing updated listgen to reflect the changes, try the newest version of listgen....
Title: Re: MAME Movie Maker released
Post by: Silver on April 06, 2005, 06:46:48 pm
Bingo, thanks I missed that change....
Title: Re: MAME Movie Maker released
Post by: Silver on April 08, 2005, 04:10:06 am
Hmmm anyone have info on what the changes were in the XML data?
Title: Re: MAME Movie Maker released
Post by: donnyj on April 08, 2005, 09:20:23 am
I don't know, but the old listgen crapped out about 50% done with an "unexpected MERGE" error....?

maybe they added a MERGE to an area that previously didn't use them?  (CHD?)

Sorry, I don't know enough to help =[
Title: Re: MAME Movie Maker released
Post by: Buddabing on April 08, 2005, 10:00:30 am
Hmmm anyone have info on what the changes were in the XML data?

They added two new xml attributes to the CHDs: "merge" and "status". Status can be "baddump", "nodump", and "good". I guess the merge field allows two games/clones to use the same CHD.

Title: Re: MAME Movie Maker released
Post by: Silver on April 08, 2005, 07:19:02 pm
ah thats alright then, nice and easy. Thanks for that....

I've been churning though videos very successfully recently. I find it makes perfectly acceptable attract videos in the majority of cases - even for games with huge slightly-changing loops, the first loop detected by MMM is often perfectly adequate. I've been using the standard 10-frame match.

The main problem I have is it hanging on games that don't work, even when  using the catver <> unplayable to filter the list, but thats not a problem with MMM (although I should check that they crash in standard mame too).
Title: Re: MAME Movie Maker released
Post by: donnyj on April 10, 2005, 11:03:08 pm
How can I redirect the mamemm text messages to a file?
Title: Re: MAME Movie Maker released
Post by: Buddabing on April 10, 2005, 11:06:26 pm
How can I redirect the mamemm text messages to a file?  the ones that show up in the mamemm.exe window?


edit the call to mamemm in your batch.bat and add:

> nofile.txt

to the end of the file. You need the greater than sign. The OS will create a file called nofile.txt which will have all the text messages in it.
Title: Re: MAME Movie Maker released
Post by: donnyj on April 11, 2005, 09:47:19 am
Confusion...  when mamemm changes resolution in the middle of a game does, the current "frame" number reset back to 0?  I am watching tekken3a run, and the file count doesn't change but the directory size changes???????
Title: Re: MAME Movie Maker released
Post by: Buddabing on April 11, 2005, 10:43:39 am
Confusion...
Title: Re: MAME Movie Maker released
Post by: Silver on April 11, 2005, 10:54:06 pm
Yes unfortunately some games change resolution several times in the attract sequence - which tends to result in no video or the appearance of a crash as 20,000 files are copied over on the fly.... (e.g. starglad).
Title: Re: MAME Movie Maker released
Post by: vibez on April 28, 2005, 01:31:51 pm
I dont have a enough space on the PC that i'm running this, how can I edit the script to I can save the movies to a network drive. Z:\movies\ for example
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on April 28, 2005, 01:40:51 pm
chaneg the bach.bat batch file shown at the top of this thread to move the files to the networked drive:

@if not exist Z:\movies mkdir Z:\movies
@if exist Z:\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 Z:\movies
time /T
:end


This assume you already have mapped a network location to Z:
Title: Re: MAME Movie Maker released
Post by: vibez on April 28, 2005, 01:58:01 pm
thanks!

Now i'm getting this error

D:\Mame_movie_maker\MAME095>batch
error: invalid value for resolution: -nothrottle
error while parsing cmdline

D:\Mame_movie_maker\MAME095>time /T
19:04
error: invalid value for resolution: -wavwrite
error while parsing cmdline

This is my batch

Code: [Select]
@if not exist x:\movies mkdir x:\movies
@if exist x:\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 x:\movies
time /T
:end




Code: [Select]
@call batch 005 224x256 1 0 0
@call batch 11beat 512x512 1 0 0
@call batch 1941 224x384 1 0 0
@call batch 1941j 224x384 1 0 0
Title: Re: MAME Movie Maker released
Post by: vibez on April 28, 2005, 02:15:00 pm
ooops, I was running the wrong script. it seems to be working now.

How do make sure it doesnt try to load a non-working game? & roughly how much space do I need for a full set (0.95) including clones?
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on April 28, 2005, 02:41:09 pm
not sure about how much space, it also depends on the codec you use.

Use the listgen utility so sort the games and eliminate the none working ones, the you can ruther edit the resulting fil by deleting the line for the games you don't want.











Title: Re: MAME Movie Maker released
Post by: Buddabing on April 28, 2005, 02:51:34 pm
ooops, I was running the wrong script. it seems to be working now.

How do make sure it doesnt try to load a non-working game? & roughly how much space do I need for a full set (0.95) including clones?

Each movie should take roughly one to ten megabytes. My test sample was 49 games and took up about 200 meg. Call it 4 meg a game. Multiplying by 5000 gives about 20 gig total space required. YMMV depending on what games you have.

Create a movie for Zookeeper as a test case. The video should be less than two megabytes. If your Zookeeper video is larger than 200 meg, you don't have the correct video codec installed.

Run ListGen to exclude non-working games. It will also generate the batch process to create the movies. Check out Screaming's ListGen.net extension.
Title: Re: MAME Movie Maker released
Post by: vibez on April 28, 2005, 02:54:45 pm
Thanks guys. listgen.net's default settings for MMM is runnable <> no

will that filter out the no runnable games? Do I need catver.ini for it to filter correctly?

EDIT::

Nevermind, figured it out my just editing the filter.sql files
Title: Re: MAME Movie Maker released
Post by: screaming on April 28, 2005, 03:27:13 pm
Thanks guys. listgen.net's default settings for MMM is runnable <> no

will that filter out the no runnable games? Do I need catver.ini for it to filter correctly?

  No.  the runnable <> 'no' criteria will filter out bioses, etc.  You could add "status <> 'preliminary'" though.

-sab
Title: Re: MAME Movie Maker released
Post by: vibez on April 28, 2005, 03:56:02 pm
so this should only filter out none working games & not whole bioses, correct?

select * from gamedata where
   catver_category <> 'Unplayable'
order by full_desc;
Title: Re: MAME Movie Maker released
Post by: screaming on April 28, 2005, 04:11:58 pm
I call your blackballing and I raise you a /forget.




Damn, no /forget.  Where's MBBS when you need it?!

-sab
Title: Re: MAME Movie Maker released
Post by: vibez on April 28, 2005, 04:24:41 pm
wow that was over my simple uk head!
Title: Re: MAME Movie Maker released
Post by: MrSaLTy on April 28, 2005, 06:44:20 pm
Here are some start/end frame settings that I have used to yield some better results with some movies..... i.e. less intro and rom booting and more gameplay.

zedblade,1700,4200
ffight,5000,8500
apb,1488,3300
bubbles,640,3000
roadrunn,80,1895
sonicwi2,1510,2460
sonicwi3,3540,4640
gpilots,725,2100
bosco,1000,5270
Title: Re: MAME Movie Maker released
Post by: Silver on April 28, 2005, 07:36:38 pm
Thanks MrSalty.

I have a few I'll be adding too. I'll try and get them onto the webpage in the next day or 2.
Title: Re: MAME Movie Maker released
Post by: Scoobie on April 29, 2005, 12:15:16 pm
Okay so I read most of this thread, and it sure is a lot of great info!
Title: Re: MAME Movie Maker released
Post by: Buddabing on April 29, 2005, 12:26:44 pm
Okay so I read most of this thread, and it sure is a lot of great info!
Title: Re: MAME Movie Maker released
Post by: Scoobie on April 29, 2005, 01:06:34 pm
Thanks Budda.
Title: Re: MAME Movie Maker released
Post by: Silver on May 03, 2005, 11:34:08 am
I've added some more start/end frames to the "ssf" file. There are around 30 odd now - these are mostly games that do not generate a viewable attract at all under normal condiditons, with a few tweaks...

I was wondering - there are some games eg Alligator Hunt, where the master does not work 'aligator' (protection) but there is a working clone: 'aligatun' (no protection) that works fine. I've only looked at masters (saves so much time and storage). Is it best just to manually edit the batch files in these cases or is there another work around?


@MrSalty

I've not added your contribution yet as originally I think the plan was to only add 100% complete attracts to the ssf text (ie every single frame of a v long attract where the auto-detect only picked up the first loop.) - some of yours are geared to mostly catching gameplay. Not sure what everyone thinks about this?
Title: Re: MAME Movie Maker released
Post by: MrSaLTy on May 03, 2005, 01:51:24 pm
I dig... some of those games have really long intros though and that seemed useless to me so I tried to get some relevent gameplay in them.  If thats not what you need... I understand.  That being said.... on some of them normal loop detection will only result in a portion of the intro and not the full attract video anyway.
Title: Re: MAME Movie Maker released
Post by: Silver on May 03, 2005, 02:01:03 pm
yes I've just noticed APB does not auto-generate a good intro at all - I'll sort that.

I was debating a second list just for pure gameplay videos. This would take a long time to complete (somone would need to get the frames for every master) but several people do seem keen on just gameplay videos. It would also cut down on the size if that was an issue.

At the moment, I'm just going to cruise through the videos and get something going for games that completely failed to have a good intro...
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on May 04, 2005, 06:03:56 pm
II've not added your contribution yet as originally I think the plan was to only add 100% complete attracts to the ssf text (ie every single frame of a v long attract where the auto-detect only picked up the first loop.) - some of yours are geared to mostly catching gameplay. Not sure what everyone thinks about this?

I would *love* to have gameplay videos instead of attract, but until we figure out a good way to generate gameplay videos, I think we should stick to 100% attract mode, so that it's clear what you're getting.
Title: Re: MAME Movie Maker released
Post by: M.A.M.E Power on May 26, 2005, 05:21:00 pm
Hi Guys

I really struggling with the movie maker, I have downloaded all the relevant files and set up the batch files using the listgen utility. I have all the folders in the right place (virtualdub in the same folder as Mame), but when I launch the moviemaker.bat the first attract mode starts (005 by Sega) and I get the following error:

Code: [Select]
Average FPS: 1460.365076 (100 frames)

C:\mame>time /T
22:35
The system cannot find the file specified.
10-frame match detected between frame 403 and 1500
movie will run between frames 268 and 1380
Average FPS: 58.996781 (1440 frames)
The system cannot find the path specified.
The system cannot find the file specified.

C:\mame>time /T
22:36

It then just hangs up and does not do anything at all.

What am I doing wrong peps?

Thanks
Lea
Title: Re: MAME Movie Maker released
Post by: vibez on May 26, 2005, 07:20:19 pm
Dude you have already posted on other threads that your roms dont work with the mame version you have. Therefor they wont work with this either
Title: Re: MAME Movie Maker released
Post by: Buddabing on May 26, 2005, 08:03:01 pm
I've edited the first post of this thread to eliminate some possibly confusing information and to add a link to BuddaMAME version 0.96.

M.A.M.E. Power: Try removing the @ signs from the start of each line of the batch.bat. The @ makes the output more quiet, and thus may make errors more obscure.

I clearly stated in the first post of this thread:

"Virtualdub must be installed in a directory \virtualdub on the same drive as mame".

I've already told you in a PM that VirtualDub is probably not installed correctly.
Title: Re: MAME Movie Maker released
Post by: papercut on May 28, 2005, 01:36:48 am
Hey Buddabing,

I just wanted to say THANKS for the moviemaker and cpmaker toys!
Title: Re: MAME Movie Maker released
Post by: Silver on May 29, 2005, 10:03:11 pm
If you ever need to put back your mp3 encoder, or decide you want to encode your videos with that (the default one is rather limited in what bitrates it can encode to, although this is not really a problem for the audio we want) you can always set Virtualdub to encode using LAme or whatever instead. There should be instructions in the thread about how to specify an external config file which allows you to use any video/audio codec of your choice.....
Title: Re: MAME Movie Maker released
Post by: richms on May 30, 2005, 12:54:42 am
Can the movie maker use ogg or flac as the audio codec rather then MP3?

How about video codecs?
Title: Re: MAME Movie Maker released
Post by: Silver on May 30, 2005, 09:07:51 am
Try looking here in the post:

http://forum.arcadecontrols.com/index.php/topic,29661.msg268278.html#msg268278

I think these custom options are still in Buddamame.

All you need to do is follow the instructions in the link above to create the custom dat files from virtualdub. Any codec that works in Vdub will work - but note these have to be proper directshow codecs. Basically, simply use virtualdub to compress something with the video/audio codecs of your choice - if it works, you can use it.
Title: Re: MAME Movie Maker released
Post by: Buddabing on May 30, 2005, 09:39:32 am
Can the movie maker use ogg or flac as the audio codec rather then MP3?

How about video codecs?

Yes, look at page 8 of this thread.

Title: Re: MAME Movie Maker released
Post by: papercut on May 31, 2005, 12:40:21 am
Hey Buddabing,

Having a lot of fun making videos and another project I had in mind sprang up and could be an 'easy' add-on.

Would it be possible/feasible to create 'save states' at the points where you detect the attract mode loops?

It's been my thought for a while that someone could create a front end option to skip all the ram/rom/init tests, which on some games takes a long time, and bypass it with a save state. I don't know if it would universally work as I don't know all that much about save states or if this would violate any mame related policies...

Just thought I'd throw it out there in case it tickled your imagination any.

Thanks!
Title: Re: MAME Movie Maker released
Post by: Buddabing on May 31, 2005, 09:42:48 am
Hey Buddabing,

Having a lot of fun making videos and another project I had in mind sprang up and could be an 'easy' add-on.

Would it be possible/feasible to create 'save states' at the points where you detect the attract mode loops?

It's been my thought for a while that someone could create a front end option to skip all the ram/rom/init tests, which on some games takes a long time, and bypass it with a save state. I don't know if it would universally work as I don't know all that much about save states or if this would violate any mame related policies...

Just thought I'd throw it out there in case it tickled your imagination any.

Thanks!


That's a very interesting idea you have there. It would be cool to just skip the garbage boot-up altogether and get straight to "insert coin".

I will probably implement this idea.

The only problem is that save states aren't implemented for all games. There could be random unexplained crashes or some games may not work right.

I am busy right now with another project but I will come back to this idea at a later date.
Title: Re: MAME Movie Maker released
Post by: Popcorrin on May 31, 2005, 10:26:54 am
I do know that when you load saved states it's not always that reliable.  It doesn't work with some games and can be kind of buggy with others, no sound and what not.
Title: Re: MAME Movie Maker released
Post by: papercut on May 31, 2005, 11:07:14 am
Yeah I agree it can be risky... My 'theory' is though that there's less going on in memory during the beginning of an attract mode cycle so perhaps there's less to worry about with save states.  In other words, once you 'insert coin' you're in a whole new level of interaction with the system and I can see that causing problems... whereas in attract mode, maybe the games are in a 'calmer' state and can be captured safely without harming the little bits and bytes. :)

I'm SOOO technical...
Title: Re: MAME Movie Maker released
Post by: Silver on May 31, 2005, 03:24:55 pm
Hi,

While its not save states, the idea to skip past the garbage/boot stuff has been around a while. Theres a patch around thats adds a couple of commands to mame - ssf and -fsf (its where the "ssf" name for the ssf.txt file came from originally). ssf skips a set number of frames (completely turns off rendering any video output, making it as fast as possible with a black screen) and fsf simply disabled the throttle for a set number of frames (fast as possible with video rendering).

It may be useful for where savestates fail.
Title: Re: MAME Movie Maker released
Post by: 2600 on May 31, 2005, 03:59:18 pm
Yeah I agree it can be risky... My 'theory' is though that there's less going on in memory during the beginning of an attract mode cycle so perhaps there's less to worry about with save states.  In other words, once you 'insert coin' you're in a whole new level of interaction with the system and I can see that causing problems... whereas in attract mode, maybe the games are in a 'calmer' state and can be captured safely without harming the little bits and bytes. :)

I'm SOOO technical...


Sorry, but your theory is wrong.  The problem with save states is that a lot of drivers don't have them implemented.  Which means when MAME saves the states it doesn't know which bits and bytes to save for sake of a simpler explanation.  ;)

-ssf and -fsf would work on all games if the frame start number of the attract mode was saved to a file.  Just a little something for Buddabing to implement in his long list of things to do.   Actually scratch that Buddabing doesn't need to do this, I want to do another run of attract modes so when I do it I'll output the romname and startframe to a file.

Silver do you have any desire to host this as well, although we should call it something else since people easily get confused about the difference.
Title: Re: MAME Movie Maker released
Post by: Buddabing on May 31, 2005, 04:29:17 pm
In retrospect I think it was a mistake to call Silver's ssf.txt with the ending frame the same name as the other ssf.txt that just has the start frames. It has confused more than one person already. So I propose we change the name of Silver's file to something else.

Calculating a saved state and loading it will be superior to the ssf for the drivers that support it. Unfortunately I don't know how to tell which drivers have a good save state and which don't.

I will put fsf/ssf support in BuddaMAME, I think it will be useful for guests playing my cab.
Title: Re: MAME Movie Maker released
Post by: 2600 on May 31, 2005, 04:54:06 pm
Buddabing it's your baby so I say go ahead and name it whatever you want.  If you change it I believe only you, Silver, and screaming would have to do any changes to anything.  If you put a blurb afterwards on the first post, all of us users can easily get by with any changes that are done.

Saved state would be superior and automatic save state bootup suport on top of that, but I don't think it is in good enough shape to be used.  I could be wrong though.  And the big problem is it's not like it's going to wave a big red flag saying it didn't work it.



Title: Re: MAME Movie Maker released
Post by: Silver on June 01, 2005, 08:53:29 am
I agree. Creating an ssf list for start frames has been on my to do list a long time (I think I mentioned it earlier on in the thread and got distracted...)

I'll change the 'ssf' list designed for movie generation to something else - Buddabing at the moment listgen looks for ssf.txt in the same dir, so lets rename that - just post what you rename it too.

Then I'm happy to host a new "original" ssf.txt which will just have something like romname,startframe.

If I recall though the patch available that implements ssf/fsf does not parse an external file. You have to speciify the frame in the mame command line. I think it would be great if you could add it to mame (is this easy?) so it reads ssf.txt and skips frames if the entry is present?
Title: Re: MAME Movie Maker released
Post by: Buddabing on June 01, 2005, 09:34:51 am
I agree. Creating an ssf list for start frames has been on my to do list a long time (I think I mentioned it earlier on in the thread and got distracted...)

I'll change the 'ssf' list designed for movie generation to something else - Buddabing at the moment listgen looks for ssf.txt in the same dir, so lets rename that - just post what you rename it too.

Then I'm happy to host a new "original" ssf.txt which will just have something like romname,startframe.

If I recall though the patch available that implements ssf/fsf does not parse an external file. You have to speciify the frame in the mame command line. I think it would be great if you could add it to mame (is this easy?) so it reads ssf.txt and skips frames if the entry is present?

I decided on "boundary.txt". It's a nice, descriptive 8.3 name.

I've compiled a new listgen and I'll upload it soon.

I'll add a separate option to read the ssf.txt file. That's easy.
Title: Re: MAME Movie Maker released
Post by: Silver on June 01, 2005, 03:20:15 pm
Ok I'll change my website to generate a file called boundary.txt instead of ssf.txt.

Might not get to it till friday as I'm away with work, and not sure I can remember my ftp password for the webserver.....
Title: Re: MAME Movie Maker released
Post by: arcadegamenut on June 29, 2005, 11:15:06 pm
Where is the makeleds.bat file supposed to come from?

I downloaded everything in the first post and ran it. I receive:

C:\MAME097>makemovies
'makeleds.bat' is not recognized as an internal or external command,
operable program or batch file.
Average FPS: 422.461897 (100 frames)

C:\MAME097>time /T
11:05 PM
error invalid value for moviestartframe: -movieendframe
error while parsing cmdline

I see in src\windows\input.c, the reference to makeleds.bat, but do not see the batch file anywhere. The only thing I do see is a program entitled ledmovie.exe.

Thanks
Title: Re: MAME Movie Maker released
Post by: Buddabing on June 30, 2005, 12:55:45 am
Where is the makeleds.bat file supposed to come from?

I downloaded everything in the first post and ran it. I receive:

C:\MAME097>makemovies
'makeleds.bat' is not recognized as an internal or external command,
operable program or batch file.
Average FPS: 422.461897 (100 frames)

C:\MAME097>time /T
11:05 PM
error invalid value for moviestartframe: -movieendframe
error while parsing cmdline

I see in src\windows\input.c, the reference to makeleds.bat, but do not see the batch file anywhere. The only thing I do see is a program entitled ledmovie.exe.

Thanks

Just create an empty file and name it makeleds.bat.

The batch file calls an external program to light up LEDs on your control panel, either with my LED controller or another.

So you can ignore that error.

Your problem is the "invalid value for moviestartframe". Check your makemovies.bat. It should have:

call batch 005 224x256 1 0 0

for a total of five argments after "batch".

Title: Re: MAME Movie Maker released
Post by: arcadegamenut on June 30, 2005, 12:43:39 pm
So much for copy and paste.  ;D Somehow, I missed the two zeros on the end.

Oh well.....

Thanks!
Title: Re: MAME Movie Maker released
Post by: big daddy on July 01, 2005, 12:08:44 am
Having issues with compression.  I try zookeeper and get 300MB file and from the instructions, it says it's an issue with XVID, but I've installed XVID.  (Koepi's Binary - XviD-1.0.3-20122004.exe ).  It installed succesfully and shows up in start-->programs-->xvid, so not sure what the problem is.

I'm wondering if I'm running the listgen correctly.  Here's the command I run and the output

C:\mame>listgen makemovie movieaudio=1 skip_warnings minmovielength=800 maxmovie
length=10000 movievideo=3 intmakectrl=1 extmakectrl=0 moviematchlength=10

Calling MAME to get version
MAME version is 0.92
Calling MAME to build listxml.txt
Calling MAME to build gamelist.txt
Calling MAME to build listfull.txt
Scanning XML game info
Processing catver.ini
Failed to find nplayers.ini, list may be inaccurate
Failed to find gameplay.ini, list may be inaccurate
Processing gamelist.txt
Processing listfull.txt
Writing intermediate file listgen.tmp
Reading intermediate file into filter database
Filtering database into result.tmp
Writing game list to makemovies.bat

It generates makemovies.bat which generates vid correctly, but zookeeper file is huge (not compressed). 

I'm also unclear on how to use the ssf.txt file that silver has.  Do I just put it in the mame directory when I run Listgen and it automatically works?
Title: Re: MAME Movie Maker released
Post by: Buddabing on July 01, 2005, 12:29:04 am
Having issues with compression.
Title: Re: MAME Movie Maker released
Post by: Silver on July 01, 2005, 10:38:46 am
Hmmm, thats the same release of Xvid I use (and the one used to set up stuff in virtualdub).

Try uninstalling and reinstalling Xvid. Also, Run virtualdub manually and try and compress any old video and make sure that the option to compress to Xvid is available to you - if its not, then its not been installed correctly on your system.

I've also noticed that I'm a bit out of touch - new versions of mame, Buddamame and Virtualdub are around. I'll make sure everything still works fine. I'll also update my website - I need to change the ssf.txt to the new name, update the romset list to 0.97, and clean up a couple of entries.

 I think there are around 50 tweaked entried now, and I've held back on most of the neogeo games as I'm trying to decide for certain if the nvram is remembering which cycle of the attract sequence the game ran last time....
Title: Re: MAME Movie Maker released
Post by: big daddy on July 01, 2005, 11:02:21 am
seems to be working now (zookeeper is 1.5 megs). 

I did 2 things.

1 - I rebooted.  Now that I think about it I never did that after the xvid codec install so maybe that could be the problem

2 - I put the listgen arguments in mame.ini instead of calling on the command line.  I'm still not clear if that's where they belong or not. 

So previously I was calling

C:\mame>listgen makemovie movieaudio=1 skip_warnings minmovielength=800 maxmovie
length=10000 movievideo=3 intmakectrl=1 extmakectrl=0 moviematchlength=10

with none of those settings in mame.ini

This morning I called

C:\mame>listgen makemovie

with the following in mame.ini
minmovielength          800
maxmovielength          10000
movievideo              3
movieaudio              1
intmakectrl             1
extmakectrl             0
moviematchlength        10

Which is the correct way? 

As I said, it seems to work now (1.5 meg), I'm just not sure if it's because xvid is the default or if it's actually getting my settings.
Title: Re: MAME Movie Maker released
Post by: Buddabing on July 01, 2005, 12:05:37 pm
seems to be working now (zookeeper is 1.5 megs).
Title: Re: MAME Movie Maker released
Post by: jackhammerslam on July 14, 2005, 03:11:08 am
i need an full idiots guide on how to use this got some of it working but not all of it so HHHHHHHHHHHHHHHHHEEEEEEEEEEEEEEELLLLLLLLLLLLLLLLLPPPPPPPPPPPPP
 
pls help me
Title: Re: MAME Movie Maker released
Post by: NIVO on September 26, 2005, 08:45:15 pm
well i for one agree we need a better guide. I am no dummy, and i just read through 17 pages of corrected input lines, and folks bickering, and ok this has changed, go do this. And guess what!? Now I'm even more confused. So if someone would care to post the proper .bat files(knowing i need to make my own adjustments for directories) I'd be grateful. Everything I have tried is a no go. Again, im no dummy to following instructions, but when the instructions change on a continual basis, it does get overwhelming.
Title: Re: MAME Movie Maker released
Post by: 2600 on September 26, 2005, 09:09:57 pm
Did you follow the instructions in the first post?
Title: Re: MAME Movie Maker released
Post by: NIVO on September 26, 2005, 10:15:49 pm
absolutely, as well as 4 others in the chatroom, to no avail.
Title: Re: MAME Movie Maker released
Post by: Silver on September 26, 2005, 10:22:09 pm
The bat files in the first post all worked when I last tried them...

Although I agree it is quite confusing - coming back to it after a while has me confused!

Could you highlight at what stage things are not working? If I recall you need to install the software (buddamame, virtualdub, Xvid codec) then run listgen with the right listgen.ini settings (this seems to be a sticking point) to create the makemovies.bat, then run makemovies to call the other bat for all your games....

I seem to recall seeing a .Net version of listgen around - I have no idea if this has the same functionality?

I started writing a VB6 frontend for this ages ok (when it was even more complicated, and required AVIsynth to get round various quirks which are now resolved). This should actually be quite simple now. I'll take a look at what I started with tomorrow.
Title: Re: MAME Movie Maker released
Post by: 2600 on September 26, 2005, 10:35:13 pm
Like Silver said let us know where you are getting stuck.  Also, let us know the steps you have taken.

Although, I suggest leaving out listgen for the first go around.  Let's make sure you can first make movies and then we will help with listgen.

Title: Re: MAME Movie Maker released
Post by: NIVO on September 26, 2005, 10:44:27 pm
error invalid value for resolution -nothrottle
error while parsing cmdline


and ive copy/pasted that bat file exactly. thx for the help fellas
Title: Re: MAME Movie Maker released
Post by: NIVO on September 26, 2005, 10:47:23 pm
steps taken:
already had xvid in from long ago
grabbed virtualdub
grabbed buddamame97
made folder mame97
inserted batch.bat that was copy pasted into mame97
inserted folder called virtualdub into mame97
copy pasted mame.ini info and inserted into mame97 folder
altered rom path to rompath H:\mame_fullromset\Roms
click on batch.bat and thats where i get error posted above
Title: Re: MAME Movie Maker released
Post by: Silver on September 26, 2005, 10:50:03 pm
ok the %2 in batch.bat should be the resolution. This is passed from makemovies.bat which should contain lines like:

@call batch 005 224x256 1 0 0
@call batch 005 224x256 2 100 200

or something like that. (ie romname followed by resolution followed by settings). I guess your makemovies.bat does not, which means its not being made by listgen.

For a test, make a makemovies.bat that contains:

@call batch 005 224x256 1 0 0

assuming you have 005 and it runs. replace for another game if you don't have 005, filling in the correct resolution. leave the 1 0 0 intact.

now run makemovies.bat and see what happens.
Title: Re: MAME Movie Maker released
Post by: NIVO on September 26, 2005, 10:56:33 pm
just did and i saw a 005 movie, i actuially ran listgen and altered the ini file to find mame and roms, it made a makemovies.bat, which i then copied into mame97, and ran batch.bat. I saw the 005 movie. then it stopped

this was taken from cmd prompt:

Average FPS: 614.100897 (100 frames)

C:\mame97>time /T
11:03 PM
Could Not Find C:\mame97\moviesnp\005*.png
10-frame match detected between frame 403 and 1500
movie will run between frames 268 and 1380
Average FPS: 59.083971 (1440 frames)
The system cannot find the path specified.
The system cannot find the file specified.

C:\mame97>time /T
11:04 PM


now i know it says cant find 005.png  but that dir is there and the png is as well. im not seeing any saved movie file though.
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on September 26, 2005, 11:29:28 pm
With the recent addition of mng recording in mame and of course with wav recording beign supported for years, don't you think it's about time to submit the most basic of the mng recording function to the mamedevs so you don't have to maintain a custom build?

I'm thinking the very simple "-makemovie" tag would be accepted without a second thought.  The other command line tags, which really have no business in mame itself anyway, could be set in the batch file, rather than having mame pass it to the external apps it calls.

Silver's ssf.txt (yes it confuses me too, but you know what I'm talking about) could be used with the "-frames_to_run" tag and it would make the whole process external, save the conversion to mpeg of course.   
Title: Re: MAME Movie Maker released
Post by: Buddabing on September 27, 2005, 12:19:09 am
A couple of points:

The first post in this thread should be all that is necessary to be able to build MAME movies. It is not necessary to read the entire thread. I'll put a notice in the first post of this thread to not read all of it.

Second, I've made a web page (http://cpmaker.mameprojects.com/doc/mmm.htm) of documentation for MAME Movie Maker. If it is incomplete or if you have anything to add to it, now's the time to suggest changes.

Third, I don't think the MAME devs give a hoot about demo loop videos. I could write something to take a subset of the new mng video with only the relevant frames, but that would take some kind of script and external program and we already need that. Nor do the MAME devs want the -ssf options in there.

The "Could not find xxx.png" is normal. It simply means that there were no png snapshots already in there.

You don't click on batch.bat. You have to call it with arguments. I guess I need to make it so that if the argument count is not correct in batch.bat it terminates.

The first thing to do after you change your rom path is run a game from the command line to see if it is right. Just "mame gridlee" with no movie options. Once that works, do what Silver suggested in his last post.






Title: Re: MAME Movie Maker released
Post by: Silver on September 27, 2005, 12:45:15 am
Ok, so I couldn't sleep....

I've thrown together a very quick app that will create the batch files for you.

You specify your mame rom dir, the location of:

Virtualdub (vdub.exe)
Buddamame (mame.exe)
Listgen (listgen.exe)

Select the options (video/audio encoder, minimum/max frames to check - "AutoSkip" option does nothing at all yet.)

Hit go and it will create a listgen.ini, batch.bat, mame.ini and then run listgen to create makemovies.bat. After that you should be able to quit the app and just run makemovies.bat.

IMPORTANT NOTES:

DO NOT just stuck listgen/buddamame into your normal mame folder. My program WILL WIPE your mame.ini. (Rubbish I know, but I'll improve it when I've had more sleep!)

buddamame/listgen/your roms do not have to be in the same folder, although it will create all the batch/ini files in the folder that you have listgen in. The easiest way to set this all up is to make a new folder (eg buddamame), put buddamame and  listgen in that, and create a subdir called movies as your output folder. Then you should be good to go.

From the listgen.zip, you only need listgen.exe and filter.sql in the dir (listgen will crash nastily if you don't have filter.sql there it seems).

Any problems/questions just post....

http://www.silverfoxy.plus.com/MovieBatch.exe

NB Regarding "ssf.txt"

We agreed a while back - for clarity - to rename this to "boundry.txt". If you download it from my website (http://ccgi.silverfoxy.plus.com/GetList.php) you will need to rename it to ssf.txt as listgen is still currently looking for ssf.txt. Buddabing maybe you want to change this?
Title: Re: MAME Movie Maker released
Post by: cdbrown on September 27, 2005, 12:55:21 am
I've just run the batch with the REM in front of the del lines and removed the @ from all the lines to see what is happening.  When it comes to running vdub I get
 C:\mame>\virtualdub\vdub /s"3in1semi.vdb" /x
The system cannot find the path specified.

vdub.exe is located in C:\mame\virtualdub\ so any reason why it's falling over here?  Also it's VirtualDub verion 1.6.10 if that means anything.

I can see a whole heap of png's in the moviesnp folder, also in mame folder 3in1semi.vdb and 3in1semi.wav have been created.

Cheers
-cdbrown

edit - Silver's batch maker changes the call for vdub to
@start /min /wait C:\mame\virtualdub\vdub.exe /s"%1.vdb" /x
from
@\virtualdub\vdub /s"%1.vdb" /x

Let's hope this works

edit 2 - Silver - the step for makemovies.bat just creates an empty batch file.
Title: Re: MAME Movie Maker released
Post by: Silver on September 27, 2005, 01:14:39 am
An empty makemovies.bat file means that whatever filtering listgen is doing, its not what you want....

I set the listgen.ini to audit roms (ie only try and make movies of roms you actually have) so if you are pointing the roms dir to a duff dir I expect you would get this result.

Also check the filter.sql file. there are lots of filtering options in here, but it should work fine if you leave it untouched.

Try running listgen from the commandline, change the "silent 1" to "silent 0" in listgen.ini to see what its doing.
Title: Re: MAME Movie Maker released
Post by: cdbrown on September 27, 2005, 01:21:06 am
I found that it wasn't using my roms folder for some reason - it actually didn't take my settings such as putting the avi's into movies folder.  But it did mean that vdub ran and I have changed the batch.bat file to the following which works

@echo %1
@if exist C:\mame\%1.avi goto end
@if exist C:\mame\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
@start /min /wait C:\mame\virtualdub\vdub.exe /s"%1.vdb" /x
@del %1.wav
@del /Q moviesnp\*.png
@del %1.vdb
@move /Y %1.avi C:\mame\movies\
: End
Title: Re: MAME Movie Maker released
Post by: Silver on September 27, 2005, 06:23:39 am
Could you highlight the bits you had to change so I can update the program?

Thanks
Title: Re: MAME Movie Maker released
Post by: NIVO on September 27, 2005, 08:47:15 am
I have to say after many headaches and long hours last night, I finally have this working. Big thanks going to cdbrown, who helped me setup some of the strings that were improper. Ill leave it up to him to get you the data Silver, as he is better at this than me :)  All in all, thanks for everyones help.
Title: Re: MAME Movie Maker released
Post by: Silver on September 27, 2005, 09:08:36 am
Ah spotted error#1:

@move /Y %1.avi C:\mame\movies\

I am missing the final "\" on the above line - thats why the movies where not moving (and probably overwriting each other).

I'll get this fixed asap. Apart from that, it seems to work with freshly download buddamame, listgen, vdub.

I was going to adapt the app to take control completely - no batch files at all, do all the configuring and program running directly, but actually I don't think there is much to be gained, and also this way allows easy tweaking of the files for anyone who wants and will make bug tracking far far easier.

Note there will be some games that do not make a successful vid (most do). If you come across any that are not listed in ssf.txt/boundry please let me know and I will get it sorted.
Title: Re: MAME Movie Maker released
Post by: Silver on September 27, 2005, 09:13:21 am
RE Neogeo games:

They all work fine, but often have very long attracts with several segments. Eg negeo logo, part1, neogeo logo, part2, neogeo logo, part3 etc..etc...

 Buddamame will make a nice vid of say just part1 (it detects a loop when the neogeo logo comes round again). This is fine, but there was a move to add details to ssf.txt/boundry.txt to make a complete "perfect" attract (which is much longer) for these situations. However I have noticed that sometimes neogeo games seem to start at different points of an attract - I am trying to determine if it is random or in fact based on the contents of the games nvram file (I think some of them remember where they got to on poweroff). If anyone knows that would be great....

NB for some games - eg driving ones that need analog config - you need to set them up so they boot properly before you can make an attract vid.
Title: Re: MAME Movie Maker released
Post by: Silver on September 27, 2005, 10:43:23 am
Quick fix:

http://www.silverfoxy.plus.com/MovieBatch.exe

Now adds the missing "\" so the movies are moved to the output folder after creation.
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on September 27, 2005, 09:06:58 pm
A couple of points:


Third, I don't think the MAME devs give a hoot about demo loop videos. I could write something to take a subset of the new mng video with only the relevant frames, but that would take some kind of script and external program and we already need that. Nor do the MAME devs want the -ssf options in there.



That's my point.... these command line options aren't needed inside mame they should be put in the script or external app.  No offense to you, but I don't want to use a crazy hacked build of mame to generate movies, I'd rather have the basic functionality in the main mame build (which ONLY needs to be the ability to record a mng and wav at the same time via the command line and use said function with teh already included "-frames_to_run").  Silvers's ssf.txt can then be applied to the external app which sets the "frames_to_run" setting when launching mame and cuts out any extra frames at the beginning in post.

I don't like the idea of having to be dependant on someone to maintain a custom mame build regularly (your only on something like version .96 now right?) when it's far more practical and possible to do it externally. 


BuddaMame's special loop detection code could still be kept up for the hardcore users, but the majority of people could just get away with silver's text file and a quick batch to mame.
Title: Re: MAME Movie Maker released
Post by: Buddabing on September 27, 2005, 10:07:27 pm
Okay, I'll submit something to just add the -makemovie option.

I find it ironic that you call this utility "crazy and hacked up" when you had so much input into creating it. Some of the crazy and hacked up options were created at your request!

Someone else can work out the postprocessing steps to convert mng to avi and chop off the extra frames.



Title: Re: MAME Movie Maker released
Post by: Silver on September 27, 2005, 10:25:35 pm
Just to clarify the "ssf.txt" (we should have really changed the name earlier!) only has a very small selection of games in it. The bulk of movies require the detection code.

It perfectly feasable for someone to run the detection and save all the vdb files, giving all the start/end frames, but that would still require someone external to update and maintain the list in it. At the moment its just for tweaked and games that don't detect properly.

MNG to AVI.

I have not looked in months, but I spent *ages* trying to find a Mng to avi converter that works(back when crastest released a torrent of mng videos). I never found a single program commercial or otherwise that could do it, despite several claims. I'd love to know one. Support for certain features in the MNG spec seems to be sketchy in several apps I tried. Personally I don't like the format, but thats because I'm scarred with not finding anything that could reliably decode them.

The only program I found that worked was the advmng.exe from the AdvanceMame tools package. This could save out an MNG to individual frames as pngs. You then had to used a hacked version of Virtualdub (VdubMod) to read these images along with an mp3.I wrote a quick program that automates the conversion:

http://www.silverfoxy.plus.com/MNG2AVI.html

However this is probably out of date - its possible I had to use the hacked version of vdub to support mp3 streams, so not needed here.

Anyway, if mame can save out mng's surely it can save out pngs? otherwise its compressing and decompressing for no real reason.
Title: Re: MAME Movie Maker released
Post by: cdbrown on September 27, 2005, 11:07:57 pm
I'm going to keep pressing on with this buddamame way for the moment as it seems to work quite well now that I have it tweaked.  The new MovieBatch.exe works great.  I have changed the batch.bat so that the mame game window doesn't pop-up by putting this between @ and mame
start /min /wait
ie @start /min /wait mame %1

Now is there anyway to keep all the output videos to a single resolution - say 128x128?  Perhaps force buddamame to take snapshots at that res?

Cheers
-cdbrown
Title: Re: MAME Movie Maker released
Post by: Silver on September 27, 2005, 11:23:06 pm
Ah did I not use the minimise control for mame? only for vdub - soon fix that!

regarding resolution. How mame outputs it is Buddabing's territory, but I belive it would be very hard to impliment in mame. The images are all at the exact original game resolution.

Virtuldub however, certainly does have the facility to resize videos to anything you want. It involves fiddling with the rom.vdb file that buddamame makes for each game, so with the current setup it may take some fiddling by BuddaBing...

Although if memory serves - @Buddabing, is the "roll your own" method (4?) still implimented in your builds? where you can specify the vdb file contents externally? If so I could alter my program to allow certain filters to be used, such as resizing etc...
Title: Re: MAME Movie Maker released
Post by: Silver on September 27, 2005, 11:59:25 pm
Look like -movievideo 4 was the option, and it will look for a file vcodec.dat.

Buddabing, currently you import:

VirtualDub.video.SetCompression
VirtualDub.video.SetCompData

from the vcodec.dat. If you are interested in adding support for filters (eg resize) then all you need to do is change the import so that it imports an extra couple of lines.

This is what we currently have in the vdb file:

VirtualDub.video.SetCompression
VirtualDub.video.SetCompData
VirtualDub.video.filters.Clear();
VirtualDub.audio.filters.Clear();

With a filter we want:

VirtualDub.video.SetCompression
VirtualDub.video.SetCompData
VirtualDub.video.filters.Clear();
VirtualDub.video.filters.Add("resize");
VirtualDub.video.filters.instance[0].Config(128,128,2);
VirtualDub.audio.filters.Clear();

So the 2 extra lines to import must go after the:

VirtualDub.video.filters.Clear();

Is that doable?

EDIT: Just to clarify, I can put the filters in the vcodec.dat now, but if I do that, the next line that buddamame places after them is:

VirtualDub.video.filters.Clear();

which clears the filters. I can include that line in vcodec.dat, so all you need to do is remove the above line when movievideo 4 is selected....
Title: Re: MAME Movie Maker released
Post by: NIVO on September 28, 2005, 12:00:05 am
sounds good, i also request the size 128x128. You see in my fe, i plan to use attract vids of this size, i dont need large file sizes as i dont wish them to be that large. Not to mention it helps keep file sizes down, which is always a huge plus. Again, thx for the time in taking a look at our requests, much appreciated.
Title: Re: MAME Movie Maker released
Post by: Buddabing on September 28, 2005, 12:06:02 am
Well, there already is Howard's -moviesquare option, for creating movies that can be used as textures.

The -moviesquare option creates a 256x256 movie, IIRC.

Aspect ratio is not preserved using this option, it is up to the front end to correct it. That's how Howard and )p( wanted it.

IMO it would be more useful and not redundant to have a resize option that preserves aspect ratio. The larger dimension of the movie would be 128, or what the user specifies, and the smaller dimension would be adjusted according to the aspect ratio.

Why can't you just use the -resolution MAME parameter to do the resizing?

Title: Re: MAME Movie Maker released
Post by: cdbrown on September 28, 2005, 12:24:16 am
have tried the -resolution 128x128 in batch.bat and also within mame.ini.  But the output in moviesnp is the original resolution from within mame.  I did some playing around with the .vdb file prior to vdub being run and entered the 2 lines
VirtualDub.video.filters.Add("resize");
VirtualDub.video.filters.instance[0].Config(128,128,2);
and it produced a nice 128x128 res video.
Title: Re: MAME Movie Maker released
Post by: Silver on September 28, 2005, 12:31:47 am
If memory serves, whatever resolution you run mame at, the pngs that come out are always the same as the original game resolution.

Plus I don't think mame lets you run the games at any resolution you specify.There may be a way that you can alter the png saving code (or the image generation) to any resolution you specify within mame. In fact, it would probably be easier if there was...

If not, then there are resize filters available freely to add to virtualdub (http://neuron2.net/resize.html) that can maintain aspect ratio and trim down to a set height or width (eg 128 pixels).


On a slightly seperate note - I notice there is a ssf.txt in the listgen.zuo distribution - but all the end frames are 3000? Is this on purpose?

@cdbrown:
 the filter linked above (just download and place in your virtualdub/plugins directory) will allow you to resize and maintain aspect ratio. To resize everything to have a height of 128 add these 2 lines:

VirtualDub.video.filters.Add("smart resize (1.1)");
VirtualDub.video.filters.instance[0].Config(187,128,0,4,187,128,0x000000,"1 1 1 1 128 128 100 0 0 0 0 4 4 2 2");

(if that wraps round, thats all 1 line with all those numbers)
Title: Re: MAME Movie Maker released
Post by: cdbrown on September 28, 2005, 12:54:08 am
Those lines do work with the plugin but having to go this manually would be a big pain.  Also the encode rate drops by half (using game 005 from 19kbps to 9kbps) is that part of the filter command?  Ends up causing the the output to be blurry
Title: Re: MAME Movie Maker released
Post by: Silver on September 28, 2005, 01:06:59 am
Ah the blurryness is because its bilinear or bicubic filtering.

Config(187,128,0,4....

Change the "4" above to be one of:

0 Nearest Neighbour
1 Bilinear
2 Bicubic
3 Precise Bilinear
4 Precise Bicubic

0 should be faster and not blurry.

Any kind of filtering will add some overhead. There is an assembly optimised 2:1 reduction inbuilt in Vdub, but there will be an overhead for custom resolution changes.

@Buddabing

I had forgotton about the moviesquare option. Presumbly you already have the ability to change the output res? Obviously using that means having the code in your mame build, not all in an external program, but I lost track of whether that was a good thing or not....
Title: Re: MAME Movie Maker released
Post by: Buddabing on September 28, 2005, 09:23:18 am
Look like -movievideo 4 was the option, and it will look for a file vcodec.dat.

Buddabing, currently you import:

VirtualDub.video.SetCompression
VirtualDub.video.SetCompData

from the vcodec.dat. If you are interested in adding support for filters (eg resize) then all you need to do is change the import so that it imports an extra couple of lines.

This is what we currently have in the vdb file:

VirtualDub.video.SetCompression
VirtualDub.video.SetCompData
VirtualDub.video.filters.Clear();
VirtualDub.audio.filters.Clear();

With a filter we want:

VirtualDub.video.SetCompression
VirtualDub.video.SetCompData
VirtualDub.video.filters.Clear();
VirtualDub.video.filters.Add("resize");
VirtualDub.video.filters.instance[0].Config(128,128,2);
VirtualDub.audio.filters.Clear();

So the 2 extra lines to import must go after the:

VirtualDub.video.filters.Clear();

Is that doable?

EDIT: Just to clarify, I can put the filters in the vcodec.dat now, but if I do that, the next line that buddamame places after them is:

VirtualDub.video.filters.Clear();

which clears the filters. I can include that line in vcodec.dat, so all you need to do is remove the above line when movievideo 4 is selected....

The moviesquare option puts the following into the vdb file:
Code: [Select]
VirtualDub.video.filters.Add("resize");
VirtualDub.video.filters.instance[0].Config(256,256,1);

Please check to see if moving the Clear() line  to right after the SetRange() statement will work right.

I can also make the -moviesquare option take the parameter as the size instead of just using 256. So the MAME parameter would be -moviesquare 128 or -moviesquare 256. Moviesquaree 0 would clear it. I probably should have done that in the first place.
Title: Re: MAME Movie Maker released
Post by: Silver on September 28, 2005, 09:40:59 am
Yes - moving the clear line above the Setcompression/under the Setrange works just fine. So if you change that there will be impact on normal users, but will allow filters to be used in the vcodec.dat...

I forgot we did the resize in Vdub.

Title: Re: MAME Movie Maker released
Post by: Silver on September 28, 2005, 02:12:30 pm
I've thrown together an update to the Moviebatch program - now on to version 0.2:

http://www.silverfoxy.plus.com/MovieBatch0.2.exe

For the record, its written in VB so needs the VB6 runtime files on your system (http://www.silverfoxy.plus.com/LCD/VBSystemFiles-Install.exe)


It now correctly will make the process run completely minimized (mame and vdub). I've also added a few options - the min/max movie lenth, minimum frame start as well was the movie match length (number of frames to have to match in a row before buddamame stops and declares a proper match). They are all set to defaults on startup.

I've also added a few Xvid quality options: Max quality, (quantiser=1) and then a few quantiser levels: 2,3,5,10. Don't worry if you don't know what quantiser is, basically 1= best quality. 10 is roughly where buddamame defaults to on its own I think. Obviously these effect video file size - 1,2,3,5 all make larger filesize movies than the standard. I can add others but you can have a look at the quality here.

NOTE: the below options WILL NOT WORK until buddamame is updated to accept video filters by Buddabing.

There is also a new resize option. You can either set the exact size you want, or you can tick the keep-aspect for a smart resize, which just resizes to within the largest X or Y value you specify. You can also choose the resize filter (applies to smart resize and normal) - what you want here depends on how small you want the vids and how smooth. I suggest you test and find what you want.

Note: Do not specify ODD numbers of pixels in the resize bar - most codecs don't like this and will error. Smart resize will automatically avoid this, normal resize will not (although I will change this in the next version).

NB You MUST have the SmartResize(v1.1.) filter installed in your Virtualdub plugin folder to use the smartresize option. You can download it freely here: http://neuron2.net/resize11.zip read about it here: http://neuron2.net/resize.html
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on September 28, 2005, 03:44:58 pm
Okay, I'll submit something to just add the -makemovie option.

I find it ironic that you call this utility "crazy and hacked up" when you had so much input into creating it. Some of the crazy and hacked up options were created at your request!

Someone else can work out the postprocessing steps to convert mng to avi and chop off the extra frames.

I think you misunderstood me.  When I asked for options to be added it was my assumption that you would add them to either your listgen utility or the batch files that do the post processing.  Hacking mame is always a bad idea because it makes the whole rig less universal. 

We have different philosophies on this.... you have always wanted to do as much as possible inside your custom build.  I've always wanted to eliminate the need for custom builds as much as possible. 

It's the same reason I switched over to the ahk script for johnny5.  When your method was the only way it could be done it was great, but even you can admit that it has severe limitations.  When I found a better way it meant that I could update my mame build immediately or even use optimized builds or crazy mame variants and still use the viewer, so I switched.  I see a similar opportunity with these new mame core changes. 

BuddaMame is a great utility for making movies, but it's not updated fast enough (How can I expect it to?  Afterall, you have a life and such :) ) and it's not the build of mame I'd rather run on my cabinet. 

I think the smart thing to do at this point in time (assuming that the mamedevs accept your submission).  As to add a final option to buddamame to have it automatically make entries to the ssf.txt file.  Then a system could be in place.  As new games are added to mame, silver (or whoever's willing to maintain the file)  could have the option of checking the start frames manually and releasing and update, or using buddamame to do it for him. 

And just as a note, once the mng is converted to avi (tricky, but possible, I've even seen threads on this forum) chopping of extra frames isn't terribly hard.... since everything is in frames, you just need an editor that supports frame-based timelines. 

I think you misunderstand my excitement for a more user-friendly way of doing things for a lack of appreciation for what you've been doing to get us this far. 
Title: Re: MAME Movie Maker released
Post by: Buddabing on September 28, 2005, 04:28:47 pm
The Smart Resize filter maintains aspect ratio?

Also, I moved the two lines of code and recompiled BuddaMAME v0.98. Please try it and see if it works the way you want.

This is an important enough bugfix that I'll update the older versions back to v0.94.

Here's a link to BuddaMAME v0.98 (binary only) (http://cpmaker.mameprojects.com/files/MAME098.ZIP)

Title: Re: MAME Movie Maker released
Post by: Buddabing on September 28, 2005, 05:32:22 pm
I've created the patch to add just the -makemovie option to vanilla MAME. I'll send it off to MAMEdev.

The two questions I have are:

1) Is is possible to unify the output of -wavwrite with the output of -makemovie?

2) Will the resulting movie sync up like it does with MMM?

Also, I tried Silver's mng2avi program and it failed.

Title: Re: MAME Movie Maker released
Post by: Howard_Casto on September 28, 2005, 06:25:12 pm
I don't think wavwrite is gonna sync up unless your makmovie additions make it.  In theory wavwrite and a movie tag would both start at the same time.  In practice they might be off sync by a frame or two. 

I'll be glad to look into alternative mng converters... they have to be out there. 
Title: Re: MAME Movie Maker released
Post by: Silver on September 28, 2005, 06:32:37 pm
Buddabing - yes that version on buddamame 98 works perfectly - allows the resize filter to work automatically.

And yes, the resize filter (as I've set it up) will maintain the aspect ratio. So if you set 128x128 as your resolution, it will shrink the video so that the largest resolution of x/y will be 128. It will also keep the resolutions at multiples of 4 pixels to maintain codec compatibility.

I've just spotted a quick bug in my moviebatch program where it will fail to call listgen if the last directory you selected was not the listgen dir... ie if you selected the location of vdub.exe last and its in a different dir listgen won't run. All the batch/ini files will work though. Just run listgen manually, or select the locatation of listgen.exe last. I'll fix this for next release.


MNG2AVI. Does it give an error? you need to download some programs (like advmng.exe and vdubmod) - it was very quick and basic but did work for me a few others who tried it. I have not tested it with the mng's from mame though. As it currently stands I don't think that its a good solution - normal vdub can now handle the same process. Are we keen to go this mng route? I'll take a look if we are, if not I might kill mng2avi...
Title: Re: MAME Movie Maker released
Post by: Silver on September 28, 2005, 06:33:39 pm
I'll be glad to look into alternative mng converters... they have to be out there. 

I am sure they are... If not, so long as there is something that can decompress them to pngs, we can build a movie out of it.

Edit: This may be dumb, but how do you record an MNG with mame? I've just tried version 0.100. It says "Shift+F12" is the default for recording, but it just seems to take a png snapshot for me... and I can't see any commandline options to output mngs...
Title: Re: MAME Movie Maker released
Post by: Buddabing on September 28, 2005, 07:11:28 pm
By default, it's LEFT shift + F12 to create a mng.

I personally would rather scrap the mng2avi and use a vdb script for the conversion.



Title: Re: MAME Movie Maker released
Post by: Silver on September 28, 2005, 07:22:57 pm
Woops! I was using version 0.99 - my apologies.

Yes I agree - the fewer programs the better. Virtualdub will not take mng's, nor are there any plans to (I asked a while back). If Mamedev will add png output (and if they have mng output, I can't see why not - as its considered to be moving pngs anway) then all we need is 1 script to do it. Although you will also commandline output, not manual start....

For the record, I just tried mng2avi on a 005 mng, and it created a 200 frame avi which should have been longer. I've investigated, the error is that advmng.exe can not decode the mngs that mame outputs. It crashes out decoding the 005.mng with a "unsupported bit depth" error. Yet another program I have found that can't handle mng's. As far as I am concerned, this kills mng2avi. It will/did work on the Crashtest mng video set that was floating around a while back.

I have no idea why mng's are so badly supported - is the spec changing all the time? most decoders I found "can't handle delta-compressed mngs" or only work on some mngs. There are some players that work (I think there is a frontend - emuloader? - that plays mngs but thats it. To be honest, the code needed is probably insude mame, as I guess they are using the mng library. My vote is to avoid mngs all together.
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on September 29, 2005, 01:50:23 am
You guys know my feelings on mngs.  They are pure crap.  Not because the end result is bad (it's actually quite good), but because nothing can play it. 

Mng doesn't have a standard at all, that's the problem.  Getting mng creators to agree on a standard is like getting visual pinball authors to agree on a naming convention.  ;)

I was thinking that even the loop detection could be done externally.  Mame would spit out pngs (or even an mng)  right?  Well those could be compared as they are being outputted by an external app, and the app could simply terminate mame once it detects a loop, remembering the frame it stopped on and deleting any extras that might occur before mame quits.  Again, this isn't the best solution for the end user, but it could be for anyone maintaining a list of start/stop frames. 
Title: Re: MAME Movie Maker released
Post by: cdbrown on September 29, 2005, 02:20:47 am
Silver - the vcodec.dat that is produced by your batchmaker.  I set the X max 128 and Y mas to 96 and the following is produced
VirtualDub.video.filters.instance[0].Config(320,256,0,0,320,256,0x000000,"1 1 1 2 128 96 100 0 0 1 1 4 4 2 2");

I notice it still has 320,256 references - does this have any bearing on the smart resize.  Also after a few tests, Quantiser=3 seems to provide a good quality video at a good encode rate (for 005 18kbps, 3in1semi 26kbps) and the file size is reasonable.  However 1941 encodes at 104kbps and looks fairly crap.
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on September 29, 2005, 02:25:31 am
1942 would look like crap.... think about it, you just set the res to 128x96 and it's a vertical game.  :)
Title: Re: MAME Movie Maker released
Post by: cdbrown on September 29, 2005, 03:51:00 am
ahah - I've got you on two points HC.  First was talking about 1941 (not 1942) and the smart resize plugin used in vdub keeps the games original aspect ratio and resizes it to keep it below the res u set.  So for 1942 (using your example) I had it set to a max output 128x96, the original res is 224x256 and output is resized to 110x96.  However - it still looks crap
Title: Re: MAME Movie Maker released
Post by: Silver on September 29, 2005, 04:42:00 am
Silver - the vcodec.dat that is produced by your batchmaker.  I set the X max 128 and Y mas to 96 and the following is produced
VirtualDub.video.filters.instance[0].Config(320,256,0,0,320,256,0x000000,"1 1 1 2 128 96 100 0 0 1 1 4 4 2 2");

I notice it still has 320,256 references - does this have any bearing on the smart resize.  Also after a few tests, Quantiser=3 seems to provide a good quality video at a good encode rate (for 005 18kbps, 3in1semi 26kbps) and the file size is reasonable.  However 1941 encodes at 104kbps and looks fairly crap.

Hi yes, this is simply the plugin recording all the options in its config - several of them are grayed out when you select certain other ones. I actually just shoved the 320/256 in there as in my tests it has no bearing. The important ones are the 128/96 later on (along with the others).

regarding quality. Quantiser variations may not be the best option - if its easier I can stick in some manual "target bitrates" if that helps. Try having a manual play with compression settings in Vdub/Xvid to see what you are after.

I will say that knocking the resolution down to that size looks fairly dodgy with no compression whatsoever to me on some games. The resize filter definately has an impact. In theory I think Precise Bicubic should be the most 'detailed' but nearest neighbour may be better than you think because there is no smoothing going on....

I hate to say it, but this may be one of the reasons MNG was used, as it can be losslessly compressed quite effectively at low resolutions compared to a mpeg4 codec like Xvid. There lots of settings to try yet though.....

Also, remember you can always change the filter.sql part of listgen to create a batch for vertical and then a batch for horizontal and have differnt res settings...   In fact I should be able to include this option in the batch creator....
Title: Re: MAME Movie Maker released
Post by: cdbrown on September 29, 2005, 05:08:19 am
Just wanted to chek what some of those values are as I noticed they didn't change when altering the max X and Y values in the batch maker (the values in within the " " do change).  I now see how the resize causes the trouble.  Might need to increase to have a max 256x172 and test that.
Title: Re: MAME Movie Maker released
Post by: Buddabing on September 29, 2005, 07:39:07 am

I was thinking that even the loop detection could be done externally.
Title: Re: MAME Movie Maker released
Post by: Silver on September 29, 2005, 08:10:56 am
Just wanted to chek what some of those values are as I noticed they didn't change when altering the max X and Y values in the batch maker (the values in within the " " do change).
Title: Re: MAME Movie Maker released
Post by: Silver on September 29, 2005, 08:17:16 am
I was thinking about that. It could be done pretty easily. You take the mng and split it into pngs, then just extract the code from MMM that does the loop detection into a separate app.
Quote
All this, of course, depends on having a way to start the mng at the same time as the wavwrite.

The external app would have all the functionality that is currently built into MMM.

The problem with this (apart from figuring out how to decode the mng successfully) is that you can't detect the loop until after you've made the mng, and then decoded it. So you won't know if you've recorded far enough for a loop - equally, if the loop is short, you will end up recording loads without any need. While MNG creation may be faster than on the fly comparision that you do now, I can't see this whole process gaining much from what we have now - apart from just being an external app...

If mame could spit out pngs, then at least you could run an external app to scan them at the same time.?

For future reference, when decoding mng's to pngs, pngs are compressed and can be compressed to varying levels. The speed increase gained by using a very light compression is enourmous, as I found with my mng2avi program...
Title: Re: MAME Movie Maker released
Post by: Buddabing on September 29, 2005, 08:46:55 am
I was thinking about that. It could be done pretty easily. You take the mng and split it into pngs, then just extract the code from MMM that does the loop detection into a separate app.
Quote
All this, of course, depends on having a way to start the mng at the same time as the wavwrite.

The external app would have all the functionality that is currently built into MMM.

The problem with this (apart from figuring out how to decode the mng successfully) is that you can't detect the loop until after you've made the mng, and then decoded it. So you won't know if you've recorded far enough for a loop - equally, if the loop is short, you will end up recording loads without any need. While MNG creation may be faster than on the fly comparision that you do now, I can't see this whole process gaining much from what we have now - apart from just being an external app...

If mame could spit out pngs, then at least you could run an external app to scan them at the same time.?

For future reference, when decoding mng's to pngs, pngs are compressed and can be compressed to varying levels. The speed increase gained by using a very light compression is enourmous, as I found with my mng2avi program...

Unfortunately, vanilla MAME doesn't spit out sequences of pngs. We've got to work with what MAMEdev will give us.

The external app will search be able to search boundary.txt and will be able to generate new boundary.txt entries. Creating the first movies will take much longer than it currently does because you have to make sure you capture the entire loop in the mng. Once that is done and the full boundary.txt is created (and audited :)) then movie creation will be easier.

I don't think decoding the mng will be a problem. I'll just reverse the process used to create it in MAME.
Title: Re: MAME Movie Maker released
Post by: Silver on September 29, 2005, 08:58:46 am
ok... so all we need is for vanilla mame to allow mng recording from the start....

Also I think I've kept a whole set (0.97?) worth of vdb files, which will contain the start/end point of most of the games - its not audited, and some will be wrong, but it could save a lot of time when this gets off the ground... I'll look into extracting the right info...
Title: Re: MAME Movie Maker released
Post by: Skadar on September 29, 2005, 10:48:02 am
Feel free to ignore this post completely, but I just can't help it...

18 pages of incredibly hard work for what?  What is the point of all of this?  You guys are doing all of this in order to display a small movie in your MAME front end while you are selecting a game??  Wow.  Seems like you've got time and effort to burn.

I understand the DIY-fever, but this seems a little over the top.
Title: Re: MAME Movie Maker released
Post by: 2600 on September 29, 2005, 11:05:02 am
Feel free to ignore this post completely, but I just can't help it...

18 pages of incredibly hard work for what?  What is the point of all of this?  You guys are doing all of this in order to display a small movie in your MAME front end while you are selecting a game??  Wow.  Seems like you've got time and effort to burn.

I understand the DIY-fever, but this seems a little over the top.

This coming from the guy who's been registered for a month with over 100 posts and who apparently doesn't have time to do stuff, but does have time to comment on other people doing things they enjoy.  :P
Title: Re: MAME Movie Maker released
Post by: papaschtroumpf on September 29, 2005, 11:19:15 am
Feel free to ignore this post completely, but I just can't help it...

18 pages of incredibly hard work for what?  What is the point of all of this?  You guys are doing all of this in order to display a small movie in your MAME front end while you are selecting a game??  Wow.  Seems like you've got time and effort to burn.

I understand the DIY-fever, but this seems a little over the top.

To each his own I guess. I find the movies incredibly useful when selecting a game.
I also use the movies as part of the screen saver, which is another nice way of going "hey, this game looks fun, I haven't tried it yet".
So as far as I'm concerned, thank you to Buddabing, Silver and all those involved in this effort.
Title: Re: MAME Movie Maker released
Post by: Buddabing on September 29, 2005, 11:41:54 am
Feel free to ignore this post completely, but I just can't help it...

18 pages of incredibly hard work for what?
Title: Re: MAME Movie Maker released
Post by: Buddabing on September 29, 2005, 04:57:27 pm
I've created a rudimentary mng2pngs program which splits a mng into its component pngs.

A couple of notes:

1) Mng size can be greatly reduced by running MAME with the -window and the -noartwork options, except for the games that require artwork (Armor Attack, etc). This is because the mng creation process uses the window resolution, not the game resolution.

2) The "Rec Start" message is on the mng as well as the pngs. This is annoying, but may not affect us since the message should disappear before the start of the demo loop.

On to the pngs2vdb program.......

EDIT: Using the -resolution parameter will also greatly reduce the size of the mng.


Title: Re: MAME Movie Maker released
Post by: Silver on September 29, 2005, 08:16:38 pm
Hmmm... thats interesting. Obviously the output of the mng is taken at a later stage in the output process than you were taking the mngs. Does this include things likes scanlines? Does  hardware stretched image get saved as it appears? Will this have an impact on detection if graphics card changes are saved?

On another note - Due to vdubs highly annoying nature of needed the starting point measured in milliseconds, but the end point in frame number, can you remind me how exactly calculate the start time point? Do you take the exact framerate of the game in use, divide by 2 (as we are making 30fps vids from 60fps games) and mulitply by the number of frames? Or did you assume all games were 60fps? I'm asking as I need to reverse calculate all the start frames from a millisecond reference....
Title: Re: MAME Movie Maker released
Post by: cdbrown on September 29, 2005, 08:51:35 pm
Is there any way to change the fps to say 15 like crashtest's vids.  His vids seem quite good quality, but have a fixed size of 256x256.  Was thinking could keep the max smartresize to somewhere around that size (finding 128x128 is a tad too small), drop the fps, use a reasonable quantiser like 3 and see how that all goes?
Title: Re: MAME Movie Maker released
Post by: Silver on September 29, 2005, 10:15:15 pm
Done.

http://www.silverfoxy.plus.com/MovieBatch0.3.exe

New option to set how much the frame rate is decreased by compared to the original. Default is half (0.5) - so you get 30fps for a 60fps game - same as standard buddamame. You can also choose 0.33 (20 fps for a 60fps game) and 0.25 (15fps for a 60fps game).
Title: Re: MAME Movie Maker released
Post by: cdbrown on September 29, 2005, 11:04:04 pm
Damn you are good  ;D
Title: Re: MAME Movie Maker released
Post by: Buddabing on September 30, 2005, 09:38:10 am

On another note - Due to vdubs highly annoying nature of needed the starting point measured in milliseconds, but the end point in frame number, can you remind me how exactly calculate the start time point? Do you take the exact framerate of the game in use, divide by 2 (as we are making 30fps vids from 60fps games) and mulitply by the number of frames? Or did you assume all games were 60fps? I'm asking as I need to reverse calculate all the start frames from a millisecond reference....

From the code:

The SetRange value is calculated by the nunber of frames to skip times 33.3667. This is equal to #frames to skip/29.97*1000.

Some bad news. MAME version 0.100u3 came out and my -makemovie option is not in it, so it looks like that code was rejected. It's possible, though, that they just haven't looked at my submission yet.
Title: Re: MAME Movie Maker released
Post by: Silver on September 30, 2005, 12:49:31 pm
I've heard some people say that code submissions can take a long time to get through. In fact I think I read in the FAQ somwhere that you should wait a while, and if its still not present email and ask and they should be happy to explain why...  I think the key thing is not to start hassling straight away - its only been a very short time since you sent that off I think....

Re: Setrange

Thanks, I should be able to make a complete boundry.txt for all games from that (as a  starting point anyway).
Title: Re: MAME Movie Maker released
Post by: Skadar on September 30, 2005, 01:52:33 pm
Feel free to ignore this post completely, but I just can't help it...

18 pages of incredibly hard work for what?  What is the point of all of this?  You guys are doing all of this in order to display a small movie in your MAME front end while you are selecting a game??  Wow.  Seems like you've got time and effort to burn.

I understand the DIY-fever, but this seems a little over the top.

Hey, I like your purple cab. My cab is purple, too.

Please don't belittle other people's projects. It's a form of thread crapping.

Sorry about that.  I re-read my original post and it appears much harsher than what I had intended.  I also thought about what I had said in a much broader context and realized that without experimental projects like this there probably wouldn't be much forward movement in any hobby or niche interest.

Cheers.
Title: Re: MAME Movie Maker released
Post by: Buddabing on September 30, 2005, 05:04:31 pm
I've got a functioning mng to avi process now.

1) Run the patched MAME (not BuddaMAME) with the -makemovie option, long enough to get a demo loop. Or just run it with the -ftr option.

2) I wrote a program mng2pngs which splits the output mng from MAME into a series of pngs.

3) I wrote a second program pngs2vdb which detects the loop and creates the VirtualDub script.

4) Run VirtualDub just like normal.

This process takes much much longer per movie than BuddaMAME does, because there is a lot of wastage with creating the mng and splitting it back up.

Once the code is complete I'll upload is somewhere and it can be incorporated into the moviebatch.exe program.

It uses the open source libmng, libpng, and zlib libraries.
Title: Re: MAME Movie Maker released
Post by: Silver on September 30, 2005, 05:08:35 pm
This process takes much much longer per movie than BuddaMAME does, because there is a lot of wastage with creating the mng and splitting it back up.

I was afraid of that. Do you think Mamedev would accept an option to spit out pngs? It already happens in screenshot capture (f12) so all you need is for it to happen every frame, and with -ftr we could do the same process missing out the mng?
Title: Re: MAME Movie Maker released
Post by: Buddabing on September 30, 2005, 05:14:06 pm
I'll submit a patch for a -screenshot_every_frame option.

This one might have a shot, it could be useful for diagnosing video-related problems.

I think Aaron's trend is to get rid of options rather than adding them. So I am not particularly optimistic.

Title: Re: MAME Movie Maker released
Post by: 2600 on September 30, 2005, 05:14:40 pm
Is the audio in sync or have you not gotten that far?
Title: Re: MAME Movie Maker released
Post by: Silver on September 30, 2005, 06:15:51 pm
I'll submit a patch for a -screenshot_every_frame option.

This one might have a shot, it could be useful for diagnosing video-related problems.

I think Aaron's trend is to get rid of options rather than adding them. So I am not particularly optimistic.

hope springs eternal... ;-)
Title: Re: MAME Movie Maker released
Post by: Silver on September 30, 2005, 06:17:36 pm
Is the audio in sync or have you not gotten that far?

Mame seems to be very accurate at keeping audio/video in sync. If emaulation is stopped at a certain point, and we've been outputting frames and audio, they have always been perfectly synced. In fact with the buddamame approach the framerate is actually set by the duration of the wav file, and its always spot on....

obviously its possible the mng process might be different, but I doubt it...
Title: Re: MAME Movie Maker released
Post by: Buddabing on October 01, 2005, 04:08:24 pm
Is the audio in sync or have you not gotten that far?

I ran my new mng2avi process on Zookeeper and the audio is perfectly in sync.

The conversion process crashed when I enabled artwork, but ran fine with artwork turned off.

It looks like the snapshots are created at the game's native resolution if MAME is run in a window. If that is the case, we can dispense with the whole -resolution business and tell users just to run with -window -noartwork -makemovie -wavwrite.

Then, if the user wants the avis a different resolution than the game's native res, we can use the VirtualDub smart resize filter.
Title: Re: MAME Movie Maker released
Post by: Silver on October 01, 2005, 06:09:27 pm
I'll get a basic boundry.txt sorted, which should save a huge amount of time....

Then we will just need to identify games which are incorretly detected and get some manual values. Any chance you could thow out a 0.100 build with your non-mng moveimaker - I'll get a complete 0.100 set of autodetection info.... no worries if its a hassle.
Title: Re: MAME Movie Maker released
Post by: Buddabing on October 01, 2005, 09:00:53 pm
Is the audio in sync or have you not gotten that far?

I ran my new mng2avi process on Zookeeper and the audio is perfectly in sync.

The conversion process crashed when I enabled artwork, but ran fine with artwork turned off.

It looks like the snapshots are created at the game's native resolution if MAME is run in a window. If that is the case, we can dispense with the whole -resolution business and tell users just to run with -window -noartwork -makemovie -wavwrite.

Then, if the user wants the avis a different resolution than the game's native res, we can use the VirtualDub smart resize filter.


Unfortunately, my v0.99 and v0.100 source is messed up right now. I've been working on the save states and several drivers are not working.

It'll be a few days before I can sort everything out.

Title: Re: MAME Movie Maker released
Post by: Silver on October 01, 2005, 09:09:53 pm
Don't worry about it - probably not worth it if we are transferring over to the mng process. From a 100% curiosity point of view with your zookeeper test - is the output identical to the png process?

You say 0.99 is messed up - does that include the 0.99 binary you have listed for download?
Title: Re: MAME Movie Maker released
Post by: Buddabing on October 01, 2005, 10:04:14 pm
That binary should be okay driver-wise, but it doesn't have the two lines moved in the .vdb script.

The zookeeper mng2avi video may have detected a few (maybe 5-10) frames offset from the MMM video. Not enough to matter too much, I think.
Title: Re: MAME Movie Maker released
Post by: Silver on October 01, 2005, 10:53:46 pm
Ok I'll use the 98 binary with the 2 line adjustment.

Just to check - will having a boundry.txt of the start/end frames of all the games be helpful if there is a frame offset? I'm guessing not?
Title: Re: MAME Movie Maker released
Post by: Silver on October 01, 2005, 10:58:39 pm
If anyones using it...  ;)

...I've updated the Moviebatch program. Now an option to use Virtualdubs internal high quality 2:1 resolution reduction filter. Simply halves the X and Y resolution of all games. Faster the Smartresize.

Also killed couple of bugs - frame rate adjust would only work if you were also resizing, and the running of listgen is not dependant on which path you selected last.

http://www.silverfoxy.plus.com/MovieBatch0.4.exe
Title: Re: MAME Movie Maker released
Post by: NIVO on October 02, 2005, 05:01:29 am
Silver, i can never run moviebatch.exe  becuase i always get a .dll error. And i have the .dll installed, i put it in 2 folders to be safe(windows/system and windows/system32). i had cdbrown send me the files it made so i could work around the issue so i could process some vids. but i have other ideas on hand, so can you tell me how to fix this error so i can use the .exe from you? thanks
Title: Re: MAME Movie Maker released
Post by: Silver on October 02, 2005, 06:42:10 am
Hmmm you shouldn't need that file at all... looks like I've left in some unwanted references and/or missed out some from the vb runtime installer on my site.

I've uploaded a new version of 0.4 (same link as above) which does not need the file  you mentioned - could you try and out and see if it needs something else?

Title: Re: MAME Movie Maker released
Post by: NIVO on October 02, 2005, 06:57:54 am
BAH! hehe, same stupid error. i can run makemovies.bat fine and all that, just cant seem to get this .exe to go :(
Title: Re: MAME Movie Maker released
Post by: Silver on October 02, 2005, 07:03:33 am
It says the same DLL???

Check you are using the version I just uploaded - it shoudl be 17.5K (or in windows explorer 18K) not 21K big....

EDIT: Woops! My bad - just upped another one - try again!
Title: Re: MAME Movie Maker released
Post by: NIVO on October 02, 2005, 07:19:45 am
just tried again, i get the same error. Silver dont go to the troubles man, i appreciate everything your doing. Incidently, I was fiddling around with manually encoding inside virtualdub, switched to ffdshow for MS_MPEG4 V2 quality, what a difference. Also noticed that nearest neighbor is horrible, switched to bicubic and the image is much cleaner.
Title: Re: MAME Movie Maker released
Post by: Silver on October 02, 2005, 08:07:18 am
If you send me a .vdb file with the compression settings you like in it, I can include it as an option in my prog....

...obviously this doesn't help you at all, as it doesn't work. Not quite sure why at the moment, as the update doesn't even refer to the dll it wants...

Might be worth running the system files setup from Mamewah's site...
Title: Re: MAME Movie Maker released
Post by: NIVO on October 02, 2005, 08:09:58 am
yes ive run that, in fact mamewah working fine, showing my vids and such.
Title: Re: MAME Movie Maker released
Post by: cdbrown on October 02, 2005, 08:20:20 am
When you talk about the vbd file - where do we get that from?  Should we do that "Run job later" and take the codes from there?  NIVO and I have been trying to find a nice sweet spot for encoding the vids and I think with your expertise on vdub we could get a great result.  I like the image quality of the current set of mame vids but don't like them al resized to 256x256 hence losing the aspect.  It would be good to keep the aspect but try and maintain a mx x or y - but most resizes reduce the quality alot.  I wonder if we could also reduce the bitrate of the sound stream.
Title: Re: MAME Movie Maker released
Post by: NIVO on October 02, 2005, 08:24:38 am
or even better cd, kill the audio completely as I like to do hehehe. Ill be jamming to some tunes in the FE anyways so silent vids would do fine(as well as keep the file size down) or looking at it from another view......taking away sound could let us use higher encode for vid in the same amount of space where the sound would have been.  A side note here too, whatsup with snaps looking horrible in mamewah? SO pixelated and icky i cant stand it.
Title: Re: MAME Movie Maker released
Post by: Silver on October 02, 2005, 09:47:39 am
Ok, think i've found the (ridiculous) reason it wants MSSTDFMT.DLL.. I'll try and remove the requirement in future versions.

Anyway in the meantime you need to run:

regsvr32 MSSTDFMT.DLL

from the start/run or a command prompt. This *should* fix it.

VDB files:

Yes the easiest way to get one is the "run job later". If you find a sweet spot that you like/codec you like, just email me the vdb file. As for 256x256... is this your own set, made with -moviesquare? If you use my batch program, you can resize to anything you like while maintaining the aspect ratio. You can set and max X and Y (they can be different).

Audio:

 Removing Audio should be easy - although may be another change to Buddamame's Mame. However:

1) Bear in mind that the audio is low % of the size. in a 1.5 meg avi, its around 100k I think, so you are talking less than 10%. I realise its still wasteful if you don't want audio.

2) We use the audio duration to set the correct frame rate of the video. I've just quickly tested vdub by disabling the audio wav input and it kicked out a file that was incorrect frame rate.

This means that when writing out the vdb file, buddamame (or the future external app when using mng) would have to know the frame rate of the game, or the duration of the wav, to set the correct speed of playback. There may be a way of doing it in Vdub, I'm not sure.
Title: Re: MAME Movie Maker released
Post by: Buddabing on October 02, 2005, 10:53:28 am
I'll add a -movieaudio 3 option to disable audio. -movieaudio 0 means no compression.

Title: Re: MAME Movie Maker released
Post by: Silver on October 02, 2005, 11:09:22 am
Are you able to do anything with the framerate?
Title: Re: MAME Movie Maker released
Post by: Buddabing on October 02, 2005, 11:23:28 am
Are you able to do anything with the framerate?

Probably, but I think that non-default frame rates should be left to the users via vcodec.dat.

Title: Re: MAME Movie Maker released
Post by: NIVO on October 02, 2005, 12:09:40 pm
thanks, i wish i wouldve known to fix this. It did the trick, thanks. As far as sound, we have just been using the option "-nosound" for time being, but yes it does throw off the framerates. Its like its playing in slo-mo mode. The good point though, is that the video is quite good, little to no artifacting or post processing is being seen, and thats a good thing hehe. I/we appreciate you fellas tweaking with us to gain much more favorable results. Cheers.
Title: Re: MAME Movie Maker released
Post by: cdbrown on October 03, 2005, 03:49:25 am
Just ran the latest batchmaker0.4 and used the following properties
xvid, quant-3, smartresize 256x256, bicubic, 15fps and the videos being produced are very nice.  I've only used it on about 10 and it's come out great.  All images are clear and keep the original aspect ratio.

Any way to get listgen to remove the mahjong games from the makemovie.bat - really can't be bothered producing a vid for these.  Also can listgen rule out games that don't run properly (11beat).

Cheers
-cdbrown
Title: Re: MAME Movie Maker released
Post by: Silver on October 03, 2005, 04:15:27 am
thanks, i wish i wouldve known to fix this. It did the trick, thanks. As far as sound, we have just been using the option "-nosound" for time being, but yes it does throw off the framerates. Its like its playing in slo-mo mode.

Doesn't running mame with -nosound cause Vdub to not produce a video because it can't find the wav? Or are you manually editing the vdb files?

As soon as buddabing throws out a custom audio patch, I'll add a no-audio patch and provide an option to set the framerate (or work out how to calculate it correctly).
Title: Re: MAME Movie Maker released
Post by: cdbrown on October 03, 2005, 04:26:26 am
I can confirm after talking with NIVO that removing the -wavwrite command from batch.bat that vdub spits it and doesn't produce the video because the second line of the 1%.vdb file looks for 1%.wav.  I may have convinced him to just go ahead with the sound.
Title: Re: MAME Movie Maker released
Post by: Buddabing on October 03, 2005, 10:02:14 am

Any way to get listgen to remove the mahjong games from the makemovie.bat - really can't be bothered producing a vid for these.
Title: Re: MAME Movie Maker released
Post by: Howard_Casto on October 03, 2005, 03:49:44 pm
Just ran the latest batchmaker0.4 and used the following properties
xvid, quant-3, smartresize 256x256, bicubic, 15fps and the videos being produced are very nice.
Title: Re: MAME Movie Maker released
Post by: cdbrown on October 04, 2005, 04:54:22 am
Do each of the snapshots in moviesnp correspond to a frame within mame?  The reason is some games have lenghty intro's talking about the story of the game (64street).  The title screen and the following gameplay attract doesn't start until the 5721 png.  Just wondering if I could put that number into the moviemaket.bat so it would start frame there and then detect the loop after that?
Title: Re: MAME Movie Maker released
Post by: NIVO on October 04, 2005, 01:04:42 pm
well i edited the output .vdb file for 64street to this:
VirtualDub.subset.AddRange(5721,9243);
goes from title through gameplay footage through to the score table, which is perfect and waht we are looking for.

However 2 key points that it messes up:
#1 audio is way outta sync(but i figured this much as well)
#2 leaves a long black screen end, when it needs to stop immediately after hi score table goes black(which indicates, its about to loop obvioulsy)


*** im beginning to understand the process a bit now hehe, just need to learn what to look for regarding the editing
Title: Re: MAME Movie Maker released
Post by: Silver on October 04, 2005, 01:12:30 pm
Each png in the moviesnp dir represents 1 frame of video output from mame.

Virtualdub has some annoying quirks in its script as you have found out.

The addrange command adds the frames you specify in that range - so it added 5721 - 9243 as your case. Unfortuantely, this means vdub has no idea how to sync the audio.

So what actually happens is that Vdub adds all the frames - Addrange (0,9243)
Then it sets the framerate to match the length of audio - SetFrameRate(-1,2)
(-1 matches duration, 2 is skipping every other frame to give us 30fps)
Then we tell it to only output from our startframe: SetRange(23323,0)

The catch is that for some crazy reason, although addrange deals in frames, setrange deals in milliseconds from the start. So Buddamame converts the number of frames to skip to milliseconds and inserts it here.

Title: Re: MAME Movie Maker released
Post by: Buddabing on October 04, 2005, 03:38:23 pm
Okay, I've created my own mng2avi utility. It takes a mng which was created from MAME and an optional wav which was also created from MAME, and produces an AVI file.

It should support all the most recent modifications, ie.

1) -moviesquare support for 128, 256, etc.
2) moved clear filters to top of .vdb file.
3) added -movieaudio 3 to disable audio even when a wav is present.

So now you can create movies even with an unmodified MAME, so long as your mame supports mng output. (version v0.100 or later)

As of right now you still can't get synced-up sound without a modified MAME.

Here's a link to my mng2avi utility (http://cpmaker.mameprojects.com/files/MNG2AVI.ZIP)

Source is included.


Title: Re: MAME Movie Maker released
Post by: NIVO on October 04, 2005, 04:26:12 pm
thx budda, will take a look at it
Title: Re: MAME Movie Maker released
Post by: cdbrown on October 04, 2005, 09:11:23 pm
Good work Budda - any chance you could give some instructions on how to get this to run - ie what code is required to produce the mng in the first place.  Can it be automated to do each game in turn?
Title: Re: MAME Movie Maker released
Post by: Buddabing on October 04, 2005, 09:46:06 pm
Good work Budda - any chance you could give some instructions on how to get this to run - ie what code is required to produce the mng in the first place.
Title: Re: MAME Movie Maker released
Post by: cdbrown on October 04, 2005, 09:51:48 pm
Thanks again - I think I'll just run the MMM to get my vids.  This way may be good for those that create a silly video that shows the plot of the game but no gameplay.

Cheers
-cdbrown
Title: Re: MAME Movie Maker released
Post by: Buddabing on October 07, 2005, 01:51:32 pm
It looks like my -makemovie change was rejected by MAMEdev. A patch I submitted after the -makemovie change was accepted, so I'm pretty sure about the rejection.

It's possible, though, that they'll add it after I better explain the motivation behind it.

I think I'll rename the option -mngwrite <string> instead of -makemovie. That way it is similar to -wavwrite which is already in MAME.