How to Record Netplay Videos in MAME32 Plus! Plus! 0.119

MAME Gurus come to your aide to help you. Please use the search before adding a topic. This will help cut down on having multiple topics with the same subject.
Post Reply
User avatar
Hierophant
Site Administrator
Site Administrator
Posts: 3453
Joined: December 11th, 2008, 8:41 pm
Favorite Game: Alien vs Predator
Location: LV-426 Acheron
Contact:

How to Record Netplay Videos in MAME32 Plus! Plus! 0.119

Post by Hierophant » October 28th, 2012, 8:00 pm

How to Record Netplay Videos in MAME32 Plus! Plus! 0.119


Introduction

During the course of the MAMEPlus! Recording thread the subject of internal netplay recording also came up; that is, making an input file from a Kaillera netplay game and later converting it to a video inside MAME. The main point of pursuing that method was to try and help people on older PCs who can't use Fraps, etc, to properly record their online multiplayer games due to the extra resource demands of external capture programs. However, I ran into a seemingly insurmountable obstacle; the standard MAME32 Plus! Plus! 0.119 version for download at http://www.kaillera.com - mameppk_bin_gcc-0.119-20070914 - has a bug in the AVI recorder that crashes MAME whenever you try to replay input to AVI record. I'd long given up on the idea until recently, when Nick, the kind owner of the YouTube channel below, approached me with some invaluable info:

http://www.youtube.com/user/arronmunroe

He has tons of cool netplay vids on his channel so check him out. Nick informed me that there is another MAME32++0.119 version near to the standard gcc one which has a fully working AVI recorder. Fortunately, this alternative vc version is still accessible on the Wayback Machine:

mameppk_bin_vc-0.119-20070917 - http://web.archive.org/web/200710050053 ... 0070917.7z

Many thanks to Nick for noticing our dilemma and coming forward with the crucial piece of the puzzle that I had missed for so long. Now I can finally offer a tutorial about this MAME internal netplay recording method.


Tutorial

An important thing to know about the gcc and vc versions of MAME32++0.119 is that the recorded input (or .inp) files are compatible between them both. This is helpful because it means that there is no need to convince anyone to change from their standard gcc version. Everyone can keep using it for netplay and any recorded input files can be opened later in the vc version for AVI conversion. Another important point to note is that AVI recording would not function until I installed DivX (I don't have any codec packs installed).

If you're already familiar with Open Kaillera P2P netplay on MAME32++0.119 (if not, see my tutorial here - viewtopic.php?f=9&t=316 - or here - http://www.thenewnet.eu/en/index.php?op ... Itemid=300), the actual steps involved are reasonably straightforward.

Before doing anything else, let's first make sure that an AVI record hotkey is setup. Run any game and open the in-game options menu with the tab key. Go Input (general)>Special Controls>select AVI Record at the bottom of the list>hit the enter key>choose your preferred hotkey>tab or esc to exit. I like to use "M" for movie. Back in the GUI it's a good idea to go Options>Default Game Options>Display>tick the checkbox for Run in a window>OK. Also go Options>Default Game Options>Miscellaneous>tick the checkbox for Auto pause when playback is finished>OK. I'll explain why later.

To begin a recording session, open gcc MAME32++0.119 and go Options>Kaillera Client Options>tick the checkbox for Local record input>OK. Then go File>Kaillera NetPlay and play a game with someone (client server or P2P, it doesn't matter which).

When the game has loaded, a brief message will be displayed: Play Game With Record Input Log As nXX ("XX" being the designated file number - 00, 01, 02, etc). After you've finished playing there will be a new .inp file for that game in MAME's inp folder. At this point it would be wise to rename the file to avoid accidentally overwriting it the next time you play the same game.

Now it's time to switch to vc MAME32++0.119 and begin the process of input to AVI conversion. The input file of your netplay game can be moved to vc's inp folder if you want, or just leave it as is and browse to it later. Either way, go File>replay(inp) to AVI Record then select and open the .inp file of your netplay. The AVI RECORD window will now open. There are heaps of options here but it's normally not necessary to change any of them at this point so just go OK>Save.

MAME will now open in a paused state along with a Video Compression window. When MAME is initially "Run in a window", as per my previous instructions, the Video Compression window will be clearly visible above the MAME window; as opposed to starting MAME in full screen which can make this part of the procedure problematic. Here you can either select your favourite codec for compression or go with Full Frames (Uncompressed) if you plan on cutting the video later. Once the game starts you can press the AVI record hotkey anytime to start recording. A flashing indicator will appear at the top left to let you know that an AVI is being recorded. You can press left alt + enter anytime to switch between windowed and full screen display, but it won't make any difference to the AVI that's being made. If you setup "Auto pause when playback is finished", as I suggested earlier, you can walk away if you want while the AVI is recording. Even though there may be some lag on an older PC during AVI recording, the AVI that gets made will be fine (with the exception of a few specific games). The AVI will end up in MAME's avi folder.


Post-Processing

VirtualDub - http://sourceforge.net/projects/virtual ... =directory
XviD Codec - http://www.xvid.org/Downloads.15.0.html

If the AVI was long enough to get partitioned it can easily be stitched back together in VirtualDub. If you recorded Full Frames (Uncompressed), VirtualDub can take care of compression as well. To start, go File>Open video file>browse to the first segment>Open. For each segment thereafter go File>Append AVI segment>browse to the next part>Open. Alternatively, check the timeline after appending the second part. I've noticed in mine that all subsequent segments get appended automatically with the second part. When all necessary parts are added in the correct order go Video>Compression>select your preferred codec (I recommend XviD)>OK. Then go Video>Filters>Add>resize>adjust the Absolute (pixels) height (the second number along) to something good for YouTube (eg. 480)>change Codec-friendly sizing to Multiples of 2>OK.

You can also do basic editing with the Mark in, Mark out arrows to trim the vid (left, right arrow buttons just to the left of the frame counter at the bottom). Say you have a period of inaction that you want to cut somewhere in the middle of the recording. Drag the slider on the timeline close to the start of that section then use the keyboard left and right arrows to fine tune to the exact frame you want start the cut from. Press the Mark in button. Drag the slider near to the end of the section to be cut and fine tune again. Press the Mark out button. All of the frames you want to dump will be highlighted now so simply press the delete key. You can press the Output playback button anytime to preview your work.

If you're happy with the results go File>Save as AVI to render your video. Now all that's left to do is upload the finished video to YouTube and share the MAME online multiplayer fun with the world!

Here's a vid of Nick [P2] and me [P1] playing Cadillacs and Dinosaurs which was recorded using the steps outlined above while he helped me test the functionality of this method:


Moon
New Member
New Member
Posts: 1
Joined: April 2nd, 2013, 2:44 am

Re: How to Record Netplay Videos in MAME32 Plus! Plus! 0.119

Post by Moon » April 3rd, 2013, 10:21 am

Thanks for your tutorial on how to record videos from MAME, Hierophant. What I'm wondering though, is there any MAME version that can record when started from stat files? I've saved in level 72 of Bubble Bobble and wanted to record a video only of solving this level rather than recording the entire game and cutting everything before. Is that already possible?

User avatar
ChameleonAlpha
Guru Extreme
Guru Extreme
Posts: 185
Joined: January 15th, 2013, 5:39 pm
Favorite Game: KOF 96
Location: Edward City

Re: How to Record Netplay Videos in MAME32 Plus! Plus! 0.119

Post by ChameleonAlpha » April 7th, 2013, 8:44 pm

I'm using MAME 0.133 and what I do is:
-Go to "File" and select "Play with options"
-Select "Load savestate"
-While you're on the "Play with options" screen, press "Record input" (or record to AVI if you already have the input or your PC is fast enough not to lag)
That way, you can play the game with several options. If this seems confusing to you, you can use this video by the Hiero himself to orientate a bit better.

User avatar
Hierophant
Site Administrator
Site Administrator
Posts: 3453
Joined: December 11th, 2008, 8:41 pm
Favorite Game: Alien vs Predator
Location: LV-426 Acheron
Contact:

Re: How to Record Netplay Videos in MAME32 Plus! Plus! 0.119

Post by Hierophant » April 7th, 2013, 10:11 pm

Very nice work, Chameleon! I don't use save states much, so thanks for coming through with that good info.

:V:

Edit: Thanks to Chameleon's info I made a video tutorial to demonstrate the steps to combine saved states with input record and playback to AVI record in MAMEPlus!:

MAMEPlus! Save State and Input to AVI Record - viewtopic.php?p=11998#p11998

Post Reply