View Full Version : IVTC with scrolling text
turbojet
17th October 2013, 05:26
Is there any way to correctly ivtc this 60p clip? (http://www.sendspace.com/file/9qn1gs)
I've tried these already:
TFM(y0=480,y1=height).TDecimate(cycler=6,cycle=10) bad
Telecide(y0=480,y1=height).TDecimate(cycler=6,cycle=10) bad
selecteven().TDecimate() better but still a lot of missing frames
srestore(frate=23.976) bad
Tried tweaking some of these with no luck. Seems like it's using the whole image to decide what frames to drop and there's no way to exclude a part of the frame, which would help greatly. Any ideas?
Thranduilion
17th October 2013, 06:07
Hi!
Try this:
mpeg2source("mf-ivtc.d2v")
fdecimate(rate=23.976)
Good luck!
mp3dom
17th October 2013, 08:01
You can try to do motion-compensated framerate change (to 24p) and apply it to the text only (it should came out quite good). Then IVTC the movie as usual and 'blend' the results together.
Sapo84
17th October 2013, 09:38
Did you try this (http://forum.doom9.org/showpost.php?p=1466105&postcount=4)?
I'm 100% sure it works with 30i on 24p content.
Invoking it with srcbob = true should work ok with 60p content.
Use it only for the scrolling text part, as it is still motion-interpolating one out of two frame (if my memory is correct).
turbojet
17th October 2013, 22:24
fdecimate(rate=23.976) worked for that clip but failed in other parts of the video, same goes for IT() and SmartDecimate(24,120). (T)Decimate seem to concentrate more on the scrolling text rather than the big picture but gets the rest of the show mostly correct with the exception of ABC's time shortening to get more ads. They also concentrate on small animated logos while the other frame removers don't. Addition of exclusions would fix this, would make a lot more sense then in the frame matchers. I can't even think of a situation where TFM/Telecide y0/y1 would be useful.
I haven't spent much time with the 60p to 24p scripts, the scrolling text can have missing frames but the show shouldn't, it's a weekly show and setting those up 20 more times seems like a lot more work then I want to spend on it. Trim with the scroller ivtc'd with fdecimate, it or smartdecimate and the rest with (T)Decimate is the most reasonable approach I can think of. Any other ideas?
Looking at the source code of tivtc and decomb there doesn't seem to be any way of copy and paste hacking y0/y1 into (T)Decimate unfortunately. Would neuron2 or tritical be interested in adding a y0/y1 function that's useful for video overlays on top of film which happens in most us tv shows? Or change it to focus on the majority of the picture, instead of what appears to be minority of the picture?
tritical
17th October 2013, 23:37
The clip2 parameter of tdecimate should already allow you to do this. TDecimate will compute metrics on the input clip, but return frames from clip2. So you could crop out the bad lines to generate the input to tdecimate, but use the original as the cilp2 clip.
turbojet
17th October 2013, 23:57
No experience with clip2, is it used like this?
DSS2("video.mpg")
A=DSS2("video.mpg").crop(0,0,0,-240)
TFM().TDecimate(clip2=A)
avs [error]: TDecimate: clip2 must have the same number of frames as the input
clip!
EDIT
DSS2("video.mpg").crop(0,0,0,-240)
A=last
TDecimate(clip2=A)
Works great, thanks!
However with interlaced source adding TFM() fails miserably. Is there any way around this?
Somewhat unrelated but is is this a good way to get 2/3 of the height?
height/3*2
tritical
18th October 2013, 05:30
With tfm:
DSS2("video.mpg")
TFM(y0=xx,y1=xx)
crop(0,0,0,-240).TDecimate(clip2=last)
or
DSS2("video.mpg")
TFM(y0=xx,y1=xx)
TDecimate(last.crop(0,0,0,-240),clip2=last)
Without tfm:
DSS2("video.mpg")
crop(0,0,0,-240).TDecimate(clip2=last)
or
DSS2("video.mpg")
TDecimate(last.crop(0,0,0,-240),clip2=last)
turbojet
18th October 2013, 06:10
The one line helps keep it clean but get the still a lot of wrongly removed frames with 30i.
Here's a clip (http://www.sendspace.com/file/t3mqbu) and the script:
dss2("F:\30i.mpg")
assumefps(30000,1001).TFM(y0=height/3*2,y1=height,clip2=tdeint()).crop(0,0,0,height/3*2).TDecimate(clip2=last)
After removing clip2 in tdecimate the correct frames are removed, although it's expectedly cropped to 1920x720. Replacing TFM with Telecide gave the same results.
With 60p sources like the one in the original post selecteven().tdecimate(clip2=last.selectevery()) works great.
Lyris
18th October 2013, 16:27
I guess there is no AVISynth function which replicates the behavior of the deinterlacing found in some BD players and video processors, where different areas of the screen get treated with the different deinterlacing methods?
I know, I know, write one. I would if I could :D
poisondeathray
18th October 2013, 21:36
I guess there is no AVISynth function which replicates the behavior of the deinterlacing found in some BD players and video processors, where different areas of the screen get treated with the different deinterlacing methods?
I know, I know, write one. I would if I could :D
His was a progressive clip
But there are some that use comb mask detection, so progressive areas are untouched , combed areas are filtered e.g. TDeint/TMM + emask . You can combine it so something like QTGMC is used on the combed parts - is that what you were getting at ?
Lyris
18th October 2013, 21:55
Oops, missed that. In that case my question wouldn't really apply, since I was talking about doing film mode deinterlacing (inverse 3:2 pulldown, etc) on most of the video, but using video mode deinterlacing for the video parts (like added text scrolls).
turbojet
18th October 2013, 23:30
The desired result has been achieved from 60p sources like in the original post. The scrolling text could probably be improved with some work but not interested in that.
The film content at 30i clip in post 9 isn't scrolling text but effects the frame remover in the same way. Haven't found a working solution for it yet. Although the same solution, tivtc, should work but it's either an issue on how I'm calling it or a tivtc bug.
I don't have any examples of film content at 30i and a scrolling text, rarely encounter it.
turbojet
23rd October 2013, 06:37
Figured it out, TFM has to be called twice. For example:
TFM(clip2=nnedi3()).crop(0,0,0,-240).TDecimate(clip2=TFM(clip2=nnedi3()))
It sounds slow but it isn't much slower than TFM().TDecimate()
AzraelNewtype
23rd October 2013, 08:03
Figured it out, TFM has to be called twice. For example:
TFM(clip2=nnedi3()).crop(0,0,0,-240).TDecimate(clip2=TFM(clip2=nnedi3()))
It sounds slow but it isn't much slower than TFM().TDecimate()
Or, you know:
tfm(clip2=nnedi3())
untouched = last
crop(0,0,0,-240)
tdecimate(clip2=untouched)
just in case you don't feel like wasting CPU cycles doing the same operation twice. I did this weekly for months.
turbojet
23rd October 2013, 19:51
Thanks that regained the 5-10% speed lost.
One more thing related to this, there's a 50x50 animated logo that's 100 px from left and 100px from top that's messing up TFM. IT and SmartDecimate handle well. Some things I thought of:
1. crop 150px from left, leaves less to match from, already excluding the bottom fourth of the picture with crop(0,0,0,-height/4)
2. crop 150px from top, leaves even less picture to match
3. overlay a black box over the animated logo, leaves the most picture but more complicated to setup, which is okay, just once added to a script
4. trim the animated scenes and use a frame remover that handles it correctly, I won't spend the time to do this for every video.
Are there any other ways?
turbojet
20th November 2013, 08:37
Cropping the bottom and then using tdecimate(clip2) has removed the wrong frames at times, without crop tdecimate works fine. Sometimes it's when there's only motion in the lower part of the frame which makes sense but at times it's motion in the upper part of the screen and it fails. I didn't save samples of the source but if someone's willing to work on tivtc I can find some again within a week or two.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.