digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Encode, Convert for streaming (https://www.digitalfaq.com/forum/video-web/)
-   -   QTGMC before or after Crop/AddBorders in AVSynth? (https://www.digitalfaq.com/forum/video-web/12196-qtgmc-before-after.html)

KubaVideo 09-25-2021 11:49 AM

QTGMC before or after Crop/AddBorders in AVSynth?
 
I am currently experimenting processing home video files for streaming from my computer to TV's located around my home. The original source was Video8. My files are uncompressed lossless AVI captured at 720x480 using an ATI AIW 9600 in VirtualDub. I am starting to learn AVSynth and have decided I want to create deinterlaced files using QTGMC. I also want to concurrently mask overscan in AVSynth using the method described by @sanlyn:

http://www.digitalfaq.com/forum/vide...html#post39266

He recommends using the following:

Crop(0,0,0,-8)
AddBorders(0,4,0,4)


My question is whether this operation (Crop, AddBorders) should take place before or after I deinterlace with QTGMC.

latreche34 09-25-2021 12:47 PM

Preferably de-interlace first, Cropping interlaced video can be done but make sure you crop in pairs of lines to avoid reversing the field order.

lollo2 09-26-2021 11:00 AM

Better crop before, because the black areas do not contain visible scanlines even when interlaced, and they can alter the field matching operations inside QTGMC.

Alway crop according to http://avisynth.nl/index.php/Crop

latreche34 09-26-2021 02:18 PM

Be very carfull when suggesting croping before de-interlacing because if the crop is done in odd line number or black lines added is diffrenet than the ones removed it will lead to field order reversal, That's why if de-interlacing is planned it is better done before cropping. It's a lot easier to work on a single progressive frame than 2 diffrent half frames.

The OP those crop and add border numbers are not fixed numbers they vary from tape to another, After de-interlacing use vdub2 crop filter to exactly cutomize your frame based on tape being worked on. vdub2 has a very usefull frame display tool.

lordsmurf 09-26-2021 03:46 PM

Do not resize interlace. Lots of people think "crop" = "crop+resize". For example, if you have 720x480 video, and crop off 2 pixels off all sides, video is now 716x476. If your new video is still 720x480, you screwed up, resized interlaced footage, and you have an uncorectable mess. That wasn't just a crop.

There's near-zero reason to crop before deinterlace.

And QTGMC, not some crappy method. (That's a given here, but just to reinforce this fact.)

lollo2 09-26-2021 04:29 PM

Quote:

because if the crop is done in odd line number ...
That's why I said to follow the doc rules ;)

Quote:

... you screwed up, resized interlaced footage, ...
Yes, interlaced material should not be resized. The following works quite well
Code:

crop(crop_left,crop_top,-crop_right,-crop_bottom)
AssumeXFF()
QTGMC() # or any bob deinterlacer you like
any_progressive_filter_you_like
addborders(crop_left,crop_top,crop_right,crop_bottom)
any_resize_filter_you_like

If you wish to reinterlace back:
Code:

AssumeXFF()
SeparateFields()
Selectevery(4,0,3)
Weave()


KubaVideo 09-28-2021 07:15 PM

Quote:

Originally Posted by lollo2 (Post 80061)
that's why i said to follow the doc rules ;)



yes, interlaced material should not be resized. The following works quite well
Code:

crop(crop_left,crop_top,-crop_right,-crop_bottom)
assumexff()
qtgmc() # or any bob deinterlacer you like
any_progressive_filter_you_like
addborders(crop_left,crop_top,crop_right,crop_bottom)
any_resize_filter_you_like

if you wish to reinterlace back:
Code:

assumexff()
separatefields()
selectevery(4,0,3)
weave()


Wait, I don't understand your suggested code. Are you not cropping before deinterlacing with QGTMC? I thought we just concluded that we crop after deinterlacing. I was thinking:

QGTMC()
Crop (0,0,0,-8)
AddBorders (0,4,04)

I have no need to reinterlace as I am preparing this file for streaming.

KubaVideo 09-28-2021 07:19 PM

Quote:

Originally Posted by lordsmurf (Post 80059)


And QTGMC, not some crappy method. (That's a given here, but just to reinforce this fact.)


Absolutely planning on using QTGMC. Learning how to use it now.

lollo2 09-29-2021 03:43 AM

Code:

I thought we just concluded that we crop after deinterlacing
Crop after deinterlacing then (I do the crop before deinterlacing)

Quote:

QGTMC()
Crop (0,0,0,-8)
AddBorders (0,4,04)
Perfect!

Quote:

I have no need to reinterlace
It wasn't for you but to complete the overview of processing interlaced material


All times are GMT -5. The time now is 04:06 AM

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.