Quantcast KVCD: Strange Ghost Effect on Some Scenes? - digitalFAQ.com Forums [Archives]
Go Back    digitalFAQ.com Forums [Archives] > Video Production Forums > Video Encoding and Conversion

Reply
 
LinkBack Thread Tools
  #1  
07-27-2003, 10:20 PM
AgNa AgNa is offline
Free Member
 
Join Date: Jan 2003
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Ok I first though it was a problem caused by the use of AsumeFPS() line on my script but I tested it without it and I get this (right click and save as plz)

what is causing that efect? first time it happens to me, this is the 3rd movie I`m doing with AVS 2.5.x, and I didn`t noticed something like this in the others heres my script
Code:
## Defined Variables and Constants ## 
# 
MaxTreshold = 1.50 
nf =  0 # Current frame. 

# 
AviSource("D:\Movies-videos\test\test.avi") 
# 
undot() 
Limiter() 
asharp(1, 4) 
GripCrop(704, 480, overscan=2) 
GripSize(resizer="BicubicResize") 
STMedianFilter(8, 32, 0, 0 ) 
MergeChroma(blur(MaxTreshold)) 
MergeLuma(blur(0.1)) 
# 
# 

## Linear Motion Adaptive Filtering ## 
# 
# ( Portions from AviSynth's manual ) - This will apply temporalsoften to 
# very static scenes, and apply variable blur on moving scenes. 
# We also assign a variable - and this is why a line break is inserted: 

SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2 
ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= SwitchThreshold ? \ 
unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ) : \ 
TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ") 

GripBorders() 
#LetterBox( Your_Values_Here ) # Depends on situation. Use MovieStacker! 
##TextSub("D:\Movies-videos\test\subcity1.ssa")
##ChangeFPS(23.976)
Limiter() 
##Sampler(length=24)
# 
# 
## Functions ### 

function fmin( int f1, int f2) { 
  return ( f1<f2 ) ? f1 : f2 
}
thanx in advance
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
07-27-2003, 10:59 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
The guy is very cold

I believe there's nothing in the script that would cause that. I believe it's a frame rate issue. UNLESS, that specific scene is right at the border of the treshold of the MA script filter switching point, and you are seeing a fast oscilation between TemporalSmoother and unfilter kicking in and out at a very high speed. The best analogy to this is "Histheresis" effect: http://ourworld.compuserve.com/homep...t/elect344.htm ( I guess my years in electronics always pay off, even in video )
So you can try something quick.
Change this line:
SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2 \
To read:
SwitchThreshold = (Width<=352) ? 10 : (Width<=480) ? 10 : 10 \
But just for a test, and encode that section again. If the problem is gone, then it is a hystheresis problem, and the way to correct it will be to implement a "SCHMITT TRIGGER" in the script ( which should be a piece of cake )

Let me know

-kwag
Reply With Quote
  #3  
07-28-2003, 02:55 PM
AgNa AgNa is offline
Free Member
 
Join Date: Jan 2003
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Ok this is weird
I use your line on my script, it worked, removed that ghost efect but added a noise line on the right edge. So I tried to experiment my self lowering the number and replaced you line by this
SwitchThreshold = (Width<=352) ? 8 : (Width<=480) ? 8 : 8

and the ghost was back there, so I rencoded with the line you gave me just to put a pic here and the ghost was ther and the line not

I did it several times, and with diferent resolutions but all the same. I`m going mad

BTW whats a SCHMITT TRIGGER??
I just noticed that it happens in other places of the movies too, ie a camera inside a parked car and ther woman that you can see in the dark has the same ghost efect
Reply With Quote
  #4  
07-28-2003, 05:12 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by AgNa
BTW whats a SCHMITT TRIGGER??
I'll try to explain in a non technical context

Imagine you have a bucket of water (our frame motion difference range) with a single sensor (our treshold) like this:

Code:
 |      |\ blurring range
 |      |/
 |      |<---- Sensor at this point
 |      |\
 |      |/ Temporal filter range
 --------
Now we fill it with water (frame motion differences), but it just so happens that the water is barely touching the sensor, and the next frame difference is just barely under the sensor (the water is moving). If this happens on a time lapse (as on your sample), we have one frame difference with one filter(water detected), and the next frame difference with another filter (water not detected)
So you have an oscilation of alternating filters.
The way to fix that, is to add a SCHMITT TRIGGER circuit in software, just like it is designed in digital logic.
So what we do is this: If the water fed (the frame difference) just hit (tripped) over the sensor point, we LOWER the threshold point a tad. For example: If our sensor (treshold) measuring point is 2.0, we drop it (set it) to 1.8 on a "rising" transition of water (frame difference). If the water (frame difference) tripped BELOW 1.8 (lowering difference), we set the treshold back to 2.0.
What does this do Simple It avoids oscilations (hysteresis), because once a point is tripped, the water level (our threshold) needs a higher (or lower) level change to switch, and this keeps the filters from switching back and forth (oscilating) on that boundary when that condition is met
I hope this was clear, as I tried to make it as non-technical as possible
If you want a simple technical (digital) explanation, here it is : http://www.photonics.com/dictionary/.../QX/lookup.htm

-kwag
Reply With Quote
  #5  
07-29-2003, 10:57 AM
Jellygoose Jellygoose is offline
Free Member
 
Join Date: Jun 2002
Location: Germany
Posts: 1,288
Thanks: 0
Thanked 0 Times in 0 Posts
So where does the funny name come from? :P
__________________
j3llyG0053
Reply With Quote
  #6  
07-29-2003, 11:00 AM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Jellygoose
So where does the funny name come from? :P
SCHMITT?
is the name of the inventor that faster "flip-flop".


great link Kwag
Reply With Quote
  #7  
08-11-2003, 09:53 PM
AgNa AgNa is offline
Free Member
 
Join Date: Jan 2003
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Ok first of all sorry for the delay to answer and thank you for the help I`ve been a little bussy but now I `m back.
I think I totally understood what did you say, and it`s what in audio it`s a GATE/compressor, now How do I change the value?? I tried changing the MaxTreshold = 1.5 line but it doesnt have any noticeable effect on this case, I moved it to the min. and the max (1.0 and 1.5 I also tried this combined to changing the line you said in your first reply, that makes it look a little bit better but the effect is still there. Thanx in advance
Reply With Quote
  #8  
08-18-2003, 02:00 PM
AgNa AgNa is offline
Free Member
 
Join Date: Jan 2003
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
and I solved it!!!!!!
It was FFdshow issue I unistalled it and downloaded the lates Koepis XVid codec and it worked like a charm
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Dark scenes unnatural, surfaces producing a rippling effect ? J-Wo Video Encoding and Conversion 33 06-23-2004 03:30 PM
DivX Cartoon has ghost effect on fast motion? Bombero0437 Video Encoding and Conversion 2 02-24-2004 04:50 PM
How to Remove Ghost effect? ralf Video Encoding and Conversion 2 11-04-2003 06:15 PM
DVD2SVCD: Strange stroboscope effect + script/ini question Paulus Video Encoding and Conversion 13 09-01-2003 04:53 AM
KVCD: Unexplaned blockiness and ghost effect? bman Video Encoding and Conversion 3 04-24-2002 10:59 AM




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