Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th December 2020, 07:40   #1  |  Link
toot367
Registered User
 
Join Date: Jul 2020
Posts: 5
CropVD.avsi - Virtualdub2 style cropping

I don't know how everyone handles the standard Crop parameters with the negative numbers and bizarre ordering. My brain won't work with it so, here's my first function for Avisynth. The parameters are just like in Virtuadub2's crop with left, right, top, bottom.
Example:
Crop 2 pixels left, 4 pixels right, 0 on the top, and 10 on the bottom:
CropVD(2,4,0,10)

CropVD.avsi
Code:
# CropVD 1.0 by videogeek
#
# VirtualDub style cropping- pixels from the border
# with the VDub order left,right,top,bottom and no negative numbers
# Note as this is using the Avisynth Crop function, the same Mod rules apply:
#
#Colorspace   Width     Progressive Height  Interlaced Height
#--------------------------------------------------------------
#  RGB     no restriction no restriction           mod-2
#  YUY2         mod-2     no restriction           mod-2
#  YV12         mod-2        mod-2                 mod-4
#  YV411        mod-4     no restriction           mod-2
#  YV16         mod-2     no restriction           mod-2
#  YV24    no restriction no restriction           mod-2 
#
#  version 1.0 2020-11-20 first release

function CropVD(clip C, int "left", int "right", int "top", int "bottom" )
{
  C      = default(C,     C)
  left   = default(left,  0)
  right  = default(right, 0)
  top    = default(top,   0)
  bottom = default(bottom,0)

  return Crop( C, left, top, -right, -bottom )
}
Download CropVD.avsi and copy to your Avisynth plugins folder:
https://mega.nz/file/lxc3nIZY#qXGyyT...4U_7OXYt_t7N68
toot367 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:49.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.