Mame Video Capturing: Unterschied zwischen den Versionen

keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
 
(21 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
= Introduction =
=important=
{| cellspacing=0 cellpadding=3 style="text-align: center; color:black;width:100%;"
|style="background-color: #FFF6AD;border: 1px solid #B5B5B5" |[[Image:Postponed.png|30px]] '''Caution:''' This is a very old article highlighting the ''best (without framedrops)'' possible way to capture mame gameplay around 2008
|}
 
This article has been written around 2008 when emulating games in MAME was way more difficult as it is today in {{CURRENTYEAR}}. Emulating games at that time required a lot of CPU and there often was simply not enough performance left for capturing said games without loosing frames in the process. Both MAME and the conventional capture systems used were prone to frameskips. This article -at that time- tried to mitigate these issues by showing an alternative capture method (albeit more complex).
 
[[Benutzer:Subarashii|subarashii]] ([[Benutzer Diskussion:Subarashii|Diskussion]]) 00:45, 24. Dez. 2022 (CET)
 
=Introduction=


== Motivation behind this guide ==
== Motivation behind this guide ==
Zeile 14: Zeile 23:


= Requirements =
= Requirements =
== Knowledge and skills ==
*Basic understanding of mame and emulation in generall
*dos navigation and writing basic batch files


== Software ==
== Software ==
Zeile 61: Zeile 76:
===Introduction:===
===Introduction:===


*This capturing method is for older mame versions which do not support avi recording.  
*Note: This capturing method is for older mame versions which do not support avi recording. If you are using a up to date mame version please use the aviwrite method described [[Mame_Video_Capturing#Capturing_with_aviwrite_.28new_.26_easy_method.29 | below]].


*You need to create a windows batch file which does the entire capturing work for you. This is the line for capturing Super Street Fighter 2 Turbo. I´ve chosen this game as an example. What this batch file does is quite simple:
*You need to create a windows batch file which does the entire capturing work for you. This is the line for capturing Super Street Fighter 2 Turbo. I´ve chosen this game as an example. What this batch file does is quite simple:
Zeile 99: Zeile 114:
=== Launching the script ===
=== Launching the script ===


After you have finished your batch script launch it by doubleclicking on your batch file. The result should look like this:
After you have finished your batch script launch it by doubleclicking on your batch file. The result should look like this. Please note: The gameplay '''will stutter during the whole recording process'''. It depends on your equipment but it is because mame still needs to emulate the game and the mng writing process is very cpu consuming. The resulting video and audiostream will be fine.


[[Image:VideoEdit_Capturing_Result.png]]
[[Image:VideoEdit_Capturing_Result.jpg]]


Note: The gameplay will stutter during the whole recording process. It sure depends on your equipment but it is because mame still needs to emulate the game and the mng writing process is very cpu consuming. Don´t worry. The resulting video and audiostream will be fine. To end recording just close mame and you are done.
To end recording just close mame and you are done.


=== Converting the mng stream to editable video ===


You will find your mng file inside the '''snap''' folder and the wave inside the '''root folder''' of your mame(where the mame exe is). The mng stream file needs to be extracted to an usable png image sequence. AdvanceCOMP will do that work for us:


Converting the mng stream to editable video
*Extract the contents of advancecomp archive into a folder. The easiest way to deal with the next commandline commands is to copy your mng and wave file into your extracted AdvanceCOMP folder. Note: I am using a different version of Super Street Fighter 2 Turbo ind this example. Its the japanese version and is named ssf2jx instead of ssf2t.


You will find your mng file inside the snap folder and the wave inside the root folder of your mame. The mng stream file needs to be extracted
[[Image:VideoEdit_AdvanceComp.png]]
to an usable png image sequence. AdvanceCOMP will do that work for us. Extract the contents of advancecomp-1.15-windows-pentium.zip
into a folder.


*Next. Open a command prompt. You can do this by clicking on start then on run. The run window pops up: Type in cmd and hit enter or click ok.
[[Image:VideoEdit_Command_Line.png]]


Navigate to your advancecomp folder (in my case its: E:\mame-guide\advancecomp-1.15-windows-pentium\). Here is a little help on old
dos navigation. You can navigate by typing <code>cd..</code> to a parent folder or <code>cd somefolder</code> to navigate to a desired subfolder. To change to another drive type <code>E:\</code> or another letter. In my case its drive E. This depends on how your drives are named. Notice that my ssf2xj.mng and ssf2xj.wav are already copied into this folder.


The easiest way to deal with the next commandline commands is to copy your mng and wave file into your AdvanceCOMP folder. Next. Open
[[Image:VideoEdit_AdvanceComp_Cmd.png]]
a command prompt. You can do this by clicking on start then on run. The run window pops up: Type in cmd and hit enter or click ok.


To extract the png sequence type in: advmng.exe --extract yourfile.mng (in my case its advmng.exe --extract ssf2xj.mng)


[[Image:VideoEdit_AdvanceComp_Extract.png]]


Navigate to your AdvanceCOMP folder (in my case its: E:\mame-guide\advancecomp-1.15-windows-pentium\). Here is a little help on old
The result should look like this. The window output shows numbered png images scrolling down. The advmng tool is extracting the png
DOS navigation. You can navigate by typing cd.. for a parent folder or cd somefolder to navigate to a desired subfolder. To change to
image sequence to your advancecomp folder. Just wait until the extraction stops and you are done. The number at the end of the extraction is the framerate of this mng stream. It may vary.
another drive type E:\ or another letter. In my case its drive E. This depends on how your drives are named. Notice that my ssf2xj.mng and
ssf2xj.wav are already copied into this folder.


Now the interesting part: To extract the png sequence type in: advmng.exe --extract yourfile.mng
'''Remember the following:'''
(in my case its advmng.exe --extract ssf2xj.mng)


The result should look like this. The window output shows numbered png images scrolling down. The advmng tool is extracting the png
* Nearly all games run with 60fps which means: If your mng file duration is 2min the resulting png sequence will be: 60 frames per second * 120 seconds = 7200 png files
image sequence to your AdvanceCOMP folder. Just wait until the extraction stops and you are done. The number at the end of the extraction
* If you are recording kaillera matchvideos or local ones make sure to have enough space on your hdd. Mng and the resulting png sequences tend to be very large. Their size is similar to uncompressed avi material.
is the framerate of this mng stream. It may vary.
 
=== Putting it all together ===
 
I am not going to do any detailed introduction on virtual dub. Just the things you need to know to complete this part. Open up virtual dub and choose the '''first!''' png file of the sequence:


Remember the following:
[[Image:VideoEdit_VirtualDub_Image_Import.png]]


    * Nearly all games run with 60fps which means: If your mng file duration is 2min the resulting png sequence will be:
*Virtualdub should import the sequence without problems.  
      60 frames per second * 120 seconds = 7200 png files
    * If you are recording kaillera matchvideos or local ones make sure to have enough space on your hdd. Mng and the resulting png
      sequences tend to be very large. Their size is similar to uncompressed avi material.


Putting it all together
*Click on Audio and then on WAV Audio. This brings up a file select dialog. Select your recorded wav file and hit OK.


I am not going to do any detailed introduction on virtual dub. Just the things you need to know to complete this part. Open up virtual dub and
*The next thing you need to do is to setup the correct framerate of the footage. To do so click on Video then select Frame Rate. This step is important. The framerate depends on the frecuency of your game. I mentioned the framerate at the end of the mng extraction earlier.
choose the first!! png file of the sequence:


[[Image:VideoEdit_VirtualDub_Framerate.png]]


*If the number shows '''60''' then select the second option change frame rate to (fps) and change it to 60.


Virtualdub should import the sequence without problems. Then: Click on Audio and then on WAV Audio. This brings up a file select dialog.
*For all other odd numbers (like 59 if you capture cps2) select the third option and chose: '''change so video and audio durations match''' like in the screenshot shown below. Note that my screenshot shows a 59.634 framerate. This is absolutley ok because if you visit [http://www.mameworld.net/maws/romset/ssf2xj the mame database maws] and scroll down to frequency you will notice: The game runs at 59.633333Hz. This is not an error. The game really runs at that frequency. A lot older games have such strange frequencies.
Select your recorded wav file and hit OK. The next thing you need to do is to setup the correct framerate of the footage. To do so click on
Video then select Frame Rate. This step is important. The framerate depends on the frecuency of your game. I mentioned the framerate at the
end of the mng extraction earlier.


    * If the number shows 60 then select the second option change frame rate to (fps) and change it to 60.
== Capturing with aviwrite (new & easy method) ==
    * For all other odd numbers (like 59 if you capture cps2) select the third option and chose: change so video and audio durations match
      like in the screenshot shown below. Note that my screenshot shows a 59.634 framerate. This is absolutley ok because if you visit the mame
      database maws ( http://www.mameworld.net/maws/romset/ssf2xj ) and scroll down to frequency you will notice: The game runs at
      59.633333Hz. This is not an error. The game really runs at that frequency. A lot older games have such strange frequencies.


You can do additional work like resize the video, add some filter and do other editing. Remember: Uncompressed AVI
This method follows a different new approach. Newer mame versions support a avi writing method to ease up things. Please take a look at these two sections before you read on. They explain the commandline structure and how to write own batch scripts for recording.  
files are very large! Try a lossless codec to preserve quality for further editing. Select file and then Save as AVI to save your footage.
:[[Mame_Video_Capturing#Explanation_in_detail:]]
:[[Mame_Video_Capturing#Writing_your_own_batch_file_and_recording]]


If your framerate was 60 you are done. This is probably what you wanted in the first place Sit back and enjoy your crisp, fluid 60fps video
Instead of using this line([[Mame_Video_Capturing#Introduction: | from above example]):
footage. If your framerate was odd ( like 59.634 for CPS2 games ) then adjust it to match 60fps. Trust me you will not notice the difference
between 59.634 and 60.


<code>MameUI32.exe ssf2t -pb ssf2t.inp -mngwrite ssf2t.mng -wavwrite ssf2t.wav</code>


Contact, credits and final notes
you have to change it into:


If you have further questions or suggestions feel free to contact me:
<code>MameUI32.exe ssf2t -pb ssf2t.inp -aviwrite ssf2t.avi</code>
via MSN schwarzpantsu at hotmail.com
via MIRC (quakenet) #hardedge
via www.hardedge.org forums (subarashii)
via www.cyberfanatix.com forums (schwarzpantsu)


The resulting file will be saved in your snap folder. It wil contain sound so there is no need to write a wave file inside the command line. This method is very easy to use.


= Postproduction =


You can do additional work like resize the video, add some filter and do other editing. Remember: Uncompressed video files are very large! Try a lossless codec like lagarith to preserve quality for further editing. Select file and then Save as AVI to save your footage.


Copyright (c) subarashii 2008
If your framerate was 60 you are done. This is probably what you wanted in the first place Sit back and enjoy your crisp, fluid 60fps video footage. If your framerate was odd ( like 59.634 for CPS2 games ) then adjust it to match 60fps. Trust me you will not notice the difference between 59.634 and 60.