digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Concern with RemoveDirt (http://www.digitalfaq.com/archives/avisynth/12102-avisynth-concern-removedirt.html)

Dialhot 09-13-2004 07:48 AM

Avisynth: Concern with RemoveDirt
 
First the two scripts :
Test1
Code:

Mpeg2Source("D:\Mes KVCD\ID4.d2v",cpu=4,idct=7,iPP=true)
Telecide(order=1)
DRemoveGrain(mode=8)

Test2
Code:

Mpeg2Source("D:\Mes KVCD\ID4.d2v",cpu=4,idct=7,iPP=true)
Telecide(order=1)
DRemoveGrain(mode=8)
RemoveDirt()

The result:
Test1http://www.digitalfaq.com/archives/error.gif
Test2http://www.digitalfaq.com/archives/error.gif
(surely something to do in the thresholds but I don't have to time look further right now)

If anyone has an idea that will prevent me to trash Removedirt... :?

incredible 09-13-2004 08:38 AM

Time to play using the parameters ;-)

Look at http://www.removedirt.de.tf/
and there under "All Variables at a Glance"

My first step would be setting a mthreshold=100

And also try lowering Removgrain!


My recommendation: First try filtering only using removedirt(.....) as that one keeps more details as it works temmporal.
If that one isnt enough (mostly on captures sources) THEN you give removedirt a hand by applying a removegrain(x) before.

BTW: In cases of using crop, use everytime
Removegrain(....) THEN crop(........,align=true) and THEN Removedirt.
(explanation in the readme)

Dialhot 09-13-2004 08:59 AM

Quote:

Originally Posted by incredible
Look at http://www.removedirt.de.tf/
and there under "All Variables at a Glance"

I al ready read the manual ;-). And the matter is : there are TOO much parameters. And the doc does not explain a lot what to do with all of them :-)

Quote:

And also try lowering Removgrain!
I was sure you will say that but... the second snapshot have been actually taken WITHOUT the removegrain line (even if I discovered the problem WITH the RemoveGrain line present).

EDIT: just did a test with mtreshold=100 -> same problem. with 50 -> same. With 10 the problem has vanished :-)
The question is : is the filter still efficient with a such low threshold ? Some more tests to do !


Edit2: the problem is that with "mtheshold=100" added in the script, ECLCCe does not accept it anymore 8O

Dialhot 09-13-2004 10:11 AM

Okay, the problem comes from the decombing.
If I use Bob insteed of Telecide, all is okay. The problem now :

1/ I'm not sure using Bob is correct here
2/ I don't manage to quope with double framecount introduced by bob. I don't want to use Weave (that does not seems to works BTW :x) because I need a progressive clip. Decimate(cycle=2) perhaps ?

Help !

I HATE HAVING INTERLACED SOURCES :-(

Edit: Finally fixed the problem with this script :
Code:

Mpeg2Source("D:\Mes KVCD\ID4.d2v",cpu=4,idct=7,iPP=true)
KernelBob(order=1,sharp=true,threshold=7)
DRemoveGrain(mode=8)
RemoveDirt()
Decimate(cycle=2)

Thanks to anyone.
(I love to talk to myself :-))

incredible 09-13-2004 11:07 AM

Quote:

Originally Posted by Dialhot
Edit2: the problem is that with "mtheshold=100" added in the script, ECLCCe does not accept it anymore 8O

Ok now its official! :D

I also reported to kassandro that DVDrebuilder does output an error when Removedirt with mtreshold set was placed into the avs script :lol:
Boulder also got such problems and we first assumed that SelectRangeEvery does cause a memory conflict. As OVP in DVDrebuilder uses SelectRangeEvery.

So ECLCCE seems to have the problem ;-)
We should report that to Kassandro, so please do post the exact error output and Ill write to Kassandro.

Dialhot 09-13-2004 11:28 AM

Quote:

Originally Posted by incredible
So ECLCCE seems to have the problem ;-)
We should report that to Kassandro, so please do post the exact error output and Ill write to Kassandro.

If I change mthreshold, ECLCCe complains that the clip is "754*56" that means that there is an avisynth error (the famous ...*56) even if the clip is okay with virtualdubmod.

If I change pthreshold, ECLCCe opens the clip but when I laucnh the job, the ouput video is just a "red letter on black background" crap....

incredible 09-13-2004 11:45 AM

Quote:

Originally Posted by Dialhot
Okay, the problem comes from the decombing.
If I use Bob insteed of Telecide, all is okay. The problem now :

1/ I'm not sure using Bob is correct here
2/ I don't manage to quope with double framecount introduced by bob. I don't want to use Weave (that does not seems to works BTW :x) because I need a progressive clip. Decimate(cycle=2) perhaps ?

Help !

I HATE HAVING INTERLACED SOURCES :-(

Edit: Finally fixed the problem with this script :
Code:

Mpeg2Source("D:\Mes KVCD\ID4.d2v",cpu=4,idct=7,iPP=true)
KernelBob(order=1,sharp=true,threshold=7)
DRemoveGrain(mode=8)
RemoveDirt()
Decimate(cycle=2)

Thanks to anyone.
(I love to talk to myself :-))

If that movie from above "insurrection" is the one (???), then you dont deal with an interlaced source which can easely treaten with a simple bobbing and discarding every 2nd field!

Real interlaced means: Every FIELD gots his unique (movement) information and its unique!
Fieldblended interlaced means that some fields will be doubled/blended to get the right fildrate (convertfps(xx)), then the bobber will be restored by separatefields().selectevery(4,1,2) means drop every forth by two.
Thats almost the same as stupid converter boxes do their work.

Do take your script and let ONLY the bobber process.

Do count the "correct" bobbed frames out of 50 bobbed frames.

It could be that your "pattern" will look like this:

pbpbpbpbpbpbbpbpbpbpbpbp......

P= a clean progressive (bobbing resulted) frame
b= a blended (bobbing resulted) frame = the result out of the fieldblended "normconversation" from 29.976NTSC to 25PAL DVD.

If you can see one of such "b" blended frames out of the bobbed 50fps then you CANT just bob and discard every 2nd frame!

So the question is: DO YOU STILL perform on that insurrection extra????? :?: :!:


BTW The removeX series arent crap at all, Kassandro only should do that fixing due ECLCCE problems ;-)

Do you wanna know how that by MarcFD bad core programmed filter deen() made me some nights to stay awake as you CANT intergate it into a scriptclip() fuction???? :evil: *F U ..* :)
The memory flows over and access violations are the result after some seconds!

Dialhot 09-13-2004 11:51 AM

Quote:

Originally Posted by incredible
If that movie from above "insurrection" is the one (???)

hum... ID4... Independance day if you rather :-)

And it is purely interlaced. So any idea ?

Note: I'm doing pure PAL works here !

incredible 09-13-2004 11:58 AM

You could get your Extras using a heavy way to a good progressive testing source:

- Do trim the source into the parts

a) orig.Video (which where originally REAL 29.976 Video, like the interviews)
b) orig Film ones (which where originally telecined from 23.976 to 29.97)

Related to a) : Try Intellibob() in combination with unblendpattern(), but if Scharfis_Brain would be here, he could tell you the best way.
This method needs from you to count the "correct" number of frames "p" out of the bobbed stream and then do set that value to unblendpattern.
But pray to god that they didnt have done the cutting on the raped 25fps DVD target! As that means pattern offsets!

b) Do get Restore24() package from Dideé at doom9 and I hope you got a fast machine as that one restores the 23.976 out of the bad converted 25fps. But that function still is not perfect but a fascinating work of Didée.

Dialhot 09-13-2004 12:04 PM

Quote:

Originally Posted by incredible
a) orig.Video (which where originally REAL 29.976 Video, like the interviews)

I AM NOT DOING THE INSURRECTION EXTRAS !
ID4 is the title of the movie. And this is the imdb record to be sure you won't confuse it anymore :-)
http://us.imdb.com/title/tt0116629/


Quote:

b) orig Film ones (which where originally telecined from 23.976 to 29.97)
I AM DOING PURE PAL ENCODING ! PAL means twenty five frames per second. Nothing else.

Are you so tired ? :-)

incredible 09-13-2004 12:04 PM

Quote:

Originally Posted by Dialhot
Quote:

Originally Posted by incredible
If that movie from above "insurrection" is the one (???)

hum... ID4... Independance day if you rather :-)

And it is purely interlaced. So any idea ?

Note: I'm doing pure PAL works here !

YEAH I GOT AN IDEA! *lol*

The PAL version of Independence day got dynamical phase shifts (sorry but exactly BOTH sources you mentioned are exactly known for bad ones which have been converted to PAL).


On Indep.Day try

a) doubleweave().selectodd() .... means shifting one field.

or

b) Telecide(order=1,guide=2,post=0) .... which will probably do the job as it gets rid of dynamical phase shifts.!

incredible 09-13-2004 12:07 PM

Quote:

Originally Posted by Dialhot
Quote:

b) orig Film ones (which where originally telecined from 23.976 to 29.97)
I AM DOING PURE PAL ENCODING ! PAL means twenty five frames per second. Nothing else.

Are you so tired ? :-)

NOPE! But Im more in the deep as I see you did understand me :lol:

I talked about 25fps PAL sources which have been converted from HYBRID NTSC streams! .... but as you dont deal with the extras like above .... that case is off

EDIT: The confusion in here is that you answer faster than I can post MY answer :wink:

Dialhot 09-13-2004 12:12 PM

Quote:

Originally Posted by incredible
Independence day got dynamical phase shifts

What the hell is that ?

Quote:

b) Telecide(order=1,guide=2,post=0) .... which will probably do the job as it gets rid of dynamical phase shifts.!
And give RemoveDirt problems. Remember, this is where all this thread started :-)
(even if with these parameters things a slightly better than with the defaults)

Same problem with doubleweave().selectodd() : Removedirt gives "stairs" into the lights.

Note: I don't catch the difference between Bob.Decimate(cycle=2) and DoubleWeave.Selectodd. In both we drop the second field, don't we ?

incredible 09-13-2004 12:28 PM

Quote:

Originally Posted by Dialhot
Quote:

Originally Posted by incredible
Independence day got dynamical phase shifts

What the hell is that ?

Code:

From Scharfis_Brains Page:

Movieframe      A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z
---------------------------------------------------------------------------------------------
Videofield1  *  A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z
Pairs          /  /  /  /  /  /  /  /  /  /  /  /  /  /  /  /  /  /  /  /  /  /  /  /  /  /
Videofield2    A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z

http://home.arcor.de/scharfis_brain/...rlacing/#2.1.2
(babelfish's your friend)

Do a

Separatefields()
Trim(1,0)
Weave()

... on a CLEAN progressive source

And you got your LINEAR phase shift - a simple telecining by keeping the framerate. And dynamical phase shifts (also called field shifts) the offsets do change dynamically. THAT for example happens when you perform a TEECINING on 23.976. Means the Needed Frames will be doubled and for avoiding a jerky motion a dynamical phase shift does result in a "combed" look but on TV its smoooooth ;-)


Quote:

Note: I don't catch the difference between Bob.Decimate(cycle=2) and DoubleWeave.Selectodd. In both we drop the second field, don't we ?
Because its NOT the right way as you cant affect the fieldorder!

Bobber()
Selecteven() or Selectodd() ... choose the right one to get kept the source fieldorder. (in this case by keeping the stream bobbed and not reinterlaced no matter but I reccomedn you to get used to selecteven/odd!


All times are GMT -5. The time now is 02:40 PM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2022 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2022 Jelsoft Enterprises Ltd.