ZMV to AVI conversion r1.1

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

Moderator: ZSNES Mods

Berret
Rookie
Posts: 11
Joined: Sun May 03, 2009 7:27 pm

Post by Berret »

Nach wrote:Making a video in segments means the input recording, not the conversion to AVI.
Yeah I'm passed that point with this one... *blush* looks like I'll have to redo it. I've learned MY lesson... :(
Aspire
New Member
Posts: 6
Joined: Tue Dec 09, 2008 7:24 am

Post by Aspire »

I tried the x264 option, and it created the avi file fine. It has video and sound showing up correctly in Media Player Classic. (Using the K-lite Codec Pack). But when I uploaded it to YouTube, the video was completely garbled. (I think this is because of the x264 codec)?

Someone mentioned opening the file in VDubMod. VDubMod gave the following error:
Virtualdubmod has detected an improper VBR audio encoding in the source AVI file (audio stream 1).
Then it mentions something about rewriting the audio header, and eventually gives another error:
AVI: truncated or invalid MP3 Audio format detected. (18 bytes, should be 30). Attempting to fix
Nothing else happens after that. And the video shows completely black in VDubMod.
Any idea what to do?
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

Maybe it used x264's "lossless" mode? That's the only reason I could think of...

What I do for the audio is keeping it uncompressed all the time, and as the final step loading it in VirtualDubMod and selecting Lame MP3 compression (pic). This will be constant bitrate.

Needs the Lame Windows codec installed (included with Lame).
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
Aspire
New Member
Posts: 6
Joined: Tue Dec 09, 2008 7:24 am

Post by Aspire »

creaothceann wrote:Maybe it used x264's "lossless" mode? That's the only reason I could think of...

What I do for the audio is keeping it uncompressed all the time, and as the final step loading it in VirtualDubMod and selecting Lame MP3 compression (pic). This will be constant bitrate.

Needs the Lame Windows codec installed (included with Lame).
Yeah it was x264 Lossless option.

This is going to sound stupid, but keeping audio uncompressed is done by simply unchecking "Compress Audio" in the Dump options right?

After that I should just select what's shown in your screenshot? (In VDubMod)

(I have the latest Lame for Windows installed as well for this).

Edit:
I tried unchecking the Compress Audio in dump options, but it leads to the exact same problems. Managed to get rid of the Audio problem by doing what you suggested. (Had to use regular VDub, then it opened fine later in the VDubMod). But the video is still ending up garbled.
paulguy
Zealot
Posts: 1076
Joined: Sat Jul 02, 2005 2:01 am
Contact:

Post by paulguy »

I think the advice was to try not using the x264 lossless option.
Aspire
New Member
Posts: 6
Joined: Tue Dec 09, 2008 7:24 am

Post by Aspire »

Isn't there a proper method for the x264 then? I always thought x264 would produce better quality than the XviD Lossless (the Xvid lossless does work correctly).
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

You can use x264 lossless, but you'll have to recompress the video, for example with x264 or ZMBV (included with DOSBox).

EDIT: If file size doesn't matter you can use single-pass encoding with a very high bitrate. For a lower bitrate or smaller file size you can use two-pass encoding; this assigns bits more intelligently than single-pass encoding. In VirtualDubMod, select "x264vfw" as the encoder, and in the "Configure" dialog select the appropriate rate and pass.


Some additional notes:

- ZMBV will keep filesizes small, so it takes less time to upload. But what I usually do is using GaussResize(480, 360, p=66) to upscale videos, and the size advantage goes away.

- x264 and Youtube use YV12 while ZSNES and ZMBV use RGB, so there will always be a color space conversion. You can see the difference with this AviSynth script:

Code: Select all

v1 = AVISource("MySourceFile.avi").ConvertToRGB32
v2 = v1.ConvertToYV12             .ConvertToRGB32
v3 = Subtract(v1, v2)
v4 = BlankClip(v1)
L1 = StackHorizontal(v1, v3)
L2 = StackHorizontal(v2, v4)
StackVertical(L1, L2)
- SNES outputs at 60 fps while Youtube has a maximum of 30 fps. You can therefore remove every other frame (reduces filesize) via AviSynth (ChangeFPS(framerate / 2)) or in VirtualDubMod. Another method is to blend frames:

Code: Select all

AVISource(...)
AssumeFieldBased
Weave
VerticalReduceBy2
This might look worse for some games though.

- Youtube's length restriction is that the "minutes" cannot be 11, so you can for example use 19799 frames at 30 fps (which is 10:59.96 minutes).
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
Tekkenfreek233

Post by Tekkenfreek233 »

Geocities is closed and the website isn't on archive.org so is there any other place we can get the special version of LAME?
tukuyomi
Rookie
Posts: 39
Joined: Mon Aug 02, 2004 5:14 am
Contact:

Post by tukuyomi »

kode54
Zealot
Posts: 1140
Joined: Wed Jul 28, 2004 3:31 am
Contact:

Post by kode54 »

Huh, I thought it was possible to trick YouTube into accepting 60fps content by encoding directly to FLV before uploading.
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

You make it sound like it's not ?

What's what those high-quality videos do, then ? Combine every 2 frames into one with 50% transparency each ?

Edit: ah, blend, nevermind.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

I tried encoding to FLV to avoid Youtube's automatic reencoding, but it didn't recognize the file type.

Youtube simply discards every x frames until the framerate is <= 30 fps; it doesn't blend by itself. AviSynth blending code:

Code: Select all

function BlendFields(clip)  {
        clip
        (FrameCount % 2 == 1)  ?  DuplicateFrame(FrameCount - 1)  :  nop
        Overlay(SelectEven, SelectOdd, opacity=0.5)
}
Last edited by creaothceann on Fri Dec 04, 2009 7:27 pm, edited 1 time in total.
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
classicgamer
New Member
Posts: 9
Joined: Mon Jul 27, 2009 12:23 am

Post by classicgamer »

I have somewhat a problem. I'm recording the Illusion of Gaia ending. I'm recording it in 3 parts. I'm using movie channels 0 1 2. The first part of the video from channel 0 is perfect when I convert to wmv. When I try channel 1, and convert, the video is 100% but no sound.

I'm using XP and ZSNES 1.51. I don't know what version of lame and mencoder I'm using.
classicgamer
New Member
Posts: 9
Joined: Mon Jul 27, 2009 12:23 am

Post by classicgamer »

bump

I had a hard drive problem and redownloaded lame and mencoder. When I watch videos that I dumped, all I get is audio. I have all 3 checked on the dumping tab over at the right
paulguy
Zealot
Posts: 1076
Joined: Sat Jul 02, 2005 2:01 am
Contact:

Post by paulguy »

You'll need the codecs (not sure what encoder is used by default, probably xvid or h.264, might want to just try installing CCCP or something.) or just use mplayer.
Post Reply