PDA

View Full Version : Uncompressed AVI -> DivX Question (Using Nandub)


enthrop
4th April 2006, 14:46
Hey all,

It's been over a year since I last encoded anything, so much of what I use to know has gone down the drain... washed away. I've been browsing through the guides again... but I can't seem to find one that has what I want (not saying there isn't one, but I just haven't found it...)

I just had a quick question about compressing an uncompressed AVI file to DivX using Nandub. I'm using Nandub cause I'm old school and miss the days of SBC encoding...

The uncompressed AVI was gotten through a TV Capture card I have (recorded a cutscene from my PS2 to computer). It's a 10 min video clip that runs 8.5 gigs.. and I obviously want to make it smaller. Both the audio and video have to be compressed.

The way I've been doing it is:
Load the full AVI into Nandub, direct stream the audio (I'll later demux the audio and encode it separatly then MUX it back in) and encode the video. By encoding the video, I include setting the start/end of the video and resizing it.

My first question deals w/ the resize. All my video is captured at 640x480. The actual video that cutscenes use is more of the widescreen nature, although I'm not sure if they conform to standard NTSC 16:9 ratios or anything... (I dunno, do games use those standards to?). But anyway, lets say for the point of this question that it's a custom size.

What I want to do is crop all that black margin on the side of the video - the capture card for some reason has huge X and Y blackspace margins. So I crop them out and get a video size of 597x375. Now I don't know why, but something in the back of my mind likes numbers that use multipliers of 8 or 16... so I add some of that blackspace back in so I get a video size of 600x384. Then, I resize the video from 640x480 to 600x384 (to match the resized video).

Have I just messed up the aspect ratio of the video? Is what I'm doing kosher?

My second question is... is the method I'm doing this "not too bad?" Heh. I don't need the best way to do this ('this' being compressing an uncompressed avi to divx), but if there's a better way that will give me a better compressed output.. I don't mind entertaining it.

And sorry if there is a guide explaining this or another post... I just didn't find it (and someone else in another thread posted a question that was answered by a guide and chewed out for it, so I'm a little afraid of asking my question).

chromium
5th April 2006, 15:08
If you're concerned about doing thins "not too bad", I'd use VirtualdubMod instead of Nandub and the open source legitime XVID codec instead of the hacked and depreciated xvid 3 codec. It will give you much better quality for the same file size. Video compresion has strongly evolved, you realy should use newer codecs.

With respect to your resizing, indeed you should crop some of the sides to remove the "blackspace" margins from your capture. Indeed, it is a good idea to add some black space again to end up with sizes that are divisible by 4. However, I would rather prefer to tolerate a small aspect ratio error, or crop a few pixels more.

If you add black spaces, I recommend to add them AFTER your resize, not before. Dowing so, you will be sure that the edge of your black border is sharp.

I would not worry too much about "standard" aspect ratio's, i.e., an exact 16:9 or so. Just crop the garbage off your video. During playback, the video will properly be rendered the width f your screen.