(old) ZMV to AVI video conversion [[archive me]]

General area for talk about ZSNES. The best place to ask for related questions as well as troubleshooting.

Moderator: ZSNES Mods

Locked
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Re: help with capturing frames for use in GIFs

Post by Nach »

Welcome to page 14.

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.

________
coruscadragon wrote: so i recently downloaded zsnes1.42, and the feature appears to be gone... (removing features? what's up with that??)
Why do you make such absurd assumptions? If you forgot how to do something, check the manual. But what you're looking for is to press F1 while in game.
coruscadragon wrote: Only problem is, i have no idea how this is supposed to work...
the instructions aren't very clear, at least to me... i've downloaded the mencoder and put it in the same folder, i've made a znv video... now what?
Make sure you're using a ZSNES which supports this feature (which as this thread says isn't in v1.42), loading the game, opening the movie menu, selecting the appropriate slot, the appropriate encode options, hitting dump movie.
Last edited by Nach on Sat Mar 29, 2008 7:43 pm, edited 1 time in total.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Another video.

First 3 fights in SD Ultra Battle - Ultraman Densetsu + SD Ultra Battle - Seven Densetsu.

http://nsrt.edgeemu.com/u+s.avi
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Guest

Post by Guest »

I dont get it.

I downloaded mencoder and placed in same map, but it still doesnt work... sometimes it says it cant find mencoder and sometimes it gives me a video file of 4.01 kb.....

i dont get it, i red this topic and searched on googel but cant find whats wrong.

can someone plz tell me?

Image

i placed mencoder in same folder and still getting this weird error... i have latest release
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

Problem 1: You are supposed to stop recording (hit the stop button when done), before you click on "Dump Movie"

Problem 2: Have you tried actually getting the latest WIP @ http://zsnes.ipherswipsite.com ?

Note: While trying to use the movie dumping feature, you need to have created a movie in THAT version in order for it to work. The movie feature will probably not work on ZMVs created in older versions of ZSNES.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
Guest

Post by Guest »

Id did click on stop and using the latest ZSNES (what is WIP????).

But i redownloaded it and now its working.

can something be done to the resolution? imo the resolution is way to loww :oops:
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

Guest wrote:Id did click on stop and using the latest ZSNES (what is WIP????).

But i redownloaded it and now its working.

can something be done to the resolution? imo the resolution is way to loww :oops:
? Are we talking about ZSNES's resolution or the movie resolution? The size is very much intentional to keep the movie small (especially for speed runs). If you can figure out the params in mencoder, you can tweak zmovie.cfg to produce bigger movies.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Guest wrote: can something be done to the resolution? imo the resolution is way to loww :oops:
That was mentioned two pages ago: http://board.zsnes.com/phpBB2/viewtopic ... 742#116742

You can edit zmovie.cfg, and to the end of md_other, append

Code: Select all

 -vf scale=512:448
Last edited by Nach on Thu Nov 02, 2006 1:19 pm, edited 1 time in total.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Guest

Post by Guest »

I already tried that, it didnt work :?

Code: Select all

md_raw_file="rawvideo.bin" ; Only for Raw Video
md_pcm_audio="audio.wav" ; AVI dumping always dumps audio seperatly
md_compressed_audio="audio.mp3" ; For when selecting compressed

md_ntsc="59649/995"
md_pal="50/1"

md_file="video2.avi"
md_prog="mencoder"
md_raw="-demuxer rawvideo -rawvideo format=0x42475218:w=248:h=224:size=172032"
md_other="-aspect 4:3 -mc 0 -vf scale=512:448"
md_no_sound="-nosound"
md_sound="-oac mp3lame -lameopts aq=0:preset=64:mode=1"
md_x264="-ovc x264 -x264encopts qp_constant=0:frameref=15"
md_ffv1="-ovc lavc -lavcopts vcodec=ffv1:vstrict=-2:aspect=4/3"
md_xvid="-ovc xvid -xvidencopts fixed_quant=2"

;Valid variables to use in the next four lines are:
;$md_file, $md_prog, $md_raw, $md_other, $md_no_sound, $md_sound, $md_pcm_audio, $md_compressed_audio
;and $md_video_rate, $md_vcodec
;These variables are defined above.
;$md_video_rate is $md_ntsc or $md_pal depending on the game as needed
;$md_vcodec is $md_x264, $md_ffv1, or $md_xvid depending on the codec selected

md_command="$md_prog $md_other $md_no_sound $md_raw:fps=$md_video_rate $md_vcodec -o $md_file -"
md_merge="$md_prog $md_other $md_sound -audiofile $md_pcm_audio -force-avi-aspect 4:3 -ovc copy -o merged.avi $md_file"
md_audio_compress="lame -m j --preset 64 -q 0 - $md_compressed_audio"
md_merge_compressed="$md_prog $md_other -oac copy -audiofile $md_compressed_audio -force-avi-aspect 4:3 -ovc copy -o merged.avi $md_file"
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Why did you change your md_raw like that? It's supposed to be:

Code: Select all

md_raw="-demuxer rawvideo -rawvideo format=0x42475218:w=256:h=224:size=172032"
Here's my zmovie.cfg:

Code: Select all

md_raw_file="rawvideo.bin" ; Only for Raw Video
md_pcm_audio="audio.wav" ; AVI dumping always dumps audio seperatly
md_compressed_audio="audio.mp3" ; For when selecting compressed

md_ntsc="59649/995"
md_pal="50/1"

md_file="video.avi"
md_prog="mencoder"
md_raw="-demuxer rawvideo -rawvideo format=0x42475218:w=256:h=224:size=172032"
md_other="-aspect 4:3 -mc 0  -vf scale=512:448"
md_no_sound="-nosound"
md_sound="-oac mp3lame -lameopts aq=0:preset=64:mode=1"
md_x264="-ovc x264 -x264encopts qp=0:frameref=15"
md_ffv1="-ovc lavc -lavcopts vcodec=ffv1:vstrict=-2:aspect=4/3"
md_xvid="-ovc xvid -xvidencopts fixed_quant=2"

;Valid variables to use in the next four lines are:
;$md_file, $md_prog, $md_raw, $md_other, $md_no_sound, $md_sound, $md_pcm_audio, $md_compressed_audio
;and $md_video_rate, $md_vcodec
;These variables are defined above.
;$md_video_rate is $md_ntsc or $md_pal depending on the game as needed
;$md_vcodec is $md_x264, $md_ffv1, or $md_xvid depending on the codec selected

md_command="$md_prog $md_other $md_no_sound $md_raw:fps=$md_video_rate $md_vcodec -o $md_file -"
md_merge="$md_prog $md_other $md_sound -audiofile $md_pcm_audio -force-avi-aspect 4:3 -ovc copy -o merged.avi $md_file"
md_audio_compress="lame -m j --preset 64 -q 0 - $md_compressed_audio"
md_merge_compressed="$md_prog $md_other -oac copy -audiofile $md_compressed_audio -force-avi-aspect 4:3 -ovc copy -o merged.avi $md_file"
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Guest

Post by Guest »

thnx man, now its working.

But sometimes it still says that mencoder is missing. Just restarting is enough..
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Guest wrote: But sometimes it still says that mencoder is missing. Just restarting is enough..
Is this if you press dump while a movie is playing or being recorded?

Also you get that message if you check the compress option and don't have LAME.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Naelphin
Rookie
Posts: 14
Joined: Sat Aug 07, 2004 1:09 pm

Post by Naelphin »

Any archive sites that I can download movies from? ZSNES ones obviously.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
CrazyTeddyX
New Member
Posts: 3
Joined: Tue Nov 14, 2006 4:31 am

ZMV to AVI video conversion!!!

Post by CrazyTeddyX »

How do you import it to Windows Movie maker? I downloaded the Xvid mencoder and merged the ZMV, but it could not import into collections on Windows Movie Maker. :?
Last edited by CrazyTeddyX on Wed Nov 15, 2006 12:28 am, edited 1 time in total.
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Re: ZMV to AVI video conversion!!!

Post by Deathlike2 »

CrazyTeddyX wrote:How do you import it to Windows Movie maker? I downloaded the Xvid mencoder and merged the ZMV, but it could not import into collections on Windows Maker. :?
Merged the ZMV? I'm not sure what you are doing... but you're supposed to create the ZMV first (in other words, do a quick test recording, and click the "stop" button when you're done).. then use the "Dump Movie" button (with the appropriate selections checked).
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
CrazyTeddyX
New Member
Posts: 3
Joined: Tue Nov 14, 2006 4:31 am

ZMV to AVI video conversion!!!

Post by CrazyTeddyX »

I finally got it! I got the latest version of Xvid at http://www.koepi.org/xvid.shtml I can now convert the ZMV file to AVI for the latest version of ZSNES, with the help of the Mencoder, Lame, and the latest version of Xvid. It took me weeks to find it, and get it to play on Windows Media Player! :D
shakazuzu

Post by shakazuzu »

hi. when trying to play a zmv file in the new wip, i get the error msg "Must play with sound off" and it refuses to load. when i disable sound it tells me "Must play with sound on" and again refuses to load. the zmv files were recorded in the stable 1.42 version, is that why? anyone have any ideas?
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Can you send me this ZMV?
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

I made a run through the entire F-Zero Grand Prix 2, although the AVI with any decent quality seems to come out at >50MB (guess encoding Mode 7 isn't easy).

Here's the ZMV though: http://nsrt.edgeemu.com/fzero2.zip

Code: Select all

---------------------Internal ROM Info----------------------
       File: BS F-Zero 2 (J)
       Name: BSF-ZERO2プラクティス_____  Company: Nintendo
     Header: None                      Bank: LoROM
Interleaved: No                        SRAM: 0 Kb
       Type: BS                         ROM: 8 Mb
    Country: Japan                    Video: NTSC
  ROM Speed: 200ns (SlowROM)       Revision: 1.2
   Checksum: Good 0xDE7D              CRC32: 7F93E4ED
--------------------------Database--------------------------
   Name: BS F-Zero 2
Country: Japan                  Revision: 1.0
 Port 1: Gamepad                  Port 2: Gamepad
Genre 1: Racing                  Genre 2: Futuristic
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

shakazuzu wrote:hi. when trying to play a zmv file in the new wip, i get the error msg "Must play with sound off" and it refuses to load. when i disable sound it tells me "Must play with sound on" and again refuses to load. the zmv files were recorded in the stable 1.42 version, is that why? anyone have any ideas?
Fixed this, thanks for the report.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Logo support added, here's an example:
http://nsrt.edgeemu.com/smw_bg1_off.avi

To use specify a logo file in zmovie.cfg, it must be raw frames and optionally may be gzipped.
Each frame should be 256x244@24 bit. You have no limit to the amount of frames it must be.

One can try to convert an AVI to a logo file doing something like:

Code: Select all

mencoder in.avi -of rawvideo -ovc raw -vf format=0x42475218 -o out.logo -fps 59649/995
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Well good news, the biggest improvement to the movie dumping in a while has been added - the new custom option!

Now you can easily get good quality at very low bit rates with multiple passes.
Just fire it up and try custom (default is 4 passes at 300 bit rate).

You can toy with any particular settings you want in zmovie.cfg

It's currently buggy with some other new features being finished, but if you test it without playing with force movie length or stop dump in the middle, it should work very nice.

I'm not even going to bother posting a vid, go see for yourself, and report back how it is.

One stat:
One minute video at MMX dumped at x264 on merged and custom defaults on custom.

2838672 /home/nach/.zsnes/custom.avi
9093506 /home/nach/.zsnes/merged.avi
And there's virtually no difference in quality.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

Ok, it seems fine for me. Using the current default settings from SVN (r4332).

A brief record of Aladdin (1:18 of the first level) created a 10,180kb file w/o multipass and a 3,644kb one w/multipass. IQ is a bit lower than xvid or x264.

A brief record of Total Carnage (1:24 of the first level) created a 8,710kb file w/o multipass and a 3,931 one w/multipass. IQ is a bit negligibly lower.

So, assuming that we continue to pass movie dumping 4 times (maybe it should be 3 for sanity's sake), we should expect at least a 50% drop in size with different IQ differences depending on game (it could be as good as xvid, or a semi-distracting nuisance if you pay attention to details).
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Sounds good. And people are welcome to tweak the amount of passes or raise or lower the bit rates (or change any other options they like) for various games they dump in zmovie.cfg to their heart's content.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Locked