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
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 10th December 2005, 23:49   #141  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
"trust" parameter value is threshold. If real trust of current frame is below "trust", motion compensation will be disabled.

P.S. Why you sometimes do not disable your long signature? I already read it.
Fizick is offline   Reply With Quote
Old 16th December 2005, 19:48   #142  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
Well, I tried your suggestion and the black bars are indeed gone, but since they are so thick the mirroring becomes very evident. I guess I should stick to using

Code:
i=ConvertToYV12()
mdata=DePanEstimate(i)
r=2 # interleaveradius
DePanInterleave(i,data=mdata,prev=r,next=r)
yourfiltershere()
selectevery(r+r+1,r)
DePanStabilize(last,data=mdata)
and if that doesn't work (like in this case) then just accept that motion compensation can't be done.
__________________
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 16th December 2005, 19:59   #143  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
By the way, I'm going to try the combination on another video I have, would this script

Code:
i=ConvertToYV12()
r=1
MData=DePanEstimate(i)
DePanInterleave(i,Data=MData,Prev=r,Next=r,Mirror=15)
DeDot()
FixChromaBleeding()
Crop(whatever,align=true)
Cnr2("xxx",4,5,255)
DeBlock_QED()
DeGrainMedian(mode=0)
SelectEvery(r+r+1,r)
GaussResize(656,448,p=100)
DePanStabilize(last,data=mdata,Prev=r,Next=r,Mirror=15)
DeHalo_Alpha()
LimitedSharpen(SMode=4,LMode=3)
AddBorders(24,16,24,16)
be ok?
__________________
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; 16th December 2005 at 20:03.
Chainmax is offline   Reply With Quote
Old 17th December 2005, 03:56   #144  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
1. Motion compensation (for best denoising) and motion stabilization (deshaking) are different things. So, if you want decrease mirrored borders (and the strength of motion stabilization), try increase cutoff parameter (of DePanStabilize in my suggestion script) to about 4. Only high frequency vibration (above cutoff) will be stabilized.

2. Too many questions. But your second script is not correct.
2.1 You must use second DeOanEstimate after resize. Do you understand the my script?
Please, re-read my post http://forum.doom9.org/showthread.ph...324#post749324
2.2 If you use many temporal denoisers, else increase the r parameter
or use DePaninterleave(data=mdata).SomeTemporalFilter(...).Selectevery(3,1) block for every temporal filter.
2.3 Why crop?

Last edited by Fizick; 17th December 2005 at 03:58.
Fizick is offline   Reply With Quote
Old 28th December 2005, 15:02   #145  |  Link
krieger2005
Registered User
 
krieger2005's Avatar
 
Join Date: Oct 2003
Location: Germany
Posts: 377
I have noticed a strange behaivor with depan. I used it on a relativly static scene and set "trust" to 2. Then i let show me the info of "DepanEstimate". The "strange" was, that when info show a trust below 2 it show also "SCENE CHANGE!". When trust was above 2 it show me not scene-change. I thought, that on high motion/many changes it would be classified as "scene-change" and not on low motion/less changes in the frames.

Here my script:
Code:
h=height
i=StackVertical(SelectEvery(3,0), SelectEvery(3,1), SelectEvery(3,2))
i=RemoveDirt(i,mthreshold=80, pthreshold=3, tolerance=12).RemoveGrain(17)
i=interleave(crop(i,0,0,width,h), crop(i,0,h,width,h), crop(i,0,h*2,width,h))

mdata=DePanEstimate(i,range=2, trust=2, info=true)
krieger2005 is offline   Reply With Quote
Old 28th December 2005, 16:28   #146  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
It is by design.
trust - limit of relative maximum correlation difference from mean value at scene change.
Fizick is offline   Reply With Quote
Old 28th December 2005, 20:08   #147  |  Link
krieger2005
Registered User
 
krieger2005's Avatar
 
Join Date: Oct 2003
Location: Germany
Posts: 377
This is not logical for me. Can you explain what you exactly thought when you implement this this way? Why do you make it so?
Sorry, but this sentense i does not unterstand: limit of relative maximum correlation difference from mean value at scene change
krieger2005 is offline   Reply With Quote
Old 28th December 2005, 22:45   #148  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
To detect scenechange and not compensate (stabilize) motion across this scenechange.
Frames correlation is the best way to detect scanenange.
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 28th December 2005, 23:29   #149  |  Link
krieger2005
Registered User
 
krieger2005's Avatar
 
Join Date: Oct 2003
Location: Germany
Posts: 377
But why the filter make something to a "scene-change" when there is no movement? Again: When i set a value to "trust" the frame correlation must be lower than this "trust"-value to be a scene-change? Is it not the different way, that the frame correlation must be higher than the "trust"-value to became a scene-change, because lower frame correlation values mean lower movement, or not? Sorry, i'm a little bit confused.
krieger2005 is offline   Reply With Quote
Old 29th December 2005, 10:55   #150  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
Current frames correlation must be lower than the "trust" parameter value to became a scene-change.
You get different processing?
I am confused.
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 30th December 2005, 16:11   #151  |  Link
krieger2005
Registered User
 
krieger2005's Avatar
 
Join Date: Oct 2003
Location: Germany
Posts: 377
You are right. It seems to be something with the clip. Thanks
krieger2005 is offline   Reply With Quote
Old 17th January 2006, 01:23   #152  |  Link
Beave
Registered User
 
Join Date: Nov 2001
Posts: 205
I posted my problem in two other threads as well, but I still wanna ask here, because I tried your plugin.

I have a few 720p capture that shakes about one line up and down. So the whole image moves by one pixel. I don't wanna correct any other shaking. I used:
mdata = DePanEstimate(i)
DePanStabilize(i, data=mdata, dymax=1, dxmax=0, info =false)


Now not all the shaking is caught and it seems only parts of the image move. But it is smoother then before.
Could I only specify for example the bottom 20 lines for finding the shaking? There is a small black edge where I can see the picture moving quite easily.

Sorry for bothering you and thank you for your great plugins!
Beave is offline   Reply With Quote
Old 22nd February 2006, 13:37   #153  |  Link
Beave
Registered User
 
Join Date: Nov 2001
Posts: 205
I'm getting closer to solving my problem. I used this script to first analyze only the bottom border:

mpeg2source("test_720p.d2v")
Trim(0,400)
i = ConvertToYV12()
j = ConvertToYV12().crop(0,712,-0,-0)
mdata = DePanEstimate(j,info=false)
DePanStabilize(i, data=mdata, dymax=1, dxmax=0, info=true)

Now I can see the data being diplayed on the video. the "dy" is either between -0.15 and +0.10 or between +0.25 and +0.55 when the video jumps. Now I now the values, but how do I translate that into my DePanStabilize function? So I have the sweet spot at around 0.18 and I want the picture to shift one pixel up when going over that threshold. How do I do that?

Thanks for the help in advance!
Beave is offline   Reply With Quote
Old 10th May 2006, 07:34   #154  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
Restrict to only X direction: Is this possible?

I want to only compensate in the X direction. I thought I could do this by setting dymax=0, but this has no effect. I describe the reasons for this script in this thread: http://forum.doom9.org/showthread.ph...ighlight=depan

Here is the script:
Code:
# Script to recover film frames from film projected on shutterless 16mm projector.
# Second Pass
# Copyright 2006 John H. Meyer
# Revision May 9, 2006
#-----------------------------

loadPlugin("c:\Program Files\AviSynth 2.5\plugins\TIVTC.dll")
loadPlugin("c:\Program Files\AviSynth 2.5\plugins\Depan.dll")
loadplugin("c:\Program Files\AviSynth 2.5\plugins\MultiDecimate.dll")

AVISource("D:\OPRFHS\Intersquad 1st reel)0002.avi")

converttoYUY2(interlaced=true)
AssumeBFF()
tfm(display=false,micout=2,mode=0,cthresh=45,mi=1600,pp=6,metric=0,field=1,micmatching=2,slow=2,blockx=256,blocky=256,sco=-1,debug=false,input="d:\tfm.txt")

a=MultiDecimate(pass=2) 
b=AssumeFrameBased(a)
c=b.separatefields()
d=c.colorYUV(autogain=true)

e=interleave(blankclip(c),selectodd(c),selecteven(c),blankclip(c))
f=interleave(blankclip(d),selectodd(d),selecteven(d),blankclip(d))

mdata2 = DePanEstimate(f,range=1,dxmax=32,dymax=0,pixaspect=0.9091,info=false) 
g=e.Depan(data=mdata2,matchfields=false,offset=1,info=false)
h=g.selectevery(4,2,3)
i=h.ComplementParity().weave()
AssumeFPS(18)

i
As you can see, I use an exposure-compensated version (d) to generate the depan parameters, and then use these parameters to compensate the original. I then force a scene change after each pair of fields by inserting two blank fields (thanks to Avil for that hint). Thus, only the second of each pair of fields is shifted, and it only uses the information between from the previous field, which is what I want.

The problem is that this second field is shifting vertically as well as horizontally. I have tried using small non-zero settings for dymax, but it doesn't seem to do anything.

The depan.dll reports version 1.7.0.0, and is dated 9/5/2005.

I also am trying to figure out how to get the framecount back to where it should be. The Interleave function with the blank frames added doubles the frame count so I end up with the second half of the video being duplicates of the last frame. I can probably figure that out eventually, but the dymax has got me stumped.
johnmeyer is online now   Reply With Quote
Old 24th May 2006, 19:06   #155  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
Probably I can add option "not estimate dy" in next version (in preparation, with some improvement in DePanstabilization), if you are still interested in it.
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 25th May 2006, 01:29   #156  |  Link
Alain2
Registered User
 
Join Date: May 2005
Posts: 236
Quote:
some improvement in DePanstabilization
I am definitely, I have some bugs with current version (or I don't understand what I am doing with parameters, which is also possible but i doubt it)
Thank you Fizick
Alain2 is offline   Reply With Quote
Old 25th May 2006, 02:06   #157  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
It would help to be able to turn off dy, but I have a workaround I've created, so I am OK for now.
johnmeyer is online now   Reply With Quote
Old 25th May 2006, 05:04   #158  |  Link
JuanC
Registered User
 
Join Date: May 2002
Posts: 220
Quote:
Originally Posted by Fizick
Probably I can add option "not estimate dy" in next version (in preparation, with some improvement in DePanstabilization), if you are still interested in it.
It is really interesting!
Quote:
Originally Posted by johnmeyer
It would help to be able to turn off dy, but I have a workaround I've created, so I am OK for now.
I will appreciate if you share how you managed to work around it.
JuanC is offline   Reply With Quote
Old 25th May 2006, 15:26   #159  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
I will appreciate if you share how you managed to work around it.

My workaround is very specific to my application. You have to go back and look at my earlier posts, but I am transferring film to video using a patent-pending process that I developed where I remove the shutter from a film projector, videotape by pointing the camera directly at the lens, and then, using software available for AVISynth, remove redundant frames, and frames where the film is being pulled down. This leaves me with two fields of video for every frame of film. Unfortunately, when a film projector is run at full speed, the film never quite comes to rest in the film gate (it is only there for a few milliseconds before the next frame of film is pulled down). I was therefore trying to remove the residual horizontal motion. I preferred to leave the residual vertical motion in order to get the proper offset between fields (they need to be offset vertically by one scan line). However, since I couldn't get dy=0 to work, I just let Depan line them up vertically, and then used AVISynth commands to move the odd fields by one scan line. The results are not quite as good as I wanted, but better than if I don't do the correction.
johnmeyer is online now   Reply With Quote
Old 15th June 2006, 01:43   #160  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
I am trying to make a conversion from 15fps to 23.976fps using DePan, but even after reading the corresponding portion of DePan's readme several times, I haven't been able to figure out how to do it. Can someone help me out?
__________________
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
Reply


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 04:18.


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