Recording video in MAME
Recording video in MAME
Video recording in MAME is really hard for me. I tried to record a Ketsui run in Lagless, but it slowed the action to about 20 fps. Is there any fix for this?
Re: Recording video in MAME
I'd be surprised if there wasn't a thread on the subject.
Anyway :
1. Clear the contents of your NVRAM folder (this is needed for inputs playback consistency)
2. Start MAME while recording your gameplay to input record file (.inp). This is the -record command in MAME. MAME32 / MAMEUI have equivalents.
3. Play until you're done. You will see no difference in speed, the game will play absolutely fine unlike video recording : here MAME is only recording the input you pressed, and this is far much less information than a gameplay video.
4. Close MAME
5. Restart MAME to make it playback said inp (-playback command) while writting to a video file (-aviwrite) or writting a set of snapshots (-mngwrite)
6. Done (you can compress the video with your favorite video editing tools).
Anyway :
1. Clear the contents of your NVRAM folder (this is needed for inputs playback consistency)
2. Start MAME while recording your gameplay to input record file (.inp). This is the -record command in MAME. MAME32 / MAMEUI have equivalents.
3. Play until you're done. You will see no difference in speed, the game will play absolutely fine unlike video recording : here MAME is only recording the input you pressed, and this is far much less information than a gameplay video.
4. Close MAME
5. Restart MAME to make it playback said inp (-playback command) while writting to a video file (-aviwrite) or writting a set of snapshots (-mngwrite)
6. Done (you can compress the video with your favorite video editing tools).
Last edited by Keade on Fri Dec 17, 2010 3:25 am, edited 2 times in total.
Re: Recording video in MAME
Alternatively, you can use a recording software like Hypercam 2. During INP playback, run the game in windowed mode and make the window as small as possible. Should make a smooth recording.
Re: Recording video in MAME
That works too, but if your computer's hard drive suddenly can't keep up when writing video data (because some background task suddenly slowed down your computer for instance), I think this part of the video may end messed up. I think this would be less likely an issue when MAME is directly writing the video/audio on disc.
If, on the contrary, your hard drive is fast and would be capable of writing the video faster than in real time, you can toggle throttle in MAME to make the video recording be done faster, and spare some time.
edits : many grammar corrections
If, on the contrary, your hard drive is fast and would be capable of writing the video faster than in real time, you can toggle throttle in MAME to make the video recording be done faster, and spare some time.
edits : many grammar corrections
Last edited by Keade on Fri Dec 17, 2010 3:13 am, edited 1 time in total.
-
- Posts: 243
- Joined: Thu Nov 11, 2010 7:30 pm
Re: Recording video in MAME
What do you use?Kaede wrote:6. Done (you can compress the video with your favorite video editing tools).
500 MB for about 30 seconds of gameplay is pretty harsh.
Re: Recording video in MAME
I don't know much about video editing tools, couldn't really recommend what to use.
You may want to try to write MNG files instead of an uncompressed video. I think MNG files are compressed, so it should take a bit less space.
If using MNG only, don't forget to output audio separately (-wavwrite command)
You may want to try to write MNG files instead of an uncompressed video. I think MNG files are compressed, so it should take a bit less space.
If using MNG only, don't forget to output audio separately (-wavwrite command)
Re: Recording video in MAME
Hypercam 2 records videos in compressed mode already, by the way. I use it to record my stuff and then use Virtualdub for whatever editing I need to do.
-
Bananamatic
- Posts: 3530
- Joined: Fri Jun 25, 2010 12:21 pm
Re: Recording video in MAME
Turning on DirectDraw makes MAME work with Fraps as well.
-
- Posts: 243
- Joined: Thu Nov 11, 2010 7:30 pm
Re: Recording video in MAME
It also makes the visuals really, really ugly and filtered.Bananamatic wrote:Turning on DirectDraw makes MAME work with Fraps as well.
Re: Recording video in MAME
and FRAPS is a computer-consuming bitch. Not recommended for MAME recording.Lance Boyle wrote:It also makes the visuals really, really ugly and filtered.Bananamatic wrote:Turning on DirectDraw makes MAME work with Fraps as well.
Zenodyne R - My 2nd Steam Shmup
Re: Recording video in MAME
I did a Ketsui recording using these steps:
1.Run MAME with record option in my cabinet pc -> inp file (500kb)
2.Run MAME on my laptop with inp playback + avi write -> .avi file (14GB)
3. Use VirtualDub to resize the raw output (5:4 ratio) to 3:4 @ 480p -> .avi file (25GB)
4. Encode to .mp4 using Handbrake -> .mp4 file (400mb)
5. Uploaded to YouTube: http://www.youtube.com/watch?v=T6tbnLFcMIw
Pro: 60fps super smooth video with rich detail
Con: Game runs at 59.175fps, so video is slightly faster than actual gameplay.
Record to input (batch file)
(output input file to .avi file (uncompressed video)
1.Run MAME with record option in my cabinet pc -> inp file (500kb)
2.Run MAME on my laptop with inp playback + avi write -> .avi file (14GB)
3. Use VirtualDub to resize the raw output (5:4 ratio) to 3:4 @ 480p -> .avi file (25GB)
4. Encode to .mp4 using Handbrake -> .mp4 file (400mb)
5. Uploaded to YouTube: http://www.youtube.com/watch?v=T6tbnLFcMIw
Pro: 60fps super smooth video with rich detail
Con: Game runs at 59.175fps, so video is slightly faster than actual gameplay.
Record to input (batch file)
Code: Select all
Shmupmame32_v22.exe ket -record ketsui.inp
Code: Select all
Shmupmame32_v22.exe ket -playback ketsui.inp -aviwrite Ketsui.avi

RegalSin wrote:Street Fighters. We need to aviod them when we activate time accellerator.
-
- Posts: 243
- Joined: Thu Nov 11, 2010 7:30 pm
Re: Recording video in MAME
Holy crap encoding a 25GB file to 400 MB how long did that take you?
Re: Recording video in MAME
You can combine steps 4 and 5. There's a compression settings window in virtualdub you can use. FFdshow can also do the aspect ratio correction for you (1:2 -> 3:4). Ideally it can be scripted using vdub.exe so that it can sit in the background without bothering you too much.
Nice run, btw.
Nice run, btw.
<RegalSin> It does not matter, which programming language you use, you will be up your neck in math.
Re: Recording video in MAME
About 1 hour on a crappy slow laptop.Lance Boyle wrote:Holy crap encoding a 25GB file to 400 MB how long did that take you?
I have never quite figured out how to output h264 files from VirtualDub, that's why I added the Handbrake step (it's just super-easy in that app). I find that h264 is much better liked by YouTube for some reason and will upload faster (or it's just me).austere wrote:You can combine steps 4 and 5. There's a compression settings window in virtualdub you can use. FFdshow can also do the aspect ratio correction for you (1:2 -> 3:4). Ideally it can be scripted using vdub.exe so that it can sit in the background without bothering you too much.
Thanks. I'm a bit rusty after taking quite a long break from Ketsui, but some moves are still working.austere wrote:Nice run, btw.

RegalSin wrote:Street Fighters. We need to aviod them when we activate time accellerator.
-
Bananamatic
- Posts: 3530
- Joined: Fri Jun 25, 2010 12:21 pm
Re: Recording video in MAME
Haven't noticed any difference myself...Lance Boyle wrote: It also makes the visuals really, really ugly and filtered.
Re: Recording video in MAME
Where do you put this code, and what do you do to activate the command? I'm only recording a bit of Stage 3, so I start from a savestate. If it automatically activates, can it be turned on and off?emphatic wrote: Record to input (batch file)(output input file to .avi file (uncompressed video)Code: Select all
Shmupmame32_v22.exe ket -record ketsui.inp
Code: Select all
Shmupmame32_v22.exe ket -playback ketsui.inp -aviwrite Ketsui.avi
Last edited by RNGmaster on Fri Dec 17, 2010 11:00 pm, edited 1 time in total.
-
- Posts: 243
- Joined: Thu Nov 11, 2010 7:30 pm
Re: Recording video in MAME
Command line, press ENTER.RNGmaster wrote:Where do you put this code, and what do you do to activate the command?
Re: Recording video in MAME
Or put it into a Notepad document and save it as "filename of your choice.bat" (you'll need to change the document type from "text" to "all" for it to not save it as just a .txt file) in the same folder as ShmupMAME. Then you can just double-click one of them to start either an .inp recording, or open a Ketsui.inp and write it to .avi. You'll need to remove any existing ketsui.inp in your inp folder each time you wanna start a new recording though.

RegalSin wrote:Street Fighters. We need to aviod them when we activate time accellerator.
Re: Recording video in MAME
This is what I do, but I add an extra line to delete the old input.emphatic wrote:Or put it into a Notepad document and save it as "filename of your choice.bat" (you'll need to change the document type from "text" to "all" for it to not save it as just a .txt file) in the same folder as ShmupMAME. Then you can just double-click one of them to start either an .inp recording, or open a Ketsui.inp and write it to .avi. You'll need to remove any existing ketsui.inp in your inp folder each time you wanna start a new recording though.
To record, make a batch file with this:
Code: Select all
del inp\new.inp
mame 'setname' -record new.inp
To dump video:
Code: Select all
mame 'setname' -playback XXXX.inp -aviwrite XXXX.avi
If possible I recommend dumping the video to a secondary hard drive, it will speed things up greatly. Also, make sure frameskip is ZERO (0) otherwise you will get very choppy video. This takes longer but it's worth it.
Re: Recording video in MAME
There are two restart commands in mame, F3 and shift-F3. If you shift-F3 it will completely restart and the inp file will start over too. So you can just use that to restart and not have to fully exit. Your inp will only contain the gameplay from the last time you hit shift-F3
Also notable is you want to use shift-F3 when you're playing stuff like gunbird/Strikers that have a 'random' stage order that's always fixed on first boot. If you just F3 it'll doesn't revert to the initial power on state.
Also notable is you want to use shift-F3 when you're playing stuff like gunbird/Strikers that have a 'random' stage order that's always fixed on first boot. If you just F3 it'll doesn't revert to the initial power on state.
Seahawk wrote: I'm have restart syndrome bad, so when I am dissatisfied with any run I just exit immediately and hit the batch file again. If I do good enough then I go into the inps folder and rename new.inp to something more meaningful. To good part about this is that if there is no file named new.inp it won't crash.
Re: Recording video in MAME
Awesome, thanks!zakk wrote:There are two restart commands in mame, F3 and shift-F3. If you shift-F3 it will completely restart and the inp file will start over too. So you can just use that to restart and not have to fully exit. Your inp will only contain the gameplay from the last time you hit shift-F3

RegalSin wrote:Street Fighters. We need to aviod them when we activate time accellerator.
Re: Recording video in MAME
Ugh, I wanted to do a Space Harrier scoring run but those file sizes are way too rich for my blood. Any way to just record at low-level youtube quality without a seperate compression process?
IGMO - Poorly emulated, never beaten.
Hi-score thread: http://shmups.system11.org/viewtopic.php?f=2&t=34327
Hi-score thread: http://shmups.system11.org/viewtopic.php?f=2&t=34327
Re: Recording video in MAME
I did some recording from MAME by using the MNG option. The file was roughly 1MB/second (depends heavily on the resolution and color depth of the actual game though). I used advmng from AdvanceCOMP package to break it up into a bunch of PNG files and then converted those to an AVI with virtualdub. I don`t see a way to enable writing both the mng and wav from the gui, so -mngwrite and -wavwrite command line options would have to be used. Frame skipping should be disabled. Fast CPU is needed.
-
GaijinPunch
- Posts: 15872
- Joined: Mon Jan 31, 2005 11:22 pm
- Location: San Fransicso
Re: Recording video in MAME
Do the commands generally work for Mame32 and MameFX?
RegalSin wrote:New PowerPuff Girls. They all have evil pornstart eyelashes.
Re: Recording video in MAME
A quick test shows that it works on mame plus .106, but lagless mame 1.5 crashes, and versions .99 and older don`t have the mng option. (doesn`t exactly answer the question, sorry)
Re: Recording video in MAME
One question here. The program you give records the inputs, but in random sections (like Stage 3 of DDP) a movement path that works one time could fail if the RNG puts bullets in different places. Unless the random attacks show up in exactly the same place (or if recording input also records bullet trajectories) when I playback the input, I could run into a bullet.
If I was doing the Stage 2 boss' last pattern in Progear, for example, I could record input and dodge the attack flawlessly. But if I were to playback the input, and the game spit out a new randomly-generated pattern, you can see that the input recording wouldn't do me much good. Unless the game spits out exactly the same bullets, input recording is not very helpful.
If I was doing the Stage 2 boss' last pattern in Progear, for example, I could record input and dodge the attack flawlessly. But if I were to playback the input, and the game spit out a new randomly-generated pattern, you can see that the input recording wouldn't do me much good. Unless the game spits out exactly the same bullets, input recording is not very helpful.
Re: Recording video in MAME
If your playback file isn't working, then either your nvram file is corrupt or you are using a different MAME build to play it back. There is no such thing as "random patterns" with MAME and inputs. Only human error when playing it back.RNGmaster wrote:One question here. The program you give records the inputs, but in random sections (like Stage 3 of DDP) a movement path that works one time could fail if the RNG puts bullets in different places. Unless the random attacks show up in exactly the same place (or if recording input also records bullet trajectories) when I playback the input, I could run into a bullet.
If I was doing the Stage 2 boss' last pattern in Progear, for example, I could record input and dodge the attack flawlessly. But if I were to playback the input, and the game spit out a new randomly-generated pattern, you can see that the input recording wouldn't do me much good. Unless the game spits out exactly the same bullets, input recording is not very helpful.

RegalSin wrote:Street Fighters. We need to aviod them when we activate time accellerator.
Re: Recording video in MAME
^Exactly, (most) games don't have a truly random number generation because the "randomness" is based on timers and/or user input, which are consistent from one playback to another.
Some games do have INP replayability issues but it is rather rare (and Cave games don't have too many problems afaik).
If you encounter such issues you may find info at MARP.
Some games do have INP replayability issues but it is rather rare (and Cave games don't have too many problems afaik).
If you encounter such issues you may find info at MARP.
Re: Recording video in MAME
I didn't know how MAME computed "random" patterns. So, if I'm following, that means that if I do EXACTLY the same thing every time I play, then the game will use the exact same patterns, even with ones that seem to be randomly chosen.emphatic wrote: If your playback file isn't working, then either your nvram file is corrupt or you are using a different MAME build to play it back. There is no such thing as "random patterns" with MAME and inputs. Only human error when playing it back.
Re: Recording video in MAME
It depends, are you a computer controlled robot?RNGmaster wrote:emphatic wrote:So, if I'm following, that means that if I do EXACTLY the same thing every time I play, then the game will use the exact same patterns, even with ones that seem to be randomly chosen.


RegalSin wrote:Street Fighters. We need to aviod them when we activate time accellerator.