Dogway / Avisynth-Scripts

AviSynth+ 3.7.3+ Filters
GNU General Public License v3.0
90 stars 12 forks source link

MatteCrop has missing dependencies and throws an error due to passing clips of different dimensions into Expr #83

Open ravewulf opened 9 months ago

ravewulf commented 9 months ago

Describe the bug Uses ScSelect_HBD which was removed in commit 5a0835d - replace with functions from ScenesPack?

Trying to use MatteCrop throws an additional error: "Expr: All inputs must have the same number of planes and the same dimensions, subsampling included" (C:\Programs\AviSynth+\plugins64+\ExTools.avsi, line 687) (C:\Programs\AviSynth+\plugins64+\ResizersPack.avsi, line 1458)

In ResizersPack.avsi on line 1458, avgY and avg need to be the same dimensions but avg is resized on lines 1453 and 1456

To Reproduce mpeg2source("test.d2v") #ripped VOB file with black borders that change per scene MatteCrop(width=640, height=480)

Expected behavior MatteCrop should run without errors, crop each scene based on the detected black borders, and resize to the given resolution

Files ResizersPack.avsi and all dependencies (with the exception of ScSelect_HBD which no longer exists per commit 5a0835d)

System:

Additional context Unknown if MatteCrop has other bugs due to the missing dependencies and Expr error

Dogway commented 9 months ago

Yes, MatteCrop() is in WIP state, it's been abandoned so I'm interested in your use case.

My goal at the moment was to auto-crop dynamic black bars so they appear static, symmetrical and similar across shots. It's designed for digital black bars, not analog content.

I might revisit it to update functions so I'll leave this open.

ravewulf commented 9 months ago

Thanks for the update!

For my use case, I'm going through DVDs, primarily animated movies and TV shows, where the special features contain a mixture of live-action commentary and animated clips from the main feature. The black bars were digitally added but are inconsistent between different shots. It is primarily hard cuts from one clip to the next but there are a few fade transitions between shots in some of the videos.

So far I've been manually trimming, cropping, and resizing each clip within a given video but it can be quite tedious depending on how long the video is and how often it cuts between shots.

For the occasional fade transition, I'll use Animate() and LanczosResize()'s extra cropping parameters to change how much is cropped on a per-frame basis for the duration of the fade between two clips that have different amounts of cropping needed, though I'm assuming this part would be much more difficult to detect and handle automatically in a script vs cuts.