Previous Thread
Next Thread
Print Thread
Page 2 of 3 1 2 3
Joined: Mar 2008
Posts: 21
J
Member
Member
J Offline
Joined: Mar 2008
Posts: 21
I just tried the -record on two separate recordings, one was real short and it worked good. The other one was around 20 minutes of play and that one didn't work out. I guess there are still some gremlins to fix.

Problem was that sometimes the fighters would just pause and do nothing. Sometimes only one of them did something.

I do have imagemagick and it didn't occur to me to use it as a mng converter. Thanks for pointing it out BrainDead.

Joined: Mar 2008
Posts: 21
J
Member
Member
J Offline
Joined: Mar 2008
Posts: 21
Hello everyone.

I've done a bit more testing on the inp recording and I think the longer the recording the more Mame can potentially mess it up.

I managed to create an mng file though Imagemagick didn't seem to like extracting the pngs so I used XnView (THANKS). The command I used:
nconvert -xall -out png test.mng

I then tried to use mencoder:
mencoder "mf:///path/*.png" -mf fps=30 -double -o test2.avi -ovc xvid -xvidencopts bitrate=1024

The resulting video had some intense black screen flickering. If anyone has any idea, would be much obliged.

Joined: Jun 2007
Posts: 107
B
Senior Member
Senior Member
B Offline
Joined: Jun 2007
Posts: 107
Yep, imagemagick/convert wasn't working for me on the mngs, so I figured it wasn't compatible. If we're doing something wrong, by all means let us know, but it's just hanging with mng here. All that's worked for me was wine + mng2avi.exe.

I'll also add that when dealing with inp or save states, some games, for example, pulstar, get messed up sound when starting from a save state if the -sr is changed; gets slow and out of sync. Also, the "-fps 60" mencoder setting someone mentioned after me is off if the game doesn't run at 60 fps, so keep that in mind.

Oh, and this:
Quote
I then tried to use mencoder:
mencoder "mf:///path/*.png" -mf fps=30 -double -o test2.avi -ovc xvid -xvidencopts bitrate=1024

The resulting video had some intense black screen flickering. If anyone has any idea, would be much obliged.

My idea is to use x264 instead of xvid. And 30 fps? Does the game run at that speed? If not, try setting the proper fps of the game. I already mentioned this, but this is the line I use to make the movie of the pngs:

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

This is a lossless format, and good to work with.

At that point, video.avi can be merged with the sound, frames and dimension can be cropped, etc. Then I encode 3-pass to x264 (optional cropping and sound addition settings would be added accordingly):

Code
mencoder -ovc x264 -x264encopts qp=29:frameref=15:subq=7:brdo:trellis=2:direct_pred=auto:bframes=16:bime:mixed_refs:8x8dct:weight_b:pass=1 video.avi -o /dev/null -aspect 4:3

mencoder -ovc x264 -x264encopts qp=29:frameref=15:subq=7:brdo:trellis=2:direct_pred=auto:bframes=16:bime:mixed_refs:8x8dct:weight_b:pass=3 video.avi -o /dev/null -aspect 4:3

mencoder -ovc x264 -x264encopts qp=29:frameref=15:subq=7:brdo:trellis=2:direct_pred=auto:bframes=16:bime:mixed_refs:8x8dct:weight_b:pass=2 video.avi -o compressed.avi -aspect 4:3

Joined: Mar 2008
Posts: 21
J
Member
Member
J Offline
Joined: Mar 2008
Posts: 21
I did try the -fps 60 and that pretty much didn't work. I'll try wine with mng2avi and see how that works out.

imagemagick/convert was also hanging for me and I tried it dozens of times trying to read up on possible syntax I missed.

XnView managed to extract the pngs just fine. I forgot to mention that when mencoder tried to encode the video the video timeline was split in half in that the latter half of the video played first before the start of the video. Minor inconvenience and should be easy to fix.

EDIT: Brass, I'll try your mencoder settings to see how that goes. I plan to run all of this on a video editing software anyway, so the fps doesn't have to be spot on, but it's roughly 30 fps.

The flicker problem is one thing I'd like to get resolved.

EDIT: I just used the wine mng2avi exe to extract the pngs then did mencoder. This worked brilliantly. The video plays correctly and the flickers are gone.

For reference:
Code
wine mng2avi.exe test.mng -movieskipblack 1

Then:
Code
mencoder -ovc lavc -lavcopts vcodec=ffv1:vstrict=-2 -o mng2avi-test.avi "mf:///path/pngs/*.png" -mf fps=30

Thanks everyone! smile I hope this thread helps others attempting to record too.

Last edited by Jack Anton; 04/17/08 01:27 AM.
Joined: Oct 2007
Posts: 4
B
Member
Member
B Offline
Joined: Oct 2007
Posts: 4
Originally Posted by Brass
Yep, imagemagick/convert wasn't working for me on the mngs, so I figured it wasn't compatible.

sorry, my fault :-( convert can not handle delta mng

now a better tip:

there is a dead mame port called advance mame. the author also wrote some utils for it. One of them is called AdvanceCOMP.
http://advancemame.sourceforge.net/comp-readme.html
it contains the tool 'advmng'. Its intended for recompressing, but it can also extract png form mng.

advmng --extract xxx.mng


Joined: Apr 2008
Posts: 3
M
Member
Member
M Offline
Joined: Apr 2008
Posts: 3
Among various tries with syntax likes this

Code
mencoder mf://d:\1\*.png -mf w=256:h=224:fps=60:type=png -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o output.avi

on Win XP SP2 Mencoder locks up and I'm getting an error message:

Quote
MEncoder 1.0rc1-3.4.2 (C) 2000-2006 MPlayer Team
CPU: AMD Sempron(tm) 2200+ (Family: 6, Model: 8, Stepping: 1)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 0 SSE2: 0
Compiled with runtime CPU detection.
success: format: 16 data: 0x0 - 0x0
MF file format detected.
[mf] search expr: d:\1\*.png
[mf] number of files: 3566 (14264)
VIDEO: [MPNG] 256x224 24bpp 60.000 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:16 fourcc:0x474E504D size:256x224 fps:60.00 ftime:=0.0167
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffpng] vfm: ffmpeg (FFmpeg PNG decoder)
==========================================================================

Flushing video frames
Filters have not been configured! Empty file?
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

Video stream: -1.#IO kbit/s (-2147483648 B/s) size: 0 bytes 0.000 secs 0 frames

What kind of filters? And what about aspect info when image size is given? Thx!


c64-longplays.de
Complete C64 game walkthroughs as videofiles
Joined: Mar 2001
Posts: 17,316
Likes: 280
R
Very Senior Member
Very Senior Member
R Offline
Joined: Mar 2001
Posts: 17,316
Likes: 280
I don't see an error, and the "lock up" might be that it's just taking time to run. Maybe try it on a smaller number of frames?

Joined: Apr 2008
Posts: 3
M
Member
Member
M Offline
Joined: Apr 2008
Posts: 3
No, it's definitely an error that also occured with only 100 frames. I'm getting this:

[Linked Image from img174.imageshack.us]

Rough translation: mencoder has experienced difficulties and must be terminated. All data not saved may be lost.

The resulting output.avi ist actually a text file that has lots of '[= MPlayer junk data! =]' in it.

Being a complete Linux newbie I tried it with Live CDs. Neither Ubuntu nor Kubuntu would compile Mencoder (why the HECK don't they offer a binary of it but only of Mplayer?) so I finally made it work with Knoppix 5.3. It's been a pita to get this far though. Curiously enough Fraps worked like a charm for me. Which brings me back to our dialogue in the other thread.


c64-longplays.de
Complete C64 game walkthroughs as videofiles
Joined: Jun 2007
Posts: 107
B
Senior Member
Senior Member
B Offline
Joined: Jun 2007
Posts: 107
mencoder is far from perfect but I find the windows version to be nearly identical to the nix version. The version I have, which I think is current, can't even encode vorbis correctly. But I digress.
Is there a special reason you need to use mpeg4? It's already quite inferior to h.264/x264 which is actually "mpeg4 part 10" and I doubt setting mpeg4 in mencoder is the same thing. If it's for iphones or something, it supports h.264. If you don't need mpeg4 look at the previous posts on this thread and try encoding x264 with those commands. Then it will support the -aspect tag and you won't need any -mf options, so you can basically forget about that -mf option and simply encode the pngs with mf:// and specifying -fps by itself, -aspect will also work (ex: -aspect 4:3). You should just try those lines first, they're sure to work. I haven't tried it, but I think setting mpeg4 to a similar command wouldn't yield a much different result as far as errors.

Joined: Apr 2008
Posts: 3
M
Member
Member
M Offline
Joined: Apr 2008
Posts: 3
The line quoted above just happened to have mpeg4 in it, I've been trying several codecs and all end up in said error message. I've also tried your setting from post #40314 but to no avail. Maybe I'm just too stupid to come up with the right parameters so if you don't mind maybe you can give me the syntax for this setup:

source: d:\1\*.png
target: mngtest.avi
60 fps
256x224
lossless or xvid
1.wav

Option a) Mux with Mencoder straight to xvid
Option b) Encode to lossless and mux wav in Virtualdub and encode to xvid


c64-longplays.de
Complete C64 game walkthroughs as videofiles
Page 2 of 3 1 2 3

Moderated by  R. Belmont 

Link Copied to Clipboard
Who's Online Now
0 members (), 535 guests, and 17 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,399
Posts122,883
Members5,092
Most Online3,327
Nov 10th, 2025
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Powered by UBB.threads™ PHP Forum Software 8.0.0