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 Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 13th January 2008, 01:54   #1101  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
It's caused by the combination of tfm's internal motion masking (PP>4) and the external deinterlacing. If you set PP=4 instead of PP=7 (or use only nnedi as the clip2 input) the problem goes away. It's a good idea to disable tfm's internal motion masking, which is run post field matching, when using TDeint (or another motion-adaptive deinterlacer) for post-processing since TDeint's/TMM's motion masking is run on the original stream.
tritical is offline   Reply With Quote
Old 14th January 2008, 20:30   #1102  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
Recently I saw some thread about comparing various deinterlacers (and its modes) by speed and quality. Some mode of TDeint was a winner (optimal). I want point some user to it, but I can not find it. Anybody can pont me to this thread? Or it was deleted?
Fizick is offline   Reply With Quote
Old 15th January 2008, 00:23   #1103  |  Link
jeffy
Registered User
 
Join Date: Jan 2007
Posts: 943
Quote:
Originally Posted by Fizick View Post
Recently I saw some thread about comparing various deinterlacers (and its modes) by speed and quality. Some mode of TDeint was a winner (optimal). I want point some user to it, but I can not find it. Anybody can pont me to this thread? Or it was deleted?
Some hints:
http://forum.doom9.org/showthread.ph...16#post1059016

http://heptium.sh.cvut.cz/~integra/deint/
linked from:
http://forum.doom9.org/showthread.ph...011#post900011
jeffy is offline   Reply With Quote
Old 15th January 2008, 02:43   #1104  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
Quote:
Originally Posted by tritical View Post
It's caused by the combination of tfm's internal motion masking (PP>4) and the external deinterlacing. If you set PP=4 instead of PP=7 (or use only nnedi as the clip2 input) the problem goes away. It's a good idea to disable tfm's internal motion masking, which is run post field matching, when using TDeint (or another motion-adaptive deinterlacer) for post-processing since TDeint's/TMM's motion masking is run on the original stream.
Are you sure? Like I said in the post with the pictures, only modes 3 and 5 caused it, all other modes worked fine.
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it.
Chainmax is offline   Reply With Quote
Old 15th January 2008, 09:40   #1105  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
@Chainmax
Well, I was sure until I started to write an explanation of why it occurs, and it didn't actually make sense. Turns out there was a bug in modes 3/5 with micmatching > 0, which would cause tfm to sometimes return a u or b match when it thought it was returning a p, c, or n match. That error could only happen if all 5 matches were combed. I'll put up a fixed version later tonight or tommorrow.

@Fizick
I can't recall reading a thread comparing deinterlacers by both speed and quality.

EDIT:

Maybe it was this thread: http://forum.doom9.org/showthread.php?t=117025 ? It has some speed/filesize numbers plus some quality (ssim/psnr) numbers.

I did a comparison back in April 07 that I never finished, but I think that when taking both speed and quality (ssim/psnr wise) into account that it is difficult to beat:

yadifmod(mode=1,edeint=tdeint(mthreshL=0,mthreshC=0))

If only quality is considered than mcbob/mvbob are the clear winners (usually mcbob is best). If only speed is considered than the winners are leakkerneldeint/bob, yadif, or tomsmocomp (leaving out avisynth's internal bob() of course).

Last edited by tritical; 15th January 2008 at 10:21.
tritical is offline   Reply With Quote
Old 15th January 2008, 18:07   #1106  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
Thanks for responds, but it was some other thread...
I found it !

http://forum.doom9.org/showthread.php?t=133078
Fizick is offline   Reply With Quote
Old 17th January 2008, 08:25   #1107  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
TIVTC v1.0.5, changes:
Code:
- Fixed a bug that would cause tfm to return a 'u' or 'b' match when it thought it was
     returning a 'p', 'c', or 'n' match.  This problem only occured if mode was set to
     3 or 5, micmatching was enabled (not set to 0), and all five matches were combed.
tritical is offline   Reply With Quote
Old 1st February 2008, 23:33   #1108  |  Link
Mottodj
Registered User
 
Join Date: Jan 2008
Posts: 5
Hi everybody! I have question about results field maching by TFM. I have DVD with NTSC(film but without pulldown flags) anime and i pass it through TFM using avisynth. Field maching is nice but there is artifact in picture that was already mached(on fade to dark and in other way). Lines on picture have different brightness and it changing each other(ex. http://mini.100-games.ru/4super/artifact.png ). Have you ever seen that thing, what to do with this? Passing through tomsmocomp don't produce such artifact but tomsmocomp blur picture and it isn't solution...
Mottodj is offline   Reply With Quote
Old 2nd February 2008, 00:26   #1109  |  Link
Dreassica
Registered User
 
Join Date: May 2002
Posts: 384
That's not missed interlace, but common in fades. I usually just applyrange(x,x,"blur",0,0.7) it, works perfectly.
Dreassica is offline   Reply With Quote
Old 3rd February 2008, 04:13   #1110  |  Link
Leak
ffdshow/AviSynth wrangler
 
Leak's Avatar
 
Join Date: Feb 2003
Location: Austria
Posts: 2,441
Quote:
Originally Posted by Dreassica View Post
That's not missed interlace, but common in fades.
To be totally precise, that's a fade that has been applied AFTER the telecine was applied, so you have a 30 frames (or maybe even 60 fields) per second fade over pulled down 24 FPS material, so you can have either of them cleaned up, but not both - but then again, in a fade it's usually not noticeable UNLESS of course you take a screenshot...

A similar thing would be 30p/60i end credits (for extra smoothness that's easily produced) scrolling over 24p animation, which also happens often.
__________________
now playing: [artist] - [track] ([album])
Leak is offline   Reply With Quote
Old 3rd February 2008, 12:58   #1111  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
Use Vinverse for mild residual combing, not a destructive blur. Works wonders with some post-telecine editing, unless it's a very fast fade.
foxyshadis is offline   Reply With Quote
Old 5th February 2008, 05:06   #1112  |  Link
NorthPole
Registered User
 
Join Date: Jan 2006
Posts: 141
I've been using the following sort-of generic catch-all script for re-encoding ATSC digital broadcast caps to 23.976. I had a couple of questions..

Do I need to determine the order or does DGDecode_mpeg2source set the order correctly?

When converting from 59.94 fps progressive to 23.976 fps, sometimes I get some jerkiness in using the tdecimate(cycler=3, cycle=5). Is there anything I could do to tweak this?

I'm kind of lazy about counting frames in VirtualDub....Sorry

I have used the tdecimate(hybrid=1) setting on 29.97 fps to 23.976 fps and seem to get good results but I don't think I can use that for 59.94 fps conversions.

Any input would be appreciated.

PS.. Thanks tritical for you work!


Code:
DGDecode_mpeg2source("__vid__",info=3)
LoadPlugin("C:\Program Files\Media\AviSynth\plugins\tivtc.dll")
LoadPlugin("C:\Program Files\Media\AviSynth\plugins\eedi2.dll")
LoadPlugin("C:\Program Files\Media\AviSynth\plugins\tdeint.dll")
(last.height == 480)? SD(last): HD(last)
last.letterbox(4,2,2,2) # to mask screen edge noise

Function SD(video) {
ord = video.getparity() ? 1 : 0
ord == 1 ? video.AssumeTFF() : video.AssumeBFF()
edeintted = video.SeparateFields().SelectEven().EEDI2(field=ord)
tdeintted = video.TDeint(edeint=edeintted,order=ord,hints=false)
video.tfm(order=ord,clip2=tdeintted).tdecimate(hybrid=1)
#last.Lanczos4Resize(720,480,0,0,704,480)
}

Function HD(video) {
(video.height == 720)?
\ video.tfm().tdecimate(cycler=3,cycle=5):
\ video.tfm().tdecimate(hybrid=1)
}
NorthPole is offline   Reply With Quote
Old 5th February 2008, 05:47   #1113  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
Quote:
Originally Posted by NorthPole View Post
Do I need to determine the order or does DGDecode_mpeg2source set the order correctly?
mpeg2source will do that.

Quote:
When converting from 59.94 fps progressive to 23.976 fps, sometimes I get some jerkiness in using the tdecimate(cycler=3, cycle=5). Is there anything I could do to tweak this?
Well, not everything is telecined. You're sure these are, rather than true 30 or even 60 fps segments? You can try tweaking chroma, nt, and dupthresh parameters to see if they help your stuff.

Quote:
I have used the tdecimate(hybrid=1) setting on 29.97 fps to 23.976 fps and seem to get good results but I don't think I can use that for 59.94 fps conversions.
You'll get better results out of mvflowfps if you must force an fps change.
foxyshadis is offline   Reply With Quote
Old 5th February 2008, 15:28   #1114  |  Link
NorthPole
Registered User
 
Join Date: Jan 2006
Posts: 141
@foxyshadis
Thank you for the input.

Quote:
Originally Posted by foxyshadis View Post
mpeg2source will do that.
Good, I'll take it out.

Quote:
Originally Posted by foxyshadis View Post
Well, not everything is telecined. You're sure these are, rather than true 30 or even 60 fps segments? You can try tweaking chroma, nt, and dupthresh parameters to see if they help your stuff.
I believe most, if not all, is just 24p slowed down and telecined... Mostly movies and sitcoms.

If I understand the hybrid mode, it does normal 1 out of 5 decimation for 30 fps video segments provided it has a match. If it doesn't then it does blended decimation to get to 24 fps. I was kind of looking for something like that for 59.94 fps or 60 fps.

like say this...
tfm().tdecimate(cycle=2).tdecimate(hybrid=1)

I will try the dupThresh, chroma and nt options but then I think I have to use mode 1. So perhaps say something like..

tfm().tdecimate(mode=1, dupThresh=0.9, chroma=true, nt=1, cycler=3,cycle=5)
or
tfm().tdecimate(mode=1, dupThresh=1.2, chroma=false, nt=1, cycler=3,cycle=5)

Quote:
Originally Posted by foxyshadis View Post
You'll get better results out of mvflowfps if you must force an fps change.
I'm not sure what this is?

Last edited by NorthPole; 5th February 2008 at 22:22.
NorthPole is offline   Reply With Quote
Old 5th February 2008, 22:30   #1115  |  Link
NorthPole
Registered User
 
Join Date: Jan 2006
Posts: 141
I did a couple of test encodes on a 1280 x 720p ATSC cap with:

tdecimate(cycler=3,cycle=5)
and
tdecimate(cycle=2).tdecimate(hybrid=1)

I wasn't thinking earlier but I wouldn't need the field matcher, tfm, since the source is all progressive.

the frames pattern go as follows: 1 0 0 1 0 1 0 0 1 0 1 0 0 1 0 etc.

1 = new frame, 0 = duplicate frame

I get the correct resulting frame selections with both methods and the encoding time is very similar. I believe that tdecimate(cycle=2).tdecimate(hybrid=1) might be a better way to go because it could correctly handle true 24 fps and 30 fps sources. The 24 fps source would be returned to the original frame rate and the 30 fps source would be blend decimated to 24 fps and hopefully avoid any jerkiness.

I tried the dupThresh, chroma and nt options with no noticably difference however, unfortunately, I deleted the original 720p video clip that was giving me jerkiness. I will have more in the next week or two and will report whether those tweaks helped.
NorthPole is offline   Reply With Quote
Old 5th February 2008, 23:07   #1116  |  Link
rebkell
Registered User
 
Join Date: Oct 2006
Posts: 303
ABC is notorious for dropping frames, one of their favorite sequences is:
3:2
3:2
3:2
3:2
3:2
3:2
3:2
3:2
3:1
3:2
3:2
3:2
3:2
3:2
3:2
3:2
2:2

and then they repeat, it will cause the jerkiness when trying to get to the 23.9675 FPS. It works out to actually be 24.553735 FPS. I've seen it on several shows, LOST, Men In Trees, and some others, occasionally they will add an extra frame.
rebkell is offline   Reply With Quote
Old 6th February 2008, 02:34   #1117  |  Link
Adub
Fighting spam with a fish
 
Adub's Avatar
 
Join Date: Sep 2005
Posts: 2,699
Ok, so how do you deal with it?
__________________
FAQs:Bond's AVC/H.264 FAQ
Site:Adubvideo
Adub is offline   Reply With Quote
Old 6th February 2008, 03:31   #1118  |  Link
rebkell
Registered User
 
Join Date: Oct 2006
Posts: 303
Quote:
Originally Posted by Merlin7777 View Post
Ok, so how do you deal with it?
Check out this thread, I'm not sure why it's in the DVD2AVI / DGIndex section, but it is.

http://forum.doom9.org/showthread.php?t=122472

I use FDecimate, I use megui and I actually built a profile to step through the frames, normally you can determine the cadence, basically you use the metrics=true to try to determine the best threshold value to use and of course after stepping through you can determine the FPS. The cadence I posted is the most frequent one I've run into, it's not perfect, but if you can figure out a good threshold value it works pretty well. All the above will make more sense when you read the thread I linked to above. I've also run into 10 consecutive 3:2 sequences and 1 2:2, that repeats every 11 cadences(I guess that's the correct word)

I've seen some cadences on the Fox Network that I never could determine any pattern for.
rebkell is offline   Reply With Quote
Old 6th February 2008, 06:44   #1119  |  Link
Adub
Fighting spam with a fish
 
Adub's Avatar
 
Join Date: Sep 2005
Posts: 2,699
Thank you for that. I have to learn how to count fields. Anyone have a "guide" for doing it?
__________________
FAQs:Bond's AVC/H.264 FAQ
Site:Adubvideo
Adub is offline   Reply With Quote
Old 6th February 2008, 15:23   #1120  |  Link
NorthPole
Registered User
 
Join Date: Jan 2006
Posts: 141
@rebkill,

Thanks for your input... I haven't counted as many frames as you have (not fun). I will check out the thread you suggested.

@merlin777,

I just count frames in virtualdub as I go through the video manually. I don't know of any specific method or program that does it automatically.
NorthPole is offline   Reply With Quote
Reply

Tags
tdeint, tivtc

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 16:25.


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