View unanswered posts | View active topics It is currently Tue Nov 19, 2019 7:38 am



This topic is locked, you cannot edit posts or make further replies.  [ 504 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 21  Next
(old) ZMV to AVI video conversion [[archive me]] 
Author Message
Dark Wind
User avatar

Joined: Thu Jul 29, 2004 8:58 pm
Posts: 1270
Location: Texas
Post 
Welcome to page 2.

To record a video you need one of the latest work in progress builds of ZSNES. Get them here: http://zsnes.ipherswipsite.com/

You will need a copy of mencoder. For Windows users, I recommend getting mencoder here: http://oss.netfarm.it/mplayer-win32.php
Place mencoder.exe in the same location as zsnesw.exe, you do not need any codecs or other movie programs installed.
Linux users, having mencoder in your path is fine.

If you want to compress the outputted audio, or compress it before it goes into the video as opposed to during, you will need a copy of LAME.
If you use Windows, you must get LAME from here: http://geocities.com/joecool22us/lame.zip
Any other copy of LAME for Windows will not work due to a bug in LAME.

Before you are able to dump an AVI, you must have recorded a movie first, it converts movies, it does not just dump video on the fly.

To play back movies, you'll either need the proper codecs or a video player with built in decoding of the video mode you selected.
I recommend getting mplayer which decodes anything created with mencoder. For Windows, you can get mplayer here: http://oss.netfarm.it/mplayer-win32.php You can download the GUI version.

Advanced users can edit zmovie.cfg and tweak the settings if they want, and even use something other than mencoder and LAME as long as it supports encoding via stdin and you set it up properly.

________
Nach wrote:
ZSNES and mencoder are running at the same time.

mkfifo makes the file become shared memory, so as ZSNES outputs the raw, mencoder immediatly encodes it and outputs the AVI.
And the RAM isn't depleted, because as mencoder reads the memory, it disappears from memory.


I know that, but what happens if mencoder isn't able to encode in real-time? Does zsnes wait for it, or do frames get dropped, or what?

Nach wrote:
BTW, what shell would you use to run both together? I know cygwin has what you need, but I wouldn't want to make anyone use that.

http://unxutils.sf.net I believe has ZSH which probably supports the & technique to run two programs together. If their coreutils also comes with mkfifo, I'd recommend using that instead.


OK. I'll try it with msys, then, if that doesn't work, I'll try unxutils.

_________________
#577451


Mon Apr 18, 2005 2:24 pm
Profile WWW
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Jul 27, 2004 10:54 pm
Posts: 3902
Location: Solar powered park bench
Post 
Player1 wrote:
what requirements does this feature needs that is usable?


ZSNES, a game, a ZMV for that game, a raw video player or converter.

_________________
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding


Mon Apr 18, 2005 2:39 pm
Profile WWW
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Jul 27, 2004 10:54 pm
Posts: 3902
Location: Solar powered park bench
Post 
Noxious Ninja wrote:
Nach wrote:
ZSNES and mencoder are running at the same time.

mkfifo makes the file become shared memory, so as ZSNES outputs the raw, mencoder immediatly encodes it and outputs the AVI.
And the RAM isn't depleted, because as mencoder reads the memory, it disappears from memory.


I know that, but what happens if mencoder isn't able to encode in real-time? Does zsnes wait for it, or do frames get dropped, or what?


You worry too much. It'll take a while, but not frames get dropped. Just make sure you set frame skip to 0 in ZSNES.

_________________
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding


Mon Apr 18, 2005 2:41 pm
Profile WWW
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Jul 27, 2004 10:54 pm
Posts: 3902
Location: Solar powered park bench
Post 
2 pass 400 bit XviD:

Code:
./zsnesd -md -mc -zm 1 /mnt/D/roms/nintendo/snes/punchout.smc & mencoder -nosound -rawvideo on:format=0x42475220:w=256:h=223:size=228352:fps=60 -ovc xvid -xvidencopts pass=1:aspect=4/3 -o /dev/null /home/nach/.zsnes/rawvideo.bin


Code:
./zsnesd -md -mc -zm 1 /mnt/D/roms/nintendo/snes/punchout.smc & mencoder -nosound -rawvideo on:format=0x42475220:w=256:h=223:size=228352:fps=60 -ovc xvid -xvidencopts pass=2:bitrate=400:aspect=4/3 -o punchout.avi /home/nach/.zsnes/rawvideo.bin


http://nsrt.edgeemu.com/punchout.zip

_________________
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding


Tue Apr 19, 2005 12:11 am
Profile WWW
Lurker

Joined: Sat Sep 25, 2004 10:59 am
Posts: 118
Location: I don't know where I am
Post 
They look great, Nach.


Tue Apr 19, 2005 3:16 am
Profile
Dark Wind
User avatar

Joined: Thu Jul 29, 2004 8:58 pm
Posts: 1270
Location: Texas
Post 
@Nach: Did you get the PM I sent you?

_________________
#577451


Tue Apr 19, 2005 3:51 am
Profile WWW
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Jul 27, 2004 10:54 pm
Posts: 3902
Location: Solar powered park bench
Post 
Noxious Ninja wrote:
@Nach: Did you get the PM I sent you?


I got one with the words "Cool" "Test" and "Tonight". Is that what you're referring to?

_________________
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding


Tue Apr 19, 2005 4:28 am
Profile WWW
Dark Wind
User avatar

Joined: Thu Jul 29, 2004 8:58 pm
Posts: 1270
Location: Texas
Post 
Oops, I didn't send the message I thought I did. :oops: Anyway, I tested it, and it crashed whenever I hit the Record button in Movie Options.

Anonymous CVS seems to be WAY behind right now, so I can't try building it myself.

_________________
#577451


Tue Apr 19, 2005 5:01 am
Profile WWW
Dark Wind
User avatar

Joined: Thu Jul 29, 2004 8:58 pm
Posts: 1270
Location: Texas
Post 
Update: I now have the source, built it myself, and it still crashes when pressing the record button. It creates the file then dies.

_________________
#577451


Tue Apr 19, 2005 4:42 pm
Profile WWW
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Jul 27, 2004 10:54 pm
Posts: 3902
Location: Solar powered park bench
Post 
Strange I'll have to go check if one of my recent changes screwed up ZSNESW.

_________________
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding


Tue Apr 19, 2005 5:29 pm
Profile WWW
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Jul 27, 2004 10:54 pm
Posts: 3902
Location: Solar powered park bench
Post 
I decided to pit XviD and libavcodec head to head.

Guys, tell me which vid looks better, punchout2.avi or punchout3.avi.

http://nsrt.edgeemu.com/punchout2.zip

_________________
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding


Wed Apr 20, 2005 12:27 am
Profile WWW
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Jul 27, 2004 10:54 pm
Posts: 3902
Location: Solar powered park bench
Post 
If you're having trouble, install mplayer or Media Player Classic with FFDShow.

http://www.mplayerhq.hu/homepage/design7/dload.html

http://sourceforge.net/project/showfile ... e_id=84358
http://ffdshow.sourceforge.net/tikiwiki ... ticles.php

_________________
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding


Wed Apr 20, 2005 1:52 am
Profile WWW
Dark Wind
User avatar

Joined: Thu Jul 29, 2004 8:58 pm
Posts: 1270
Location: Texas
Post 
Whenever the recording option starts working again, I'm going to try a speed run for Prince of Persia. I don't think anybody's done that game yet.

Is the ZMV format stable yet?

_________________
#577451


Wed Apr 20, 2005 2:16 am
Profile WWW
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Jul 27, 2004 10:54 pm
Posts: 3902
Location: Solar powered park bench
Post 
Noxious Ninja wrote:
Is the ZMV format stable yet?


I may add on an extra byte in last input field within chapters if I see it's not large enough to contain special controllers. Other than that, I don't plan on changing the format. So if you don't use chapters, you should be fine.
Unforunetly grinvader is away right now, and when he comes back, I'll have to make sure current format meets his approval. Probably will though.

_________________
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding


Wed Apr 20, 2005 2:21 am
Profile WWW
Inmate
User avatar

Joined: Mon Dec 06, 2004 7:47 am
Posts: 1751
Location: WA
Post 
i'm just going to say puchout2 because 3 wouldn't play, and i don't feel like getting another media player.

_________________
Image


Wed Apr 20, 2005 3:04 am
Profile
Rookie
User avatar

Joined: Thu Aug 26, 2004 3:24 am
Posts: 21
Post 
Like mentionned before, you need FFdshow installed.


Wed Apr 20, 2005 3:08 am
Profile
Lurker

Joined: Sat Sep 25, 2004 10:59 am
Posts: 118
Location: I don't know where I am
Post 
punchout3.avi seems to clean up a little better than punchout2.avi.


Wed Apr 20, 2005 5:58 am
Profile
Rookie
User avatar

Joined: Thu Aug 26, 2004 3:24 am
Posts: 21
Post 
I am somewhat deceived about that. VirtualDub doesn't seem to handle RAW video and it creates too large file. I think it's a bad idea.


Wed Apr 20, 2005 7:02 am
Profile
Dark Wind
User avatar

Joined: Thu Jul 29, 2004 8:58 pm
Posts: 1270
Location: Texas
Post 
Well, I can't get mkfifo to work. The GnuWin32 version tells me it can't create the file, even if I run it with Admin privilages, and the UnxUtils page says their version of mkfifo is a dummy. I'll have to post to the GnuWin32 mailing list or something

ZSNES, however, is now working nicely, and I can encode videos just fine with mencoder. There seems to be some issues with using fast-forward when dumping the video, but I'm not sure if that's on your list of things to work on or not.

_________________
#577451


Wed Apr 20, 2005 8:04 pm
Profile WWW
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Jul 27, 2004 10:54 pm
Posts: 3902
Location: Solar powered park bench
Post 
Noxious Ninja wrote:
There seems to be some issues with using fast-forward when dumping the video, but I'm not sure if that's on your list of things to work on or not.


As said in the readme, fast foward means frame skipping. If you want to skip frames while creating a movie, that's your problem.

_________________
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding


Wed Apr 20, 2005 8:47 pm
Profile WWW
Dark Wind
User avatar

Joined: Thu Jul 29, 2004 8:58 pm
Posts: 1270
Location: Texas
Post 
I know. I guess I should've clarified what I meant:

1) While fast-forward is enabled, and the frame coutner is enabled, the frame counter is shown in the recorded movie. It is not shown when fast-forward is disabled.

2) Some way to dump movie data to disk as fast as possible would be nice.

_________________
#577451


Wed Apr 20, 2005 10:10 pm
Profile WWW
Dark Wind
User avatar

Joined: Thu Jul 29, 2004 8:58 pm
Posts: 1270
Location: Texas
Post 
BTW, you can do better with the XviD encodes if you add :vhq=4:hq_ac to the -xvidencopts section. :gmc works well for games with scrolling backgrounds (i.e., most of them). There's also :qpel, which can sometimes give a sharper image, at the cost of a higher bitrate.

_________________
#577451


Thu Apr 21, 2005 4:04 am
Profile WWW
Rookie

Joined: Sun Feb 13, 2005 8:26 am
Posts: 15
Post 
Nach wrote:
Player1 wrote:
what requirements does this feature needs that is usable?


ZSNES, a game, a ZMV for that game, a raw video player or converter.

Does this work with the Windows version of ZSNES? The screenshot looks like the Linux version.


Fri Apr 22, 2005 8:21 am
Profile
16-bit Corpse | Nyoron~
User avatar

Joined: Sun Aug 01, 2004 7:14 pm
Posts: 3534
Location: Nokia Land
Post 
user222 wrote:
Nach wrote:
Player1 wrote:
what requirements does this feature needs that is usable?


ZSNES, a game, a ZMV for that game, a raw video player or converter.

Does this work with the Windows version of ZSNES? The screenshot looks like the Linux version.

Yes, it does work with the Windows version.

_________________
whicker: franpa is grammatically correct, and he still gets ripped on?
sweener2001: Grammatically correct this one time? sure. every other time? no. does that give him a right? not really.
Image


Fri Apr 22, 2005 10:04 am
Profile
New Member

Joined: Wed Apr 27, 2005 8:43 am
Posts: 4
Post 
Nach wrote:
The button is currently a dummy. If you want to dump a video right now, you'll have to tie the raw_video*() functions in zmovie.c into something.


Hi, i'm new here 8)

Well my problem is: I cannot find the "raw_video*()" functions in that file.

I have a zsnes wip 1.41 source code and my OS is win 2k3


Wed Apr 27, 2005 8:57 am
Profile
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 504 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 21  Next

Who is online

Users browsing this forum: Bing [Bot] and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software.