Previous Thread
Next Thread
Print Thread
Page 1 of 3 1 2 3
Could Sdlmame be recorded on video? #40204 04/13/08 05:15 PM
Joined: Jun 2007
Posts: 107
B
Brass Offline OP
Senior Member
OP Offline
Senior Member
B
Joined: Jun 2007
Posts: 107
A long time ago I remember recording 'mame32' on video, I don't remember if it was an in-emulator feature or not but I doubt it. But now, would anyone have any pointers on pulling this off with Sdlmame and mencoder? I know that mencoder can record from stdin, but could this be connected to Sdlmame, if so how?

Re: Could Sdlmame be recorded on video? [Re: Brass] #40206 04/13/08 06:10 PM
Joined: Mar 2001
Posts: 16,523
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,523
Like baseline you can output .MNG + .WAV, although tools for dealing with MNGs are still fairly primitive.

Re: Could Sdlmame be recorded on video? [Re: R. Belmont] #40230 04/14/08 04:44 AM
Joined: Jun 2007
Posts: 107
B
Brass Offline OP
Senior Member
OP Offline
Senior Member
B
Joined: Jun 2007
Posts: 107
Thanks, there is even shift+f12, too bad I don't see an equivalent for the wav part which makes the hotkey way useless for my intents. Recording the whole session makes things pretty tedious and I had to go through a ton of different applications but selected video with sound can be done. Hopefully using an inp playback is easier.

The mng tools available are not good indeed, but then again mng seems pretty lousy itself. The only mng tool I found simply split the whole thing into pngs. A different session can record the wav. At that point a lossless movie can be created from the pngs with mencoder, I recommend ffv1 format. The trick is to input the exact fps of the emulated game when creating this temporary video. For example, once the pngs are ripped, to create the video from a directory with the pngs out of a cps2 game, I input:

Quote:
mencoder -ovc lavc -lavcopts vcodec=ffv1:vstrict=-2 -o video.avi mf://<path>/*.png -mf fps=59.633


At that point the wav can be merged, then the video cropped with whatever way you can find. There's probably a better way than mine, but I wanted to ultimately separate the video and audio and compress them separately. The only way I knew how right away was to crop the merged video with mencoder with the -ss and -endpos options, then making it an ogm with ogmmerge, then extracting the video and audio separately into avi and wav. At that point I could finally compress the video into x264 and the audio to vorbis, then merge the results back with ogmmerge. If you can play ogm, h264 and vorbis and want to see the example: http://www.mediafire.com/?x4vgtixcycg

I haven't tested the process with what I really want, recording a session of an inp playback, but I'm hoping it won't be a problem. I'll do that when I update mame because it seems to be failing.

Re: Could Sdlmame be recorded on video? [Re: Brass] #40232 04/14/08 05:35 AM
Joined: Mar 2001
Posts: 16,523
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,523
INP was broken prior to u2, it should be OK now.

Re: Could Sdlmame be recorded on video? [Re: R. Belmont] #40234 04/14/08 06:34 AM
Joined: Mar 2008
Posts: 21
J
Jack Anton Offline
Member
Offline
Member
J
Joined: Mar 2008
Posts: 21
inp works last time I tested it, but it just goes off sync after a while. Since I need the state (nvram, etc.) of the Mame arcade, I don't think I can use inp.

Can you detail more about what you did with the creation of every png frame?

Thanks. smile

Re: Could Sdlmame be recorded on video? [Re: Jack Anton] #40236 04/14/08 01:00 PM
Joined: Mar 2001
Posts: 16,523
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,523
The sync issue is EXACTLY what I was saying was fixed in u2.

Re: Could Sdlmame be recorded on video? [Re: Jack Anton] #40266 04/14/08 10:11 PM
Joined: Jun 2007
Posts: 107
B
Brass Offline OP
Senior Member
OP Offline
Senior Member
B
Joined: Jun 2007
Posts: 107
Originally Posted By Jack Anton
inp works last time I tested it, but it just goes off sync after a while. Since I need the state (nvram, etc.) of the Mame arcade, I don't think I can use inp.

Can you detail more about what you did with the creation of every png frame?

Thanks. smile


http://cpmaker.mameprojects.com/mng2avi/index.html

I only used the mng2avi.exe splitter, it makes the pngs. From there I used mencoder and oggenc for the wav.

And another thing to note. For the sound, it's probably a good idea to use the -sr tag when running mame and set the soundrate of the game, you get cleaner sound that way. I only know a few like cps2 is 32000, neogeo I think 44100. I think most newer games are 44100, but it's just a matter of knowing. Some for sure have weird ones like the playstation does (37800hz), which is why I use vorbis. mp3 sucks and can't encode to non-standard sound rates. It just generally sucks compared to vorbis, really.

Last edited by Brass; 04/14/08 10:26 PM.
Re: Could Sdlmame be recorded on video? [Re: Brass] #40274 04/15/08 04:40 AM
Joined: Mar 2008
Posts: 21
J
Jack Anton Offline
Member
Offline
Member
J
Joined: Mar 2008
Posts: 21
Thanks for the info Brass. I'll test out the u2 and see if it works out.

I wonder if this runs on Linux. I'll check later.

Re: Could Sdlmame be recorded on video? [Re: Brass] #40276 04/15/08 08:10 AM
Joined: Sep 2004
Posts: 43
V
Van Ba Offline
Member
Offline
Member
V
Joined: Sep 2004
Posts: 43
Linux/Mac users should check Nconvert and the forthcoming cross-platform version of XnView here.

Re: Could Sdlmame be recorded on video? [Re: Van Ba] #40283 04/15/08 12:06 PM
Joined: Oct 2007
Posts: 4
B
BrainDead Offline
Member
Offline
Member
B
Joined: Oct 2007
Posts: 4
for batch processing images i recomend imagemagick: http://www.imagemagick.org/
its included in allmost all linux distributions and consists of several small comand line utils.

for converting an mng file to png simply type
convert xxx.mng xxx.png
it creates xxx-#.png files (#: 0 .. nr frames in mng file)

to convert the resulting pngs to an avi use mencoder. ie

mencoder mf://<path>/xxx*.png -mf fps=60 -o xxx.avi -ovc <many options for the output video codec>


Page 1 of 3 1 2 3

Moderated by  R. Belmont 

Who's Online Now
2 registered members (AJR, Golden Child), 109 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,784
Posts115,597
Members4,908
Most Online890
Jan 17th, 2020
Powered by UBB.threads™ PHP Forum Software 7.7.3