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 17th November 2006, 14:01   #821  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
Quote:
Originally Posted by tritical View Post
What are the numerator and denominator values for the fps of the clip being fed into tdecimate (should be able to see the values using info())? Unfortunately, the mode 2 debug output doesn't tell much about what might be happening except that it isn't getting all the way through tdecimate's constructor. For mode 2 w/ 50 fps input and 29.970 rate, it should spit out:

[4548] TDecimate: v0.9.12.5 by tritical
[4548] mode2_num = 1 mode2_den = 3 numCycles = 19 clength = 15
[4548] mode2_cfs 0 = 15
[4548] TDecimate: inframe = 0 useframe = 1 rate = 29.969999

If you remove everything after tdecimate from the script does it still crash?
...
Yes, it still crashes with the error message pointing to the TDecimate line even removing everything after it, so I can't answer the firt part either.
__________________
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 17th November 2006, 17:22   #822  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
@Chainmax
Quote:
Yes, it still crashes with the error message pointing to the TDecimate line even removing everything after it, so I can't answer the firt part either.
The error msg is an access violation msg? To get the num/den values just remove tdecimate and put info() in its place:

MPEG2Source("X:\wherever\familytape.d2v",info=3)
Trim(0,1982)+Trim(2355,0)
ColorMatrix(hints=true,interlaced=true)
SecureBob()
info()

and could you post the d2v file? Also, how big is the source file? ... the easiest way to debug the problem would be to have the source, but if it's really big I'll try with just the d2v file first.

@foxyshadis
TDeint sets field to 0 if it detects hints because telecide matches off the bottom field. TFM can match off either, but it includes the field that it matched from in the hints that it passes... so TDeint uses the field value in the hints in that case.

@Mug Funky
Quote:
does this solve all the caching problems? because i've always had probs with the old smartdecimate (crash on 2nd pass start the most annoying one)
Dunno. The only problem I specifically looked at was the crashing when bob and weave were set to the same clip. If you have any other problems just post a script causing it and I'll take a look.

@canuckerfan
The d2v file without the .bad extension should be free of field order changes, so the normal tdeint/tfm script should work fine. Also, mode 4 or 5 should be unnecessary if the field order doesn't change.

@Livesms
Reading the eedi2 and tdeint help files for descriptions of the parameters would be the easiest way to tell how the scripts you posted differ from each other. The default versions of tdeint+eedi2 are:

for same rate deinterlacing:

interp = separatefields().selecteven().eedi2()
tdeint(edeint=interp)

for bobbing:

interp = separatefields().eedi2(field=-2)
tdeint(mode=1,edeint=interp)

Then add assumetff() or assumebff(), whichever the video is, just before the interp line.
tritical is offline   Reply With Quote
Old 18th November 2006, 05:31   #823  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
Quote:
Originally Posted by tritical View Post
@Chainmax

The error msg is an access violation msg? To get the num/den values just remove tdecimate and put info() in its place:

MPEG2Source("X:\wherever\familytape.d2v",info=3)
Trim(0,1982)+Trim(2355,0)
ColorMatrix(hints=true,interlaced=true)
SecureBob()
info()

and could you post the d2v file? Also, how big is the source file? ... the easiest way to debug the problem would be to have the source, but if it's really big I'll try with just the d2v file first.
...
Yes, the error message points to an access violation corresponding to the TDecimate line. The script you posted doesn't yield num/den values even if I add TDecimate in mode=7 before or after the info() line.
The source is a DVD and the VOBs occupy ~3.3GB, so unless you know of a place where I can upload at least 0.99GB at a time I'd have to snail mail it to you, which is ok y me if it comes to that. Anyway, you can download the d2v file here. Let me know when you download it so I can delete it.
__________________
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 18th November 2006, 19:57   #824  |  Link
Livesms
Registered User
 
Livesms's Avatar
 
Join Date: Mar 2006
Posts: 184
I've got 720*480 29.970fps interlaced(telecined) video. Here is the sample.


I need to reencode it to play with PAL 4:3 25p

It's look like 4:2 pattern - 4 interlaced frames and 2 progressive frames, but it looks like this has been processed before - because the first of 2 progressive frames has some artifacts that look like a bad deinterlacing.

MeGui test analyse

And suggested script is
Code:
edeintted = AssumeTFF().SeparateFields().SelectEven().EEDI2(field=-1)
tdeintted = TDeint(edeint=edeintted,order=1)
tfm(order=1,clip2=tdeintted).tdecimate(hybrid=3)
But result is not good enough.

What can you suggest - is it possible to turn such video to 4:3 x 25p?
Livesms is offline   Reply With Quote
Old 18th November 2006, 20:50   #825  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
@Livesms - that's fieldblended crappola. The underlying "true" framerate seems to be 22 fps, perhaps 22.5 fps. (Not in the mood now to count exactly )
Pretty strange source. Qualified for cabinet of curiosities ...
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 18th November 2006, 21:00   #826  |  Link
Livesms
Registered User
 
Livesms's Avatar
 
Join Date: Mar 2006
Posts: 184
Quote:
Originally Posted by Didée View Post
@Livesms - that's fieldblended crappola. The underlying "true" framerate seems to be 22 fps, perhaps 22.5 fps. (Not in the mood now to count exactly )
Pretty strange source. Qualified for cabinet of curiosities ...
You say 22fps source was telecined to 29.97 with 4:2 pulldown?

So is it possible to correct this source and make it 25fps progressive?

I tried
Code:
AssumeTFF()
ConvertToYUY2()
Bob(height=576) 
BicubicResize(768,576)
ConvertFPS(50)  
SeparateFields.SelectEvery(4,0,3)
Weave()
Look not bad 25i but now there is mixed video with some progressive frames and some interlaced.
Livesms is offline   Reply With Quote
Old 18th November 2006, 21:10   #827  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
Correcting myself: after having a 2nd look, it seems to have been standard 23.976fps film that has been blendconverted. (the source is so crappy, it's not trivial for the naked eye to decide what's a blend and what should be "assumed clean" )

Restore24 doesn't play too well with this source: result is jumpy. Try MOmonster's solutions, or the manual deblending approach (blow_up_fps plus SelectEvery(offset) ) that scharfis_brain did show several times.


Edit:

Seems like I'm telling nothing but nonsense this evening, and R24 is more reliable than my eyes.
I got this result, using
Code:
Restore24(numr=2500,deno=5994,useLL=false,fulltriples=false,fra=1,frr=1,edgetype=1,r24size=0.7,nr=-5,ldmp=128.0)
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)

Last edited by Didée; 18th November 2006 at 21:33.
Didée is offline   Reply With Quote
Old 18th November 2006, 21:13   #828  |  Link
Livesms
Registered User
 
Livesms's Avatar
 
Join Date: Mar 2006
Posts: 184
Quote:
Originally Posted by Didée View Post
Correcting myself: after having a 2nd look, it seems to have been standard 23.976fps film that has been blendconverted. (the source is so crappy, it's not trivial for the naked eye to decide what's a blend and what should be "assumed clean" )

Restore24 doesn't play too well with this source: result is jumpy. Try MOmonster's solutions, or the manual deblending approach (blow_up_fps plus SelectEvery(offset) ) that scharfis_brain did show several times.
Ok. Thanks - I'll try.

Quote:
Originally Posted by Didée View Post
Seems like I'm telling nothing but nonsense this evening, and R24 is more reliable than my eyes.
I got this result, using
Code:
Restore24(numr=2500,deno=5994,useLL=false,fulltriples=false,fra=1,frr=1,edgetype=1,r24size=0.7,nr=-5,ldmp=128.0)
1.38 fps as a result - but total number of frames are correct for 25fps - so I should just andd AssumeFPS(25.00)?

Last edited by Livesms; 18th November 2006 at 21:49.
Livesms is offline   Reply With Quote
Old 18th November 2006, 22:38   #829  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
@Chainmax
Could you try these two scripts and see if either crashes:

blankclip(length=287626,pixel_type="YV12",width=720,height=576,fps=50,fps_denominator=1)
tdecimate(mode=2,rate=29.97,debug=true)

blankclip(length=287626,pixel_type="YV12",width=720,height=576,fps=50,fps_denominator=1)
tdecimate(mode=2,rate=29.97,input="stats.txt",debug=true)

you'll have to generate a stats file for the second, but it should be very fast to make. The blankclip clip should be exactly the same as the clip going into tdecimate in your case except for the actual imagecontent. Both scripts work fine here.
tritical is offline   Reply With Quote
Old 19th November 2006, 00:37   #830  |  Link
Terranigma
*Space Reserved*
 
Terranigma's Avatar
 
Join Date: May 2006
Posts: 953
tritical, will there be an update to Tdeint in the future, and if so, will it have this function Here that you and I were discussing?

It's seems like it'd function similar to the AdaptOvr script I once requested, which i'll be happy with either or.
Terranigma is offline   Reply With Quote
Old 19th November 2006, 01:38   #831  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
There will be one in the next week sometime. I've already added the tswitch function, fixed the problem with reading tfm's hints when passing through dgdecode's hints, and added a new blend deinterlacing mode. The remaining items are outputting a map and the deinterlaced frame at the same time (should be quick to add) and having the motion detection correctly handle the top/bottom lines (did about half of this already). Atm, I am messing other things.. neural network based edi, phase plane correlation motion estimation, and trying to improve some pso variations (clpso/dms-pso) for very high dimensional optimization (that last one is for school, but I'm using dms-pso/clpso to train the nn's for my nn-edi attempt).
tritical is offline   Reply With Quote
Old 19th November 2006, 10:55   #832  |  Link
buzzqw
HDConvertToX author
 
Join Date: Nov 2003
Location: Cesena,Italy
Posts: 6,552
i have a little problem

this script

Code:
Import("C:\holding zone c\createautodeintmovie.avs") #original script filename
global unused_ = blankclip(pixel_type="yv12", length=10).TFM()
file="C:\holding zone c\createautodeintmovie.avs.bautodeint_temp.data"
global sep="-"
function IsMoving() {
  global b = (diff < 1.0) ? false : true}
c = last
global clip = last
c = WriteFile(c, file, "a", "sep", "b")
c = FrameEvaluate(c, "global a = IsCombedTIVTC(clip, cthresh=9)")
c = FrameEvaluate(c, "IsMoving")
c = FrameEvaluate(c,"global diff = YDifferenceFromPrevious(clip)")
crop(c,0,0,16,16)
SelectRangeEvery(15,15,0)
and this is "createautodeintmovie.avs"

Code:
LoadPlugin("C:\Programmi\PureBasic4\AutoMKV\exe\filter\dgdecode.dll")
LoadPlugin("C:\Programmi\PureBasic4\AutoMKV\exe\filter\decomb.dll")
LoadPlugin("C:\Programmi\PureBasic4\AutoMKV\exe\filter\TIVTC.dll")
movie = mpeg2source("C:\holding zone c\movie.d2v")
return movie
will produce some errors in "bautodeint_temp.data" (the log file), example (and all row are the same)

Code:
I don't know what "a" means-true
I don't know what "a" means-true
I don't know what "a" means-true

where is the error ?

thanks !

BHH
__________________
HDConvertToX: your tool for BD backup
MultiX264: The quick gui for x264
AutoMen: The Mencoder GUI
AutoWebM: supporting WebM/VP8
buzzqw is offline   Reply With Quote
Old 20th November 2006, 06:55   #833  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
Quote:
Originally Posted by tritical View Post
@Chainmax
Could you try these two scripts and see if either crashes:

blankclip(length=287626,pixel_type="YV12",width=720,height=576,fps=50,fps_denominator=1)
tdecimate(mode=2,rate=29.97,debug=true)

blankclip(length=287626,pixel_type="YV12",width=720,height=576,fps=50,fps_denominator=1)
tdecimate(mode=2,rate=29.97,input="stats.txt",debug=true)

you'll have to generate a stats file for the second, but it should be very fast to make. The blankclip clip should be exactly the same as the clip going into tdecimate in your case except for the actual imagecontent. Both scripts work fine here.
The first script works perfectly. I'll get to the second one soon.


The second one loads fine as well .
Maybe it's just some Avisynth weirdness on my end, so I guess I'll stick to either mode=0 or mode=7, could you tell me the pros and cons of either and on what kind of source they would perform better than the other?
__________________
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.

Last edited by Chainmax; 20th November 2006 at 15:50.
Chainmax is offline   Reply With Quote
Old 20th November 2006, 22:51   #834  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Code:
Import("C:\holding zone c\createautodeintmovie.avs") #original script filename
global unused_ = blankclip(pixel_type="yv12", length=10).TFM()
file="C:\holding zone c\createautodeintmovie.avs.bautodeint_temp.data"
global sep="-"
global diff=1.0
global a=true
function IsMoving() {
  global b = (diff < 1.0) ? false : true}
c = last
global clip = last
c = WriteFile(c, file, "a", "sep", "b")
c = FrameEvaluate(c, "global a = IsCombedTIVTC(clip, cthresh=9)")
c = FrameEvaluate(c, "IsMoving")
c = FrameEvaluate(c,"global diff = YDifferenceFromPrevious(clip)")
crop(c,0,0,16,16)
SelectRangeEvery(15,15,0)
does that work?
Wilbert is offline   Reply With Quote
Old 20th November 2006, 23:07   #835  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
Should I cut&paste that into a script and try to load it?
__________________
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 21st November 2006, 08:26   #836  |  Link
buzzqw
HDConvertToX author
 
Join Date: Nov 2003
Location: Cesena,Italy
Posts: 6,552
@Wilbert

Yes ! is working... now i will ask Berrinam to update BAutoDeint.exe

thanks again

BHH
__________________
HDConvertToX: your tool for BD backup
MultiX264: The quick gui for x264
AutoMen: The Mencoder GUI
AutoWebM: supporting WebM/VP8
buzzqw is offline   Reply With Quote
Old 21st November 2006, 11:10   #837  |  Link
Livesms
Registered User
 
Livesms's Avatar
 
Join Date: Mar 2006
Posts: 184
I'm sorry. Could anybody tell me what does it script for
Code:
Import("C:\holding zone c\createautodeintmovie.avs") #original script filename
global unused_ = blankclip(pixel_type="yv12", length=10).TFM()
file="C:\holding zone c\createautodeintmovie.avs.bautodeint_temp.data"
global sep="-"
global diff=1.0
global a=true
function IsMoving() {
  global b = (diff < 1.0) ? false : true}
c = last
global clip = last
c = WriteFile(c, file, "a", "sep", "b")
c = FrameEvaluate(c, "global a = IsCombedTIVTC(clip, cthresh=9)")
c = FrameEvaluate(c, "IsMoving")
c = FrameEvaluate(c,"global diff = YDifferenceFromPrevious(clip)")
crop(c,0,0,16,16)
SelectRangeEvery(15,15,0)
and where can I find createautodeintmovie.avs script. From script name I see it has some auto function for TDeint - does it mean this script analyse video and chose best setting for deinterlace?
Livesms is offline   Reply With Quote
Old 21st November 2006, 13:25   #838  |  Link
buzzqw
HDConvertToX author
 
Join Date: Nov 2003
Location: Cesena,Italy
Posts: 6,552
http://forum.doom9.org/showthread.php?p=765485

not truly create an avs to deinterlace BUT analyze the clip, and find the "interlace pattern"

watch at result and then apply something like....

Code:
interlaced: LeakKernelDeint(order=xxx)
decimating: tfm(movie.d2v).tdecimate()
partly film: tfm(d2v="movied2v").tdecimate(hybrid=1)
film:tfm(d2v="movie.d2v").tdecimate()
partly interlaced:
edeintte=last.SeparateFields().SelectEven().EEDI2(field=-1)
TDeint(full=false,edeint=edeintted)
(as automkv do...)

BHH
__________________
HDConvertToX: your tool for BD backup
MultiX264: The quick gui for x264
AutoMen: The Mencoder GUI
AutoWebM: supporting WebM/VP8
buzzqw is offline   Reply With Quote
Old 24th November 2006, 11:19   #839  |  Link
Valeron
Registered User
 
Join Date: Feb 2004
Location: Canton
Posts: 230
hi, i'm new to tdeint and found it's not easy to tweak it for some stuff.

here's a sample


i've tried lowering the mthresh and cthresh to try catch the comb, type 1 and 3 are also employeed.
any parameter i missed can help improve the result?

btw, tomsmocomp(1,5,1) give me far better result, at least, no comb left, but i found the result a bit smeared.

Last edited by Valeron; 24th November 2006 at 11:28.
Valeron is offline   Reply With Quote
Old 24th November 2006, 12:45   #840  |  Link
AVIL
Registered User
 
Join Date: Nov 2004
Location: Spain
Posts: 408
Hi,

Could be a problem of field ordering. To test it, use tdeint with only the parameter "order". Admits three value. -1, 0, 1. Try with 0 and 1. If the result is good with parameter 0 then your video is bff. If the resutl is good with parameter 1 your video is tff. In none is good, then really tdeint is not well suited. But is the first case I've heard of. Anyway is convenient post also the script used.

Good luck
AVIL 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 08:40.


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