Varying source sizes, need them at the same aspect ratio

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
Locked
User avatar
Hareoic
Joined: Wed Jan 30, 2008 8:54 pm
Status: IT'S PAAHFEKKTO
Location: Omaha
Org Profile

Varying source sizes, need them at the same aspect ratio

Post by Hareoic » Thu Apr 17, 2008 6:47 pm

I have several different video sources, but I don't know how I could make them all the same size without messing up the aspect ratio.

Here's a list of the episodes and the resolutions for the sources I have:

First Season
  • 1 - 640x352 (Raw) or 704x396 (Sub)
    2 - 704x396 (both)
    3 - 704x396 (both)
    4 - 704x396 (both)
    5 - 704x396 (both)
    6 - 704x396 (both)
    7 - 704x396 (both)
    8 - 704x396 (both)
    9 - 704x396 (both)
    10 - 704x396 (both)
    11 - 704x396 (both)
    12 - 704x396 (both)
    13 - 704x396 (both)
    14 - 704x396 (both)
    15 - 704x396 (both)
    16 - 704x396 (Raw) or 848x480 (Sub)
    17 - 704x396 (Raw) or 848x480 (Sub)
    18 - 704x396 (Raw) or 848x480 (Sub)
    19 - 704x396 (Raw) or 848x480 (Sub)
    20 - 704x396 (Raw) or 848x480 (Sub)
    21 - 704x396 (Raw) or 848x480 (Sub)
    22 - 640x360 (Raw) or 848x480 (Sub)
    23 - 704x396 (Raw) or 848x480 (Sub)
    24 - 704x396 (Raw) or 848x480 (Sub)
    25 - 704x396 (Raw) or 848x480 (Sub)
    26 - 704x396 (Raw) or 848x480 (Sub)
Second season

All episodes seem to be the same size, though it changes depending on where they're viewed. In Windows Media Player, they measure 711x400, but in Virtual Dub Mod, they're 704x400. I don't know if this is because of the .mkv encoding or something else, but unless I'm told otherwise I'll take the measurement of 704x400 as the proper measurement.



None of the videos have had their edges cropped, so the color distortion that occurs near the edges is present, but I don't know whether to do that before or after resizing the videos (no idea how the technical stuff works out). Can somebody please help me out here?

User avatar
JaddziaDax
Crazy Cat Lady!
Joined: Tue Mar 16, 2004 6:25 am
Status: I live?
Location: Somewhere I think O.o
Contact:
Org Profile

Post by JaddziaDax » Thu Apr 17, 2008 11:22 pm

use avisynth to crop off the ugly parts and resize them all to the same size

crop(0,0,-0,-0)
LanczosResize(width,length)

and use math, math is your friend

ignore display sizes in other programs, vdm should be right

User avatar
Hareoic
Joined: Wed Jan 30, 2008 8:54 pm
Status: IT'S PAAHFEKKTO
Location: Omaha
Org Profile

Post by Hareoic » Fri Apr 18, 2008 6:17 pm

Okay, I've got a size picked out that works fairly well for all of the ones I'm using (512x288), now I just need to know, should I crop it before or after resizing?

User avatar
Hareoic
Joined: Wed Jan 30, 2008 8:54 pm
Status: IT'S PAAHFEKKTO
Location: Omaha
Org Profile

Post by Hareoic » Fri Apr 18, 2008 6:23 pm

And I also need to know if I'm supposed to do cleanup of the footage first, before I try to resize it.

User avatar
badmartialarts
Bad Martial Artist
Joined: Sat Oct 25, 2003 5:31 am
Location: In ur Kitchen Stadium, eatin ur peppurz
Org Profile

Post by badmartialarts » Fri Apr 18, 2008 7:58 pm

Clean up before resizing and cropping. Crop before resizing.

That was easy...:)
Life's short.
eBayhard.

User avatar
Kariudo
Twilight prince
Joined: Fri Jul 15, 2005 11:08 pm
Status: 1924 bots banned and counting!
Location: Los taquitos unidos
Contact:
Org Profile

Post by Kariudo » Fri Apr 18, 2008 8:15 pm

badmartialarts wrote:Clean up before resizing and cropping. Crop before resizing.

That was easy...:)
to go into just a bit more detail
when doing your cleaning:
deinterlace / IVTC right away (if needed)
do your smoothing (deen, removegrain, smooth, vaguedenoiser, etc..) before your sharpening (vmtoon, msharpen, limitedsharpen, etc...)
resizing can be put anywhere after the deinterlacing/IVTC-ing...I prefer to put it at the end

some rainbow removal and dot crawl removal things need interlaced footage to work right
Image
Image

User avatar
Hareoic
Joined: Wed Jan 30, 2008 8:54 pm
Status: IT'S PAAHFEKKTO
Location: Omaha
Org Profile

Post by Hareoic » Fri Apr 18, 2008 8:24 pm

Kariudo wrote:
badmartialarts wrote:Clean up before resizing and cropping. Crop before resizing.

That was easy...:)
to go into just a bit more detail
when doing your cleaning:
deinterlace / IVTC right away (if needed)
do your smoothing (deen, removegrain, smooth, vaguedenoiser, etc..) before your sharpening (vmtoon, msharpen, limitedsharpen, etc...)
resizing can be put anywhere after the deinterlacing/IVTC-ing...I prefer to put it at the end

some rainbow removal and dot crawl removal things need interlaced footage to work right
For some reason, I could never tell the difference when I deinterlaced, so I just smoothed it over instead.

And the vmtoon item doesn't seem to work. I don't know why this is.

Still, that clears several things up for me, and I shouldn't have any problems.

User avatar
Kariudo
Twilight prince
Joined: Fri Jul 15, 2005 11:08 pm
Status: 1924 bots banned and counting!
Location: Los taquitos unidos
Contact:
Org Profile

Post by Kariudo » Fri Apr 18, 2008 9:37 pm

would it be possible to post a before/after shot?
Image
Image

User avatar
Hareoic
Joined: Wed Jan 30, 2008 8:54 pm
Status: IT'S PAAHFEKKTO
Location: Omaha
Org Profile

Post by Hareoic » Fri Apr 18, 2008 10:10 pm

Kariudo wrote:would it be possible to post a before/after shot?
Sure, but another thing I've found is that the color changes slightly when I take a screenshot from what it was originally.

Without any filters:
Image

And the filters I use:
UnDot
Deen("w3d",2,2,4)
DeBlock(quant=15)
vmToon(strength=24, xstren=128)

With filters:
Image

User avatar
Kariudo
Twilight prince
Joined: Fri Jul 15, 2005 11:08 pm
Status: 1924 bots banned and counting!
Location: Los taquitos unidos
Contact:
Org Profile

Post by Kariudo » Fri Apr 18, 2008 10:21 pm

I was kinda hoping for a before deinterlacing/IVTC and after deinterlacing/IVTC shot

raws may already been deinterlaced
Image
Image

Locked

Return to “AviSynth Help”