Quantcast QTGMC before or after Crop/AddBorders in AVSynth? - digitalFAQ Forum
  #1  
09-25-2021, 11:49 AM
KubaVideo KubaVideo is offline
Free Member
 
Join Date: Feb 2020
Posts: 10
Thanked 1 Time in 1 Post
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:

VirtualDub border masking? (not cropping!)

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.

Last edited by KubaVideo; 09-25-2021 at 12:07 PM.
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
09-25-2021, 12:47 PM
latreche34 latreche34 is offline
Free Member
 
Join Date: Dec 2015
Location: USA
Posts: 1,818
Thanked 300 Times in 279 Posts
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.

https://www.youtube.com/user/latoak34/videos
Reply With Quote
  #3  
09-26-2021, 11:00 AM
lollo2 lollo2 is online now
Free Member
 
Join Date: Mar 2013
Location: Italy
Posts: 215
Thanked 45 Times in 42 Posts
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
Reply With Quote
  #4  
09-26-2021, 02:18 PM
latreche34 latreche34 is offline
Free Member
 
Join Date: Dec 2015
Location: USA
Posts: 1,818
Thanked 300 Times in 279 Posts
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.

https://www.youtube.com/user/latoak34/videos
Reply With Quote
  #5  
09-26-2021, 03:46 PM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 11,176
Thanked 1,992 Times in 1,718 Posts
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.)

- Did my advice help you? Then become a Premium Member and support this site.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
Reply With Quote
  #6  
09-26-2021, 04:29 PM
lollo2 lollo2 is online now
Free Member
 
Join Date: Mar 2013
Location: Italy
Posts: 215
Thanked 45 Times in 42 Posts
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()
Reply With Quote
  #7  
09-28-2021, 07:15 PM
KubaVideo KubaVideo is offline
Free Member
 
Join Date: Feb 2020
Posts: 10
Thanked 1 Time in 1 Post
Quote:
Originally Posted by lollo2 View Post
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.
Reply With Quote
  #8  
09-28-2021, 07:19 PM
KubaVideo KubaVideo is offline
Free Member
 
Join Date: Feb 2020
Posts: 10
Thanked 1 Time in 1 Post
Quote:
Originally Posted by lordsmurf View Post


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.

Last edited by KubaVideo; 09-28-2021 at 07:52 PM.
Reply With Quote
  #9  
09-29-2021, 03:43 AM
lollo2 lollo2 is online now
Free Member
 
Join Date: Mar 2013
Location: Italy
Posts: 215
Thanked 45 Times in 42 Posts
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
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Sony GV-D800 cream of the 8mm crop? yumyum8 Capture, Record, Transfer 5 06-21-2021 08:32 PM
VHS to compressed format, crop the edges? Jayce72 Capture, Record, Transfer 14 06-24-2020 10:47 AM
Crop in Virtualdub or Avisynth+? evilt1000 Restore, Filter, Improve Quality 2 06-17-2020 12:05 PM
Workflow order: mask/crop then deinterlace? rocko Encode, Convert for streaming 20 07-31-2017 05:23 PM
For VHS to DVD, mask (crop) before other restore filters? Laserer Restore, Filter, Improve Quality 34 04-09-2017 09:51 PM

Thread Tools



 
All times are GMT -5. The time now is 11:58 AM