(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
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

Welcome to page 15.

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.

________

Further testing shows that more than 2 passes gives negligible size reduction. Then again, I've tested two games. I'm making a fair assumption that more than 2 passes is not too useful here.
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 »

I've noticed for more complex stuff the extra passes help. Try a game with more mode 7. Perhaps F-Zero, parts of Super Metroid, etc...
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, I've dumped a ZMV of DKC1, first level. The movie is 1:52 mins long. DKC could arguably be the most vibrant of all games (in terms of color usage). This makes for a great test of the multi-pass system.

45,559kb with x264. This is awfully too big. The IQ is fine though.
29,412kb with xvid. This seems more appropriate. The IQ difference is negligible.
5,119kb with x264 w/2passes. This is awesomely sized, but the IQ does change a bit. The most IQ difference you will notice is the blurry ground. If you can live with that, this is pretty damn good, otherwise, you will be sorely disappointed then.

I will post the size and my IQ analysis regarding the movie dump w/3passes in a moment.

I will try an F-Zero 2 run as soon as I'm done.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
Que
saskatchewanite
Posts: 195
Joined: Wed Apr 26, 2006 8:22 pm

Post by Que »

what about xvid with 2 passes? Probably your best bet if you fiddle with the bandwidth of the file a bit, you could probably get it down to about 20mb/minute, without too much quality loss; which would be deadly.
everything i say is a lie
the above line is true
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Que wrote:what about xvid with 2 passes? Probably your best bet if you fiddle with the bandwidth of the file a bit, you could probably get it down to about 20mb/minute, without too much quality loss; which would be deadly.
Are you insane?
I could get 99% of the SNES games down to 4MB/minute or less with perfect quality.

20MB/m? What kind of propaganda are you being fed?
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 »

The 3-pass movie of DKC3 looks slightly better (though, it could be my eyes tricking me), but not much difference in size than the 2-

Ok, probably my last movie for looking over. This is a 2:17 movie of FZero 2's first level.

x264 - 92,054kb - Too huge, for too little IMO. IQ is fine.
xvid - 100,158kb - Even more huge, for too little. IQ is on par with x264.
3pass - 6,362kb - Huge reduction, but the IQ was far from good. The tracks looked very much like a huge blur, possibly I need to use a greater bitrate (used the 300kps default).

I will have a 2 pass version built very soon and its analysis.

The 2 pass version is approximately the same size as 3 pass, and perhaps a little more blurry.

In some, multipass > 2 is next to useless, and multipass works better visually if the screen doesn't update as frequently as F-Zero 2 does. Multipass becomes very significant for size.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
AbsolutelyGenius
New Member
Posts: 4
Joined: Tue Jan 23, 2007 4:29 am

Post by AbsolutelyGenius »

This thread was very helpful.

I had no idea how to record on the emulator and thankfully I found the steps here.

But I still have a question.

I'm recording gameplay for DKC2 and uploading it on YouTube (so I need 100 MB or less). After dumping using xvid option, my file is too big. I read that it can be compressed after accessing zmovie.cfg. How do I access it and if I need a separate program to alter the size, which one do I need?
Above here, I read about doing multiple passes to lower size. How do you do that?

Thanks.
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

I don't recall a "compressed" option (compressed audio doesn't count, and the worst part is that using an MP3 to insert into the movie is worse than the default WAV file that is generated).

You are thinking something along the lines of a multi-pass option, which is available in SVN. That drastically reduces the size of the movie.
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 »

Or wait for v1.51 which short be released in the near future which will include the new custom option for smaller sizes.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
AbsolutelyGenius
New Member
Posts: 4
Joined: Tue Jan 23, 2007 4:29 am

Post by AbsolutelyGenius »

Deathlike2 wrote:I don't recall a "compressed" option (compressed audio doesn't count, and the worst part is that using an MP3 to insert into the movie is worse than the default WAV file that is generated).

You are thinking something along the lines of a multi-pass option, which is available in SVN. That drastically reduces the size of the movie.
Oh OK. How do I access the SVN?

I read back on the 13th page where Firebot was having the same problem:
Firebot wrote:I'm trying to lower the size of some videos since some games like Cybernator go over 100MB for an 8 min movie even though another game would be only 50MB at that point. Is there a way to change zmovie.cfg to record at 30 FPS instead of 60FPS, or to lower the quality of the video a bit? I'm using the Xvid option.
And Nach gave this answer:
Nach wrote:To lower the quality of xvid in zmovie.cfg
Code:

md_xvid="-ovc xvid -xvidencopts fixed_quant=10"



Feel free to play with it.
So if that can also reduce file size, how can I get to it in zmovie.cfg?

Can I use the WIP of ZSNES 11/12 that has the custom option and get the desired results?
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

AbsolutelyGenius wrote:
Deathlike2 wrote:I don't recall a "compressed" option (compressed audio doesn't count, and the worst part is that using an MP3 to insert into the movie is worse than the default WAV file that is generated).

You are thinking something along the lines of a multi-pass option, which is available in SVN. That drastically reduces the size of the movie.
Oh OK. How do I access the SVN?

I read back on the 13th page where Firebot was having the same problem:
Firebot wrote:I'm trying to lower the size of some videos since some games like Cybernator go over 100MB for an 8 min movie even though another game would be only 50MB at that point. Is there a way to change zmovie.cfg to record at 30 FPS instead of 60FPS, or to lower the quality of the video a bit? I'm using the Xvid option.
And Nach gave this answer:
Nach wrote:To lower the quality of xvid in zmovie.cfg
Code:

md_xvid="-ovc xvid -xvidencopts fixed_quant=10"



Feel free to play with it.
So if that can also reduce file size, how can I get to it in zmovie.cfg?

Can I use the WIP of ZSNES 11/12 that has the custom option and get the desired results?
Why would you want to use a WIP that is dated before 1.50?

If you want to use the latest before the release, go check the SVN thread. http://board.zsnes.com/phpBB2/viewtopic.php?t=7371
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
AbsolutelyGenius
New Member
Posts: 4
Joined: Tue Jan 23, 2007 4:29 am

Post by AbsolutelyGenius »

I want to change and go through the zmovie.cfg file. How do I edit it and with what program?
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

It is just a text file. You can use Notepad to edit it.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
AbsolutelyGenius
New Member
Posts: 4
Joined: Tue Jan 23, 2007 4:29 am

Post by AbsolutelyGenius »

Deathlike2 wrote:It is just a text file. You can use Notepad to edit it.
Thank You.

I got DKC2's first stage from 70MB at quant = 2 using xvid to 35MB at quant = 4 using xvid.

This helped me alot.

Lousy 100 MB cap on YouTube.......
AspiringSquire
Born to Rule... Impatiently
Posts: 265
Joined: Wed Nov 17, 2004 8:21 pm
Location: Everywhere I want to be.
Contact:

AVI dumping - Custom option fails with Rock N' Roll Racing

Post by AspiringSquire »

I am experiencing major problems when trying to dump this movie to a merged audio/video file using the Custom option (though it dumped ok with XviD 2 months ago, but not now). The video portion turns out fine, but the audio is silent. I have tried it with compressed and uncompressed audio settings. Clicking 'Stop' before the ZMV has finished its first pass can have the audio included, but the first few seconds are still silent (with mp3, at least). Dumping the audio separately (and stopping early--haven't bothered finishing) works, except that the mp3 will have silence at the beginning. I'm using the default audio settings and dumping settings (other than 192kbps mp3).

Additionally, there is always a delinquent frame at the beginning of the AVI--sometimes with a messed-up image from the ZMV, the rest of the time with a frame that shows "MOVIE FINISHED."

Also, a request: I'd like to have an option to include subtitles in the dumped video.

"Dump Audio" and "Merge With Video" are hidden when "Custom" is selected; is this intentional? It doesn't make sense to me.
[url=http://board.zsnes.com/phpBB2/viewtopic.php?t=3298][color=brown]My [u]NES palette[/u][/color][/url] - better colors with any emulator.

"the more you know, and the more you can do... the more you are."
- [url=http://www.danielbohman.com][color=brown][u]daniel bohman[/u][/color][/url]
franpa
Gecko snack
Posts: 2374
Joined: Sun Aug 21, 2005 11:06 am
Location: Australia, QLD
Contact:

Post by franpa »

did you try deleting zmovie.cfg?
Core i7 920 @ 2.66GHZ | ASUS P6T Motherboard | 8GB DDR3 1600 RAM | Gigabyte Geforce 760 4GB | Windows 10 Pro x64
AspiringSquire
Born to Rule... Impatiently
Posts: 265
Joined: Wed Nov 17, 2004 8:21 pm
Location: Everywhere I want to be.
Contact:

Post by AspiringSquire »

franpa wrote:did you try deleting zmovie.cfg?
Deleting zmovie.cfg did not cause any apparent improvement.
[url=http://board.zsnes.com/phpBB2/viewtopic.php?t=3298][color=brown]My [u]NES palette[/u][/color][/url] - better colors with any emulator.

"the more you know, and the more you can do... the more you are."
- [url=http://www.danielbohman.com][color=brown][u]daniel bohman[/u][/color][/url]
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Re: AVI dumping - Custom option fails with Rock N' Roll Raci

Post by Nach »

AspiringSquire wrote:I am experiencing major problems when trying to dump this movie to a merged audio/video file using the Custom option (though it dumped ok with XviD 2 months ago, but not now). The video portion turns out fine, but the audio is silent.
Audio is silent? Not good. v1.51? SVN? I need full details on where and what you did.
AspiringSquire wrote: I have tried it with compressed and uncompressed audio settings. Clicking 'Stop' before the ZMV has finished its first pass can have the audio included, but the first few seconds are still silent (with mp3, at least).
This does not make sense... The custom option only merges the audio during the last pass. You sure you're checking the right file?
AspiringSquire wrote: Additionally, there is always a delinquent frame at the beginning of the AVI--sometimes with a messed-up image from the ZMV, the rest of the time with a frame that shows "MOVIE FINISHED."
Yeah I know, I have to fix that, I'm just not sure how to yet, it's due to some other ZSNES stupidity that has to be fixed.
AspiringSquire wrote: Also, a request: I'd like to have an option to include subtitles in the dumped video.
I'll add that eventually.
AspiringSquire wrote: "Dump Audio" and "Merge With Video" are hidden when "Custom" is selected; is this intentional? It doesn't make sense to me.
It is intentional, custom always does that and I don't allow it to be selectable.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
AspiringSquire
Born to Rule... Impatiently
Posts: 265
Joined: Wed Nov 17, 2004 8:21 pm
Location: Everywhere I want to be.
Contact:

AVI dumping complications - more details

Post by AspiringSquire »

I'm using the official Windows v1.51 release.
Nach wrote:
AspiringSquire wrote:I have tried it with compressed and uncompressed audio settings. Clicking 'Stop' before the ZMV has finished its first pass can have the audio included, but the first few seconds are still silent (with mp3, at least).
This does not make sense... The custom option only merges the audio during the last pass. You sure you're checking the right file?
Yes, I know audio is only merged at the last pass. I clicked 'Stop' during the first pass, and it then proceeded to start the next pass. Each of the remaining passes ended at the same point that I clicked 'Stop'. I only tried playing "custom.avi" after the process had finished. But dumping with XviD has the same audio problem as Custom.

By the way, the ZMV I posted above is only about 2min 23sec in length (a single race). I made new ZMVs (one of similar length, one much shorter) for testing, but they suffer from the same complications. I also tried encoding a ZMV from another game (about 2:40 in length) without success in retaining the audio.

Apparently, this is affecting every dump that I make without stopping it manually (I tried both "ZMV Length" and "Dump # of Frames"); "Until Stop" works great, even including the audio at the very beginning.
Nach wrote:
AspiringSquire wrote:Also, a request: I'd like to have an option to include subtitles in the dumped video.
I'll add that eventually.
Do you also plan to make it capable of supporting more of the standard non-letter characters in the display? Commas, for instance, don't display correctly; there's just a garbled character instead.

FYI, there would be enough room for two additional characters in a single subtitle if the subtitle display were shifted to the left.
[url=http://board.zsnes.com/phpBB2/viewtopic.php?t=3298][color=brown]My [u]NES palette[/u][/color][/url] - better colors with any emulator.

"the more you know, and the more you can do... the more you are."
- [url=http://www.danielbohman.com][color=brown][u]daniel bohman[/u][/color][/url]
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Re: AVI dumping complications - more details

Post by Nach »

AspiringSquire wrote:
Nach wrote:
AspiringSquire wrote:I have tried it with compressed and uncompressed audio settings. Clicking 'Stop' before the ZMV has finished its first pass can have the audio included, but the first few seconds are still silent (with mp3, at least).
This does not make sense... The custom option only merges the audio during the last pass. You sure you're checking the right file?
Yes, I know audio is only merged at the last pass. I clicked 'Stop' during the first pass, and it then proceeded to start the next pass. Each of the remaining passes ended at the same point that I clicked 'Stop'. I only tried playing "custom.avi" after the process had finished. But dumping with XviD has the same audio problem as Custom.
Yeah...
I made it handle stop properly like that, I forgot I did that :P
AspiringSquire wrote: By the way, the ZMV I posted above is only about 2min 23sec in length (a single race). I made new ZMVs (one of similar length, one much shorter) for testing, but they suffer from the same complications. I also tried encoding a ZMV from another game (about 2:40 in length) without success in retaining the audio.

Apparently, this is affecting every dump that I make without stopping it manually (I tried both "ZMV Length" and "Dump # of Frames"); "Until Stop" works great, even including the audio at the very beginning.
Perhaps I broke something in the process of adding some of the new goodies, I'll have a look.
AspiringSquire wrote:
Nach wrote:
AspiringSquire wrote:Also, a request: I'd like to have an option to include subtitles in the dumped video.
I'll add that eventually.
Do you also plan to make it capable of supporting more of the standard non-letter characters in the display? Commas, for instance, don't display correctly; there's just a garbled character instead.

FYI, there would be enough room for two additional characters in a single subtitle if the subtitle display were shifted to the left.
You're asking to have the output system modified, it's not close to the top of my agenda, but I would like to do it at some point.
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 »

did you update mencoder recently?
Core i7 920 @ 2.66GHZ | ASUS P6T Motherboard | 8GB DDR3 1600 RAM | Gigabyte Geforce 760 4GB | Windows 10 Pro x64
AspiringSquire
Born to Rule... Impatiently
Posts: 265
Joined: Wed Nov 17, 2004 8:21 pm
Location: Everywhere I want to be.
Contact:

Post by AspiringSquire »

franpa wrote:did you update mencoder recently?
No. I've been using the same one I downloaded roughly 2.5 months ago.


Edit: I take back what I said here:
AspiringSquire wrote:"Until Stop" works great, even including the audio at the very beginning.
It worked with XviD on a short dump (24 seconds), but when I dumped a 2.5min video with Custom + "Until Stop", it only included sound in the first 1-2 seconds and the last 20 seconds.
[url=http://board.zsnes.com/phpBB2/viewtopic.php?t=3298][color=brown]My [u]NES palette[/u][/color][/url] - better colors with any emulator.

"the more you know, and the more you can do... the more you are."
- [url=http://www.danielbohman.com][color=brown][u]daniel bohman[/u][/color][/url]
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

The movie seems to dump fine atm. I don't see an issue. I dumped it with XVid+Compressed Audio and no issues on playback. I've only dumped as long as the ZMV length.

I get the feeling a reboot is in order perhaps? Maybe you should reproduce the exact options+steps?
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

Ok, I found the issue... I think. Disable "Pause Emu in Background".
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
AspiringSquire
Born to Rule... Impatiently
Posts: 265
Joined: Wed Nov 17, 2004 8:21 pm
Location: Everywhere I want to be.
Contact:

Disabling Pause = Success

Post by AspiringSquire »

Deathlike2 wrote:Ok, I found the issue... I think. Disable "Pause Emu in Background".
That fixed it! Thanks! 8)

I've noticed something else. With "Pause Emu In Background" disabled, when dumping with Custom, the audio playback is muted only during the first pass. This means there is unnecessary extra processing during subsequent passes, and it is noticeably slower.
[url=http://board.zsnes.com/phpBB2/viewtopic.php?t=3298][color=brown]My [u]NES palette[/u][/color][/url] - better colors with any emulator.

"the more you know, and the more you can do... the more you are."
- [url=http://www.danielbohman.com][color=brown][u]daniel bohman[/u][/color][/url]
Locked