(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:

Post by Nach »

Welcome to page 4.

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.

________
I am pleased to announce that thanks to some help from Bisqwit and DeHackEd, I have added audio dumping to ZSNES!

Currently only works at Stereo 32KHz (if you want to make it work for other stuff, then please submit code).

The audio is also in a wav file as uncompressed PCM, so anything should be able to play it.

I also fixed up raw dumping in a couple of situations.
Last edited by Nach on Sat Mar 29, 2008 7:48 pm, edited 2 times in total.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Agozer
16-bit Corpse | Nyoron~
Posts: 3534
Joined: Sun Aug 01, 2004 7:14 pm
Location: Nokia Land

Post by Agozer »

Ooh, this is something. Excellent work you three.
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
snkcube
Hero of Time
Posts: 2646
Joined: Fri Jul 30, 2004 2:49 am
Location: In front of the monitor
Contact:

Post by snkcube »

Wow, truly amazing. A big congrats to you three.
Try out CCleaner and other free software at Piriform
Image
LDAWG
Lurker
Posts: 102
Joined: Sat Aug 07, 2004 12:07 am

Post by LDAWG »

OK, this rules!
I'm thinking custom ringtones for my Moto RAZR !!! :)
Aerdan
Winter Knight
Posts: 467
Joined: Mon Aug 16, 2004 10:16 pm
Contact:

Post by Aerdan »

Please to be shutting up with the suckup posts already.

They sicken me.

Go find something more constructive to do with your time, like playing games and/or actually using the features our local representative of God gave you.
Agozer
16-bit Corpse | Nyoron~
Posts: 3534
Joined: Sun Aug 01, 2004 7:14 pm
Location: Nokia Land

Post by Agozer »

Shut the hell up Aerdan. Since when was it wrong to congratulate someone for a work well done?
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
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

Yay! :P Great news.
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Behold:

Code: Select all

./zsnes -mc -md -zm 0 /mnt/E/new/Euro/SFA2.smc & mencoder -demuxer rawvideo -rawvideo format=0x42475220:w=256:h=223:size=228352:fps=50 -mc 0 -oac copy -ovc x264 -x264encopts qp_constant=35 -o temp.avi ~/.zsnes/rawvideo.bin && mencoder -mc 0 -oac mp3lame -lameopts cbr:br=48 -ovc copy -o sfa2e.avi -audiofile ~/.zsnes/pcmaudio.wav temp.avi
http://nsrt.edgeemu.com/sfa2evid.rar

Requires x264 video codec.
Windows users can get x264 codec here http://x264.nl/
Although I recommend mplayer: http://www2.mplayerhq.hu/MPlayer/releases/win32/ or ftp://ftp5.mplayerhq.hu/mplayer/release ... 050928.zip
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
pagefault
ZSNES Developer
ZSNES Developer
Posts: 812
Joined: Tue Aug 17, 2004 5:24 am
Location: In your garden

Post by pagefault »

Nice work guys. Now get working on my taxes.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Okay got an NTSC video together. 62.5 FPS... We'll see if we can bring that closer to 60.

http://nsrt.edgeemu.com/ssf2uvid.rar

Code: Select all

./zsnes -mc -md -zm 1 /mnt/D/roms/nintendo/snes/ssf2.fig & mencoder -demuxer rawvideo -rawvideo format=0x42475220:w=256:h=223:size=228352:fps=62.5 -mc 0 -oac copy -ovc x264 -x264encopts qp_constant=35 -o temp.avi ~/.zsnes/rawvideo.bin && mencoder -mc 0 -oac mp3lame -lameopts cbr:br=48 -ovc copy -o ssf2u.avi -audiofile ~/.zsnes/pcmaudio.wav temp.avi
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Aerdan
Winter Knight
Posts: 467
Joined: Mon Aug 16, 2004 10:16 pm
Contact:

Post by Aerdan »

Agozer wrote:Shut the hell up Aerdan. Since when was it wrong to congratulate someone for a work well done?
You missed the irony in the post, apparently.

Go reread the last line.
Agozer
16-bit Corpse | Nyoron~
Posts: 3534
Joined: Sun Aug 01, 2004 7:14 pm
Location: Nokia Land

Post by Agozer »

Aerdan wrote:
Agozer wrote:Shut the hell up Aerdan. Since when was it wrong to congratulate someone for a work well done?
You missed the irony in the post, apparently.

Go reread the last line.
Ah, right. :D I can see the irony now.
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
Shinrin
Rookie
Posts: 31
Joined: Wed Jan 19, 2005 7:13 pm
Location: 127.0.0.1

Post by Shinrin »

you can also view these videos with Video Lan Connect.

anyway nice video's guys keep up the good work. :D
[img]http://i533.photobucket.com/albums/ee335/mcsigshop/Shinrin.png[/img]
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Okay I redid the last video.

Code: Select all

./zsnes -mc -md -zm 1 /mnt/D/roms/nintendo/snes/ssf2.fig & mencoder -demuxer rawvideo -rawvideo format=0x42475220:w=256:h=223:size=228352:fps=59.925093633 -mc 0 -oac copy -ovc x264 -x264encopts qp_constant=25 -o temp.avi ~/.zsnes/rawvideo.bin && mencoder -mc 0 -oac mp3lame -lameopts cbr:br=48 -ovc copy -o ssf2u.avi -audiofile ~/.zsnes/pcmaudio.wav temp.avi
So 59.925093633 FPS recording. Anyone have an issue with this?

http://nsrt.edgeemu.com/ssf2vid2.rar

I also upped the quality on this vid so it looks quite good, what do you think?

Edit:
After reversing the exact ZSNES NTSC frame rate which is is 59.9487437186 and Bisqwit helping to create an algorithm to get sample generation perfect, we should have perfect NTSC videos now :)
I also upped the ratio to 256x224.

Here's what you need to encode now:

Code: Select all

./zsnes -mc -md -zm 1 /mnt/D/roms/nintendo/snes/ssf2.fig & mencoder -aspect 4/3 -demuxer rawvideo -rawvideo format=0x42475220:w=256:h=224:size=229376:fps=59.9487437186 -mc 0 -oac copy -ovc x264 -x264encopts qp_constant=25 -o temp.avi ~/.zsnes/rawvideo.bin && mencoder -mc 0 -oac mp3lame -lameopts cbr:preset=48 -ovc copy -o ssf2.avi -audiofile ~/.zsnes/pcmaudio.wav temp.avi 
Maybe one of these days I'll figure out how to generate an AVI header so you don't need to specify the exact details yourself.

http://nsrt.edgeemu.com/ssf2good.rar
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
snkcube
Hero of Time
Posts: 2646
Joined: Fri Jul 30, 2004 2:49 am
Location: In front of the monitor
Contact:

Post by snkcube »

The video in the second link seems fine. No problems so far.
Try out CCleaner and other free software at Piriform
Image
SquareHead
Veteran
Posts: 970
Joined: Fri Jan 21, 2005 11:15 am
Location: Montana, United States

Post by SquareHead »

Nach wrote: Here's what you need to encode now:

Code: Select all

./zsnes -mc -md -zm 1 /mnt/D/roms/nintendo/snes/ssf2.fig & mencoder -aspect 4/3 -demuxer rawvideo -rawvideo format=0x42475220:w=256:h=224:size=229376:fps=59.9487437186 -mc 0 -oac copy -ovc x264 -x264encopts qp_constant=25 -o temp.avi ~/.zsnes/rawvideo.bin && mencoder -mc 0 -oac mp3lame -lameopts cbr:preset=48 -ovc copy -o ssf2.avi -audiofile ~/.zsnes/pcmaudio.wav temp.avi 
Maybe one of these days I'll figure out how to generate an AVI header so you don't need to specify the exact details yourself.

http://nsrt.edgeemu.com/ssf2good.rar
Damn you and your mencoder skillz.

I have yet to really figure the damned thing out, and here in 1 line, you are capturing the output from zsnes, compressing the video, and audio streams, and then muxing them together in a final 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 »

And now ZSNES can use mencoder internally to make life easier! :)
Make sure mencoder is in your path before using the new uncompressed AVI, ffv1, or x264.

Image

Windows WIP:
http://nsrt.edgeemu.com/zsnesw-mov.zip

Get precompiled mencoder binaries for Windows here:
http://oss.netfarm.it/mplayer-win32.php

Place mencoder in your path when using.

The more adventurous can edit zmovie.cfg.

If you have trouble playing outputted movies, get codecs here:
http://www.free-codecs.com/download/K_L ... c_Pack.htm


Please let me know how it goes.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Agozer
16-bit Corpse | Nyoron~
Posts: 3534
Joined: Sun Aug 01, 2004 7:14 pm
Location: Nokia Land

Post by Agozer »

Oooh, X264 Lossless option. Thanks a bunch Nach.
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
franpa
Gecko snack
Posts: 2374
Joined: Sun Aug 21, 2005 11:06 am
Location: Australia, QLD
Contact:

Post by franpa »

does it matter wich version of mencoder is used?
Core i7 920 @ 2.66GHZ | ASUS P6T Motherboard | 8GB DDR3 1600 RAM | Gigabyte Geforce 760 4GB | Windows 10 Pro x64
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

Ideally, you probably want to use the latest version.
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 »

franpa_9 wrote:does it matter wich version of mencoder is used?
Use one from the site I gave you. Download the one for your CPU.


Anyone test this out yet?
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
franpa
Gecko snack
Posts: 2374
Joined: Sun Aug 21, 2005 11:06 am
Location: Australia, QLD
Contact:

Post by franpa »

http://web.aanet.com.au/Student_WebZone ... /video.avi

i tried x264 and uncompressed avi and uncompressed avi recorded better but i needed a codec to play the file.

the link is to a movie of mario bros 1 level 1 in the x264 format avi. (it works but has a slow frame rate)

is it possible to make it so mencoder doesnt steal focus away from zsnes while recording?
Core i7 920 @ 2.66GHZ | ASUS P6T Motherboard | 8GB DDR3 1600 RAM | Gigabyte Geforce 760 4GB | Windows 10 Pro x64
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Too many dropped frames. Set max frame skip to 0 before recording.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
franpa
Gecko snack
Posts: 2374
Joined: Sun Aug 21, 2005 11:06 am
Location: Australia, QLD
Contact:

Post by franpa »

http://web.aanet.com.au/Student_WebZone ... /video.avi

fixed the video... it now works properly and is 2.5mb approx. (thanks nach) now if only we could have sound at the same time. (without mergeing a sperate sound file into the movie manually)
Core i7 920 @ 2.66GHZ | ASUS P6T Motherboard | 8GB DDR3 1600 RAM | Gigabyte Geforce 760 4GB | Windows 10 Pro x64
Starman Ghost
Trooper
Posts: 535
Joined: Wed Jul 28, 2004 3:26 am

Post by Starman Ghost »

This is driving me nuts. How can I get the stupid h264 whatever codec to work with wmp?
Locked