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 17th August 2010, 00:51   #1  |  Link
hamsterstyle
Registered User
 
Join Date: Feb 2009
Posts: 11
Tdecimate vs Subtitles

Hey All. I have an avisynth question that I hope you can all answer.

I have a piece of video that is 1920x1080, with subtitles. the video is 3-2 telecine.

A standard IVT works fine.

TFM()

However, the telecine cadence of the video, is different from the subtitles. At some points in the video, we have two frames that repeat, however only one of the frames has the subtitle on it. Thus tdecimate fails to correctly decimate.

My fix is to crop off the subtitles, run tdecimate(output="temp.txt"), then rerun the script normally with tdecimate(input="temp.txt").

Is there any way to do this with only one pass, or to do it more intelligently?
hamsterstyle is offline   Reply With Quote
Old 17th August 2010, 07:59   #2  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,405
There are a couple of ways to do this in a single pass. One is to remove the bottom however many pixels only for the purposes of the field matching. From the TFM readme:
Quote:
y0/y1 -

These define an exclusion band which excludes the lines between y0 and y1 from
being included in the field matching decision. An exclusion band can be used
to ignore subtitles, a logo, or other things that may interfer with the matching.
y0 sets the starting scan line and y1 sets the ending line, all lines in between
y0 and y1 (including y0 and y1) will be ignored. Set y0 equal to y1 to disable.
The entire original resolution will be outputted. The other is by using a clip2. From the TDecimate readme:
Quote:
clip2 -

Allows specification of a second clip from which to take frames. Metric calculation
and decimation are still done on the input clip, but the frames that tdecimate
returns are from clip2. Clip2 must have the same number of frames are the input clip
and be in YUY2 or YV12 colorspace (it does not have to have the same colorspace as
the input clip).
So, something like this works:
Code:
Clip2=AVISource("E:\Path\To\Video.avi")
PClip=Clip2.Crop(0,0,0,-60)#Adjust for the height of the subs
TFM(PClip)
TDecimate(Clip2)
You crop for the purposes of the field matching, but output uncropped frames.
manono is offline   Reply With Quote
Old 18th August 2010, 17:14   #3  |  Link
hamsterstyle
Registered User
 
Join Date: Feb 2009
Posts: 11
thanks Manono, that was exactly what I was looking for.
hamsterstyle is offline   Reply With Quote
Reply

Tags
1080, avisynth, decimate, subtitle, tdecimate

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:12.


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