View unanswered posts | View active topics It is currently Tue Nov 12, 2019 12:43 am



Reply to topic  [ 40 posts ]  Go to page 1, 2  Next
ZMV to AVI conversion r1.1 
Author Message
ZSNES Shake Shake Prinny
User avatar

Joined: Wed Jul 28, 2004 4:15 pm
Posts: 5615
Location: PAL50, dood !
Reply with quote
Post ZMV to AVI conversion r1.1
Welcome to page 1.

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.

________
Note, the top of every page in this thread has this same message, it's what's needed to convert a ZMV to an AVI. We do not plan on changing these basic rules for ZMV to AVI conversion.
The old (locked) thread describes the evolution of the feature. This method wasn't developed till page 5 or so, so posts prior to that deal with the old method, which still works if you set it up properly.

If you have a question, please post about it in this thread, and in the end. But please make sure you've read this message, and skimmed pages 4 to 7 of the old thread a bit to get an idea how it works.

_________________
皆黙って俺について来い!!
Code:
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)

Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54


Mon Sep 08, 2008 8:22 pm
Profile
New Member

Joined: Tue Nov 18, 2008 2:28 am
Posts: 3
Reply with quote
Post 
Hello, I have a couple of questions regarding the record feature. First off, I would like to say that it is an awesome feature that will save me a lot of hassle. It worked perfectly. However, I want to do more than just record videos in 256:224 resolution.

I would like to know what edits I should make to the zvideo.cfg file if I were to say...desire a 596:448 video output letterboxed in a 640:480 area. This is my current zvideo.cfg file.

Code:
md_raw_file="rawvideo.bin" ; Only for Raw Videos
md_pcm_audio="audio.wav" ; AVI dumping always dumps audio seperatly
md_compressed_audio="audio.mp3" ; For when selecting compressed
md_logo="" ;If you want a logo, specify a logo file. It should be a series of frames 256x224x24.

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:fps=$md_video_rate"
md_other="-aspect 4:3 -mc 0 -vf scale=640:480"
md_no_sound="-nosound"
md_sound="-oac mp3lame -lameopts aq=0:preset=64:mode=1 -audiofile $md_pcm_audio"
md_compressed_sound="-oac copy -audiofile $md_compressed_audio"
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=6"

;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, $md_smode
;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_smode is $md_no_sound, $md_sound, or $md_compressed_sound depending on the audio options selected

md_command="$md_prog $md_other $md_no_sound $md_raw -ofps 30 $md_vcodec -o $md_file -"
md_audio_compress="lame -m j --preset 64 -q 0 - $md_compressed_audio"
md_merge="$md_prog $md_other $md_smode -ovc copy -o merged.avi $md_file"


This creates a plain 640:480 video at 30 fps on Xvid at around 10 MB/minute when dumping a Seiken Densetsu 3 ZMV file. Is there a way to tweak this config file so that the file size is reduced further still while still maintaining most of the quality?


Tue Nov 18, 2008 2:36 am
Profile
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Jul 27, 2004 10:54 pm
Posts: 3902
Location: Solar powered park bench
Reply with quote
Post 
To get smaller file sizes, use x264, also try multipass encoding, and play around with the bitrate to get a good size/quality trade off.

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


Tue Nov 18, 2008 9:16 am
Profile WWW
New Member

Joined: Tue Nov 18, 2008 2:28 am
Posts: 3
Reply with quote
Post 
I tried using x264, but the video ended up being garbled in a mess of colours and the file size is 40MB/minute. So I must be doing something wrong with that.

What do I need to edit in the CFG file in order to get multipass and custom bit rates working?


Tue Nov 18, 2008 9:39 am
Profile
Seen it all
User avatar

Joined: Mon Jan 03, 2005 5:04 pm
Posts: 2302
Location: Germany
Reply with quote
Post 
Valerie Valens wrote:
I want to do more than just record videos in 256:224 resolution.

I would like to know what edits I should make to the zvideo.cfg file if I were to say...desire a 596:448 video output letterboxed in a 640:480 area.

I recommend VirtualDubMod, optionally with AviSynth and a good codec pack (e.g. k-Lite).

_________________
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list


Tue Nov 18, 2008 1:04 pm
Profile WWW
New Member

Joined: Tue Nov 18, 2008 2:28 am
Posts: 3
Reply with quote
Post 
That would be nice, but that would simply change the question of how to go about editing zmovie.cfg to how to use the aforementioned programs in this context. :lol:


Tue Nov 18, 2008 2:03 pm
Profile
New Member

Joined: Thu Nov 27, 2008 10:13 pm
Posts: 4
Reply with quote
Post 
I am having problems with this feature.

When I try to dump the movie, it encodes the video just fine, but there is no audio. I tried dumping the audio separately, tried dumping uncompressed audio, but nothing worked.

I have the fixed version of LAME, MEncoder, and I am using ZSNES version 1.51.

Does anyone know what the problem is?


Thu Nov 27, 2008 10:35 pm
Profile
ZSNES Developer
ZSNES Developer

Joined: Tue Dec 28, 2004 6:47 am
Posts: 6747
Reply with quote
Post 
I'm not sure what to tell you, but you should make sure that sound is enabled (and playing back normally in ZSNES), and make sure all sound apps (such as Winamp) are closed so it doesn't interfere in the sound dumping.

_________________
Continuing FF4 Research...


Thu Nov 27, 2008 10:38 pm
Profile
New Member

Joined: Thu Nov 27, 2008 10:13 pm
Posts: 4
Reply with quote
Post 
If I go back to ZSNES while it is encoding, there is no sound, even though it is enabled in the options. If I stop dumping the movie, the audio is restored.

I only have Winamp Agent running in the background right now. I will try closing it, then dumping the movie.

Edit:

Closing Winamp Agent had no effect at all.

I would also like to add that I have no problems playing back the ZMV movie itself.

Should I use a different encoder?


Thu Nov 27, 2008 10:43 pm
Profile
ZSNES Developer
ZSNES Developer

Joined: Tue Dec 28, 2004 6:47 am
Posts: 6747
Reply with quote
Post 
There's supposed to be no audio playing back in the audio dumping process. It is being redirected to LAME.

You most likely need to restarting ZSNES after closing Winamp.

_________________
Continuing FF4 Research...


Thu Nov 27, 2008 10:52 pm
Profile
New Member

Joined: Thu Nov 27, 2008 10:13 pm
Posts: 4
Reply with quote
Post 
The video file still has no sound.

I dumped the first 50 seconds of the movie, then went back into ZSNES, and dumped 10 more seconds.

The merged AVI file I got had no sound for those 50 seconds, and the last 10 seconds had sound.

I tried going back into ZSNES as soon as I started dumping, but that gave me another soundless video file.

I wonder what is going on...


Thu Nov 27, 2008 10:59 pm
Profile
New Member

Joined: Sun Dec 07, 2008 2:29 am
Posts: 6
Location: Columbia, S.C.
Reply with quote
Post 
Beibin wrote:
The video file still has no sound.

I dumped the first 50 seconds of the movie, then went back into ZSNES, and dumped 10 more seconds.

The merged AVI file I got had no sound for those 50 seconds, and the last 10 seconds had sound.

I tried going back into ZSNES as soon as I started dumping, but that gave me another soundless video file.

I wonder what is going on...


Have you tried turning off the "Pause when emulation in background"? I had the same problem you're having until I went back a few pages in the old thread and read that. Once I turned it off and dumped it again, I had sound in the finished product.

The developers: Great feature. It took a little bit to find some clear cut directions on what I needed to do exactly, but it was nothing a little reading didn't solve.

What I've noticed: When I encoded my first video in x264, it came out extremely bad and no sound. The graphics were unreadable and it looked like there was too high a contrast in it. I then got the proper codecs for Xvid and the movie turned out gorgeous. Then I had the above problem with no sound. That's fixed now.

The last problem that I had, I've found a workaround. I am using Sony Vegas Movie Studio to fix up my movies once I'm done. You know, like putting in a title card, trimming, etc. With the original video that was encoded with Xvid, I cannot bring it into Vegas. At. All. I solved this problem by going to Media Convert and using no video preset with convert to .avi (again). I now can bring it in and fix it up.

Just a tip: Sony products do not officially support the DivX or Xvid codecs. Just something I found out in my research. Other than that, the videos are gorgeous and synched up with no problems. I now can make quality vids for my site very easily.

Dark Rubes

_________________
Visit Gaming Insurrection for retro musings!
www.gaminginsurrection.com


Sun Dec 07, 2008 3:31 am
Profile WWW
New Member

Joined: Thu Nov 27, 2008 10:13 pm
Posts: 4
Reply with quote
Post 
Dark Rubes wrote:
Have you tried turning off the "Pause when emulation in background"? I had the same problem you're having until I went back a few pages in the old thread and read that. Once I turned it off and dumped it again, I had sound in the finished product.


I just tried that, and it works flawlessly now!

Thank you very much!


Mon Dec 15, 2008 11:45 pm
Profile
New Member

Joined: Sun Dec 07, 2008 2:29 am
Posts: 6
Location: Columbia, S.C.
Reply with quote
Post 
Quote:
I just tried that, and it works flawlessly now!

Thank you very much!


You are quite welcome. :)

My video is up on YouTube now, if anyone cares.

http://www.youtube.com/watch?v=QHJwq3qQdOE

It's the first battle with Smithy in "Super Mario RPG."

_________________
Visit Gaming Insurrection for retro musings!
www.gaminginsurrection.com


Tue Dec 16, 2008 1:41 am
Profile WWW
New Member

Joined: Wed Feb 04, 2009 7:41 pm
Posts: 4
Reply with quote
Post 
Thank you for this post! I've been wondering for a while if I could do this.

_________________
Production Assistant Jobs | "Video Games are bad for you? That's what they said about Rock 'N' Roll." Shigeru Miyamoto, Mario creator


Wed Feb 04, 2009 8:06 pm
Profile WWW
Reply with quote
Post Re: ZMV to AVI conversion r1.1
grinvader wrote:
Welcome to page 1.

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.

________
Note, the top of every page in this thread has this same message, it's what's needed to convert a ZMV to an AVI. We do not plan on changing these basic rules for ZMV to AVI conversion.
The old (locked) thread describes the evolution of the feature. This method wasn't developed till page 5 or so, so posts prior to that deal with the old method, which still works if you set it up properly.

If you have a question, please post about it in this thread, and in the end. But please make sure you've read this message, and skimmed pages 4 to 7 of the old thread a bit to get an idea how it works.



I am really having a hard time figuring ZMV files out and being able to record using mplayer for an AVI file conversion I have the ZSNESw but I don't know which way to start a ZMV file to make a small video


Wed Feb 18, 2009 10:56 pm
ZSNES Developer
ZSNES Developer

Joined: Tue Dec 28, 2004 6:47 am
Posts: 6747
Reply with quote
Post Re: ZMV to AVI conversion r1.1
g7therobot wrote:
I am really having a hard time figuring ZMV files out and being able to record using mplayer for an AVI file conversion I have the ZSNESw but I don't know which way to start a ZMV file to make a small video


First, record a ZMV (you need to load a game first to record of course). It doesn't have to be anything special initially. Then, make sure mencoder.exe and lame.exe (from the provided links) are in the same folder ZSNES is in. You should be able to dump the video via the dump tab in the movie tabs by hitting on the "Start" button (this also assumes you have the game loaded). These steps are simplified, but that's the jist of the whole thing.

BTW, please shrink your avatar a little bit.

_________________
Continuing FF4 Research...


Thu Feb 19, 2009 1:22 am
Profile
ZSNES Shake Shake Prinny
User avatar

Joined: Wed Jul 28, 2004 4:15 pm
Posts: 5615
Location: PAL50, dood !
Reply with quote
Post Re: ZMV to AVI conversion r1.1
Additional info...

Deathlike2 wrote:
First, record a ZMV (you need to load a game first to record of course). It doesn't have to be anything special initially.

Make the ZMV of exactly what you want to have as a movie, obviously.

Quote:
Then, make sure mencoder.exe and lame.exe (from the provided links) are in the same folder ZSNES is in.

Or in your PATH...

Quote:
BTW, please shrink your avatar a little bit.

Width-wise, at least.

_________________
皆黙って俺について来い!!
Code:
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)

Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54


Thu Feb 19, 2009 8:33 pm
Profile
Rookie

Joined: Sun May 03, 2009 7:27 pm
Posts: 11
Reply with quote
Post Movie Dump Butterfly Effect
Hey guys,

I'm fairly new to this process, but I am starting to get the hang of it. I am getting great audio and video quality with the xvid lossless and the settings I have. I'm pumping out a solid presentation resolution of 1280x800 which is perfect for a widescreen HD display.

Here is my very serious drawback:

I am trying to dump a very LONG video. It's a 1 hour and 48 minute 100% Speed Run of Super Metroid. The video, in total length, actually ends up being a little longer than that I believe, but within about 20 minutes I run into a probability-based issue. Occasionally, the emulator incorrectly moves the character and sets off a chain of events that has me either die or jump around aimlessly in the same area for over an hour (after having left the computer during its decoding process). I have tried to dump the long video three times, each time failing at a different spot. This is how I know it is an error in the instructions given by the emulator during the dumping process.

I know that, in hindsight, I probably should have just taken several segments of the video (such as twenty minutes each) and dumped each one, but unfortunately I can't go back now. The video is already recorded.

Is there a setting or string I can include in zmovie.cfg that will either increase the accuracy of the instructions given during the dumping (such as activating an aggressive mode, which I understand is bound to slow the process down) OR fix this problem altogether? Is it a known bug?

I understand that this and only other scenarios of videos involving entire games from start to finish TRULY apply to error, as the chance for an error during dumping that causes such a butterfly effect are small when considering a short 10 minute video, but it is a nuisance nonetheless. Does anyone have an answer to this?

Thank you for reading.

I'm using menc latest version, lame fix, and zsnes 1.51 on Vista SP1 with a Core 2 Duo.


-Berret


Sun May 03, 2009 7:40 pm
Profile
Rookie

Joined: Sun May 03, 2009 7:27 pm
Posts: 11
Reply with quote
Post 
Sorry for the double post.

After further review of more bug reports on the forums, I've seen that it is a known bug here: http://board.zsnes.com/phpBB2/viewtopic.php?t=12205

Is this still the case or is there a present workaround? It is nearing half a year since the thread began...

Edit: I should have just edited my first post.... -.- It's been years since my forum days, I feel like such a noob. -.-


Sun May 03, 2009 10:15 pm
Profile
ZSNES Shake Shake Prinny
User avatar

Joined: Wed Jul 28, 2004 4:15 pm
Posts: 5615
Location: PAL50, dood !
Reply with quote
Post 
There is no perfect solution with current releases. A few guidelines can help somewhat, but the root cause still remains and only luck can make a long run not desync:
Don't skip any frames. Don't allow any frameskip, basically. Autoframeskip + max frameskip 0 (or manual frameskip 0) + use neither fast forward nor turbo.
Don't use rewind states. Kinda counterproductive, but I spotted a small decrease in desync frequency without them. "Don't use" as in, don't even make them. Set number to 0.
Don't use frame advance. Complete counterproductivity. Sorry. Currently the way it is handled keeps a fraction of the core running, which may affects random stuff from a couple seconds to minutes later.

I have made several 20-minute long stable movies without these, but some desyncs happen for 'desync-prone games'.

This is a major point on the list. We'll fix it eventually.

_________________
皆黙って俺について来い!!
Code:
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)

Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54


Tue May 05, 2009 9:10 pm
Profile
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Jul 27, 2004 10:54 pm
Posts: 3902
Location: Solar powered park bench
Reply with quote
Post 
Some games are much less prone to desync as well.

I can't recall the last time I had a desync in Super Mario All Stars for example. But for other games, I find it frequent.

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


Tue May 05, 2009 10:37 pm
Profile WWW
Rookie

Joined: Sun May 03, 2009 7:27 pm
Posts: 11
Reply with quote
Post 
Thanks very much for the information, grinvader. (and Nach)

Is there some way to make the video in segments? Starting from one state or frame number to another, to avoid the errors in instruction?

I see the dumping options includes number of frames - is this a ranged value or just a 0 to x value? If it's ranged I could just do 0-2500; 2501-5000, etc, and patch it together in premier or something.


Tue May 05, 2009 10:40 pm
Profile
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Jul 27, 2004 10:54 pm
Posts: 3902
Location: Solar powered park bench
Reply with quote
Post 
Making a video in segments means the input recording, not the conversion to AVI.

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


Wed May 06, 2009 6:48 pm
Profile WWW
Seen it all
User avatar

Joined: Mon Jan 03, 2005 5:04 pm
Posts: 2302
Location: Germany
Reply with quote
Post 
There's also SNES9x.

_________________
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list


Wed May 06, 2009 7:04 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 40 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 3 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software.