Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: MAME Movie Maker released  (Read 143726 times)

0 Members and 1 Guest are viewing this topic.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
MAME Movie Maker released
« 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

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. Note: you need to install it into a directory named \virtualdub on the same drive as MAME in order for the batch processes to work right.

By default, MAME uses the 'XVid' video compression software. If you use the defaults when you do not have the Xvid software installed, your videos will be huge. Zookeeper, for example, should produce an AVI that is less than 1/4 megabyte with Xvid. If it is not installed, Zookeeper will produce a 250 megabyte file! This page has XVid software that will work with this project.

I am distributing binaries and source of version 0.89 and v0.90 of MAME.
Link to binary and source of MAME 0.89
Link to binary and source of MAME 0.90
Link to binary and source of MAME 0.91
Link to binary and source of MAME 0.92
Link to binary and source of MAME 0.93
Link to binary and source of BuddaMAME 0.94
Link to binary and source of BuddaMAME 0.95
Link to binary and source of BuddaMAME 0.96
Link to binary and source of BuddaMAME 0.97
Link to binary and source of BuddaMAME 0.98
Link to binary and source of BuddaMAME 0.99
Link to binary and source of BuddaMAME 0.100
Link to binary and source of BuddaMAME 0.101
Link to binary and source of BuddaMAME 0.102
Link to binary and source of BuddaMAME 0.103
Link to binary and source of BuddaMAME 0.104

Link to latest version of ListGen

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
« Last Edit: February 22, 2006, 09:10:14 am by Buddabing »
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: MAME Movie Maker released
« Reply #1 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
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re: MAME Movie Maker released
« Reply #2 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.

Silver

  • Wiki Contributor
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:February 17, 2024, 10:29:00 am
  • Cunning like the Fox.
    • Mods'n'Mods
Re: MAME Movie Maker released
« Reply #3 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?


Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: MAME Movie Maker released
« Reply #4 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.
« Last Edit: February 09, 2005, 05:21:40 pm by Buddabing »
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

JoyMonkey

  • Voodoo Wiki Master . . .
  • Wiki Master
  • Trade Count: (+5)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2899
  • Last login:March 25, 2023, 09:38:52 am
  • Candy is Dandy but Liquor is Quicker
    • JoyMonkey.com
Re: MAME Movie Maker released
« Reply #5 on: December 30, 2004, 04:18:36 pm »
...You need to install my MAME artwork display code patch, which is here. 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!
« Last Edit: December 30, 2004, 07:35:22 pm by JoyMonkey »

BuZz880

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 201
  • Last login:November 16, 2023, 02:16:43 pm
  • I'm a llama!
Re: MAME Movie Maker released
« Reply #6 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.




Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: MAME Movie Maker released
« Reply #7 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.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

BuZz880

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 201
  • Last login:November 16, 2023, 02:16:43 pm
  • I'm a llama!
Re: MAME Movie Maker released
« Reply #8 on: December 31, 2004, 12:28:18 am »
No hurry here.  Take care of yourself.

Silver

  • Wiki Contributor
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:February 17, 2024, 10:29:00 am
  • Cunning like the Fox.
    • Mods'n'Mods
Re: MAME Movie Maker released
« Reply #9 on: January 03, 2005, 06:39:07 am »
The zips are now working fine when I download them.

Buddabing, hope you are feeling better.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: MAME Movie Maker released
« Reply #10 on: January 03, 2005, 11:34:42 am »
Okay, I'm back and I'm better now, I was like this
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

)p(

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 964
  • Last login:March 27, 2009, 03:38:15 am
  • We are the Galaxians...
    • Emulaxian:cabinet and frontend
Re: MAME Movie Maker released
« Reply #11 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

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re: MAME Movie Maker released
« Reply #12 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?

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: MAME Movie Maker released
« Reply #13 on: January 03, 2005, 12:42:54 pm »
I was just about to post a problem compiling and noticed movies.zip changed.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re: MAME Movie Maker released
« Reply #14 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.




Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: MAME Movie Maker released
« Reply #15 on: January 03, 2005, 02:13:48 pm »
Ok, stepped through it and it's virtualdub.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re: MAME Movie Maker released
« Reply #16 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?

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: MAME Movie Maker released
« Reply #17 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.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: MAME Movie Maker released
« Reply #18 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 :)

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: MAME Movie Maker released
« Reply #19 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

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: MAME Movie Maker released
« Reply #20 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.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: MAME Movie Maker released
« Reply #21 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 :)

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: MAME Movie Maker released
« Reply #22 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.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: MAME Movie Maker released
« Reply #23 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)


 ???

Silver

  • Wiki Contributor
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:February 17, 2024, 10:29:00 am
  • Cunning like the Fox.
    • Mods'n'Mods
Re: MAME Movie Maker released
« Reply #24 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....


Silver

  • Wiki Contributor
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:February 17, 2024, 10:29:00 am
  • Cunning like the Fox.
    • Mods'n'Mods
Re: MAME Movie Maker released
« Reply #25 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?

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: MAME Movie Maker released
« Reply #26 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.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Silver

  • Wiki Contributor
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:February 17, 2024, 10:29:00 am
  • Cunning like the Fox.
    • Mods'n'Mods
Re: MAME Movie Maker released
« Reply #27 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.

Silver

  • Wiki Contributor
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:February 17, 2024, 10:29:00 am
  • Cunning like the Fox.
    • Mods'n'Mods
Re: MAME Movie Maker released
« Reply #28 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.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: MAME Movie Maker released
« Reply #29 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
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: MAME Movie Maker released
« Reply #30 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.

BuZz880

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 201
  • Last login:November 16, 2023, 02:16:43 pm
  • I'm a llama!
Re: MAME Movie Maker released
« Reply #31 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.

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re: MAME Movie Maker released
« Reply #32 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.


Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: MAME Movie Maker released
« Reply #33 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.

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re: MAME Movie Maker released
« Reply #34 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.


Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: MAME Movie Maker released
« Reply #35 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
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Silver

  • Wiki Contributor
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:February 17, 2024, 10:29:00 am
  • Cunning like the Fox.
    • Mods'n'Mods
Re: MAME Movie Maker released
« Reply #36 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!



2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re: MAME Movie Maker released
« Reply #37 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.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: MAME Movie Maker released
« Reply #38 on: January 04, 2005, 11:35:57 am »
I sure like the new improved listgen utility.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: MAME Movie Maker released
« Reply #39 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 :)