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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 23rd October 2018, 17:28   #1  |  Link
pcroland
Registered User
 
Join Date: Mar 2014
Location: Hungary
Posts: 59
Making a mask to remove hardsubs

Hi!

I have two video sources. The first source has good picture quality and hardcoded subs, the second source has low PQ but it does not contain hardsubs.

I want to remove the hardsubs from the video and replacing the texts with actual video.

This is my script so far:
Code:
a=FFMS2("X:\DL\hardsub.mkv")
b=FFMS2("X:\DL\nohardsub.mkv")
mask=Subtract(a,b).Levels(0, 0.16, 255, 0, 255, coring=true)
Overlay(a,b,0,0,mask)
I subtract the two image from each other and then tweaking the colors to make it kinda black and white only.

Here are some frames:
video with good PQ
video with bad PQ
difference between them
after tweaking it with levels
using the mask to Overlay the text

So my questions are:

How can I make the mask pure black and white? Is there any script that turns the image into 1 bit?
How can I expand the mask with for example 10-15 pixels? I tried to mess with mt_expand but no luck so far.
pcroland is offline   Reply With Quote
 

Tags
hardsub, mask, mt_expand, overlay, remove

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 00:35.


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