Mame Video Capturing: Unterschied zwischen den Versionen

keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
 
(15 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 109: Zeile 124:
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:
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:


*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.
*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.
 
[[Image:VideoEdit_AdvanceComp.png]]
[[Image:VideoEdit_AdvanceComp.png]]


Zeile 115: Zeile 131:
[[Image:VideoEdit_Command_Line.png]]
[[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
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 cd.. for a parent folder or cd somefolder to navigate to a desired subfolder. To change to
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.
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.
[[Image:VideoEdit_AdvanceComp_Cmd.png]]
 
To extract the png sequence type in: advmng.exe --extract yourfile.mng (in my case its advmng.exe --extract ssf2xj.mng)


Now the interesting part: To extract the png sequence type in: advmng.exe --extract yourfile.mng
[[Image:VideoEdit_AdvanceComp_Extract.png]]
(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
The result should look like this. The window output shows numbered png images scrolling down. The advmng tool is extracting the png
image sequence to your AdvanceCOMP folder. Just wait until the extraction stops and you are done. The number at the end of the extraction
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.
is the framerate of this mng stream. It may vary.
 
'''Remember the following:'''


Remember the following:
* 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
* 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.


    * Nearly all games run with 60fps which means: If your mng file duration is 2min the resulting png sequence will be:
=== Putting it all together ===
      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
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:


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
[[Image:VideoEdit_VirtualDub_Image_Import.png]]
choose the first!! png file of the sequence:


*Virtualdub should import the sequence without problems.


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


Virtualdub should import the sequence without problems. Then: Click on Audio and then on WAV Audio. This brings up a file select dialog.
*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.
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.
[[Image:VideoEdit_VirtualDub_Framerate.png]]
    * 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
*If the number shows '''60''' then select the second option change frame rate to (fps) and change it to 60.
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.


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
*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.
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.


== Capturing with aviwrite (new & easy method) ==


Contact, credits and final notes
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.
:[[Mame_Video_Capturing#Explanation_in_detail:]]
:[[Mame_Video_Capturing#Writing_your_own_batch_file_and_recording]]


If you have further questions or suggestions feel free to contact me:
Instead of using this line([[Mame_Video_Capturing#Introduction: | from above example]):
via MSN schwarzpantsu at hotmail.com
via MIRC (quakenet) #hardedge
via www.hardedge.org forums (subarashii)
via www.cyberfanatix.com forums (schwarzpantsu)


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


you have to change it into:


<code>MameUI32.exe ssf2t -pb ssf2t.inp -aviwrite ssf2t.avi</code>


Copyright (c) subarashii 2008
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.


== Capturing with aviwrite (new & easy method) ==
= 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.
 
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.