Skip to content

Commit

Permalink
fix HardsubASS outputting single frame clip
Browse files Browse the repository at this point in the history
  • Loading branch information
Ichunjo authored and LightArrowsEXE committed Nov 10, 2024
1 parent 2c84d49 commit 82ab7fe
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions vsmasktools/hardsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,7 @@ def __init__(

def _mask(self, clip: vs.VideoNode, ref: vs.VideoNode, **kwargs: Any) -> vs.VideoNode:
ref = ref[0] * self.shift + ref if self.shift else ref
mask: vs.VideoNode = ref.sub.TextFile( # type: ignore[attr-defined]
self.filename, fontdir=self.fontdir, blend=False
)[1]
mask = ref.sub.TextFile(self.filename, fontdir=self.fontdir, blend=False).std.PropToClip('_Alpha')
mask = mask[self.shift:] if self.shift else mask
mask = mask.std.Binarize(1)
mask = iterate(mask, core.std.Maximum, 3)
Expand Down

0 comments on commit 82ab7fe

Please sign in to comment.