Log in

View Full Version : Dust - a noise remover


Pages : 1 2 3 [4]

kempfand
19th November 2003, 00:23
Fred: My issue is kind of a 'long and winding road'. Difficult to explain (my native language is not English), but I'll give it a try.

It's PAL DV-avi (16:9 anamorph recorded source) from my vacation videos. I usually go South and have lot's of bushes, grasses, palmtrees in the picture. As there aleays is some mild wind, the palm-leaves are a bit moving, and, in addition, I mostly use no tripoid, so there is some slight movement also from me holding the cam (or slowly moving to change scene). What I want to say: complicated stuff to encode (i.e. more difficult than DVD-backups from Hollywood movies, which in addition are progressive).

The problem I have now, is as follows: In the picture, where there are moving leaves, the resulting MPG (when viewed on TV) is kindof flickering, pulsing, not moving smoothly. This only applies to areas with these leaves and tree or grass -structures (i.e. if there is a stone or sand in the very same picture and scene, the part of the image where the sand is is very good).

For testing, I use CCE, CBR 7000, DC 9, Standard Matrix, Alternate Scan, no filters within CCE. I'm feeding an AVS to CCE. The resulting fieldorder from the AVS is correct (i.e. I always check the AVS with assumetff() & bob() through feeding it into VirtualDub).

When I 1st faced the problem 2 months back, I started to test as follows:
- Deinterlace (various ones, best was TomsMoComp and KernelDeInt). This solved the problem, but the image was not 'fluid' anymore when the cam moves, so this is a no-go
- Tried various SpatioTemp filters (Convolution3D (1, 6, 10, 6, 8, 2.8, 0) and lately MipSmooth(preset = "MovieLQ"), plus some of the others around). And yes: I did not use SeparateFields() but used some of the more advanced scripts such as the ones from UnPlugged ( Bob(0,0.5) ... SeparateFields().SelectEvery(4,1,2).Weave() ) or StickyBoy (Fold/UnfoldFieldsVertical(true) ).

Long story result: SegmentedAVISource("V:\sclive\Z\Z-01.avi")
Bob(0,0.5)
SpaceDust()
SeparateFields().SelectEvery(4,1,2).Weave()
gives excellent results (i.e. the flickering/pumping within the image-area where I have the palm-trees are gone). With PixieDust(limit=5), results are even better, but it takes forever.

I also found that Blur improves the situation, either the LowPass filter in CCE, or Blur(1,0) (better than Blur(0,1) or Blur(1,1). But things get clearly 'unsharp', and it's not easy to view (the eye constantly tries to 'focus' and get things more sharp).

Another good approach came from mb1 (he knows all the 'old' tricks). He suggested using a BilinearResize (taking into account 2 blocks for TV-overscan). This, in combination with MipSmooth (latest version) also gets rid of the problem, and this is what I currently use:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MipSmooth.dll")
SegmentedAVISource("V:\sclive\Z\Z-02.avi")
ConvertToYV12(interlaced=true)
Bob(0,0.5)
MipSmooth(preset = "MovieLQ", weigh = false)
BilinearResize(688,544,0,3,720,570)
SeparateFields().SelectEvery(4,1,2).Weave()
AddBorders(16,16,16,16)
ConvertToYUY2(interlaced=true)
I also found out, that some (not all) of the flickering with the palm-leaves comes from the DVD-player itself, and how it is connected. For example, my old player was connected via RGB to the TV. When I switched to SVHS-cable, the flickering was less.

But more: I upgraded to a new player 5 days back. Guess what: The flickering is much less (even through RGB). I was also told that some players (i.e. Grundig) even have different firmwares (which can be flashed) which produce different sharpness and more/less flickering. My learning is that the player (and how it transmits to the TV) are an important element in the chain.

That's basically the story. If you or other readers have additional suggestions for concrete scripts/filter -combinations, I'm keen to test them (I already tried some of the more elaborated ones such as the ones for KVCD/KDVD or the one 'Quantified Motion Filter' by HomiE described somewhere in this forum.

Kind regards,

Andreas

FredThompson
19th November 2003, 00:29
The term "bob" also means to bounce slightly. That's what happens when you try to use it to change field order. A "bobber" is the float on a fishing line. When it "bobs" in the water, you know a fish is at the bait.

Get rid of that statement and encode as BFF. IF you don't like that, add Peachsmoother.

kempfand
19th November 2003, 00:47
Can't encode BFF, as most of the players with friends/colleagues will not play BFF correctly. It results a 'stottering' during playback. When I chnge the fieldorder (Darim's EasyChanger, or by adding DoubleWeave().SelectOdd() at the end of the AVS), the DVD-players correctly play.

I've read in other threat here that it works for you, but not on the players I have at hand :(

I tried PeachSmoother ... did help a bit, but the picture (when viewed on TV ober > 5 minutes) was a bit too 'nervous' (don't know how to better say this in English).

I will give another try to stickboy's functions (which avoids Bob if I'm reading this correctly): import("C:\Program Files\AviSynth 2.5\plugins\StickBoy.avs")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MipSmooth.dll")

SegmentedAVISource("V:\sclive\Z\Z-01.avi")

ConvertToYV12(interlaced=true)

UnfoldFieldsVertical(true)
MipSmooth(preset = "MovieLQ")
FoldFieldsVertical(true)

DoubleWeave().SelectOdd()

ConvertToYUY2(interlaced=true)

Regards,

Andreas

P.S. I also found that DGBob(mode=1) works well.

Maybe this is better to use than the "normal" Bob (from the readme: "Set mode=1 to output a clip with a number of frames equal to twice that of the input clip (frames from fields) and a frame rate twice the input frame rate. This allows you to use the filter for smart bobbing")

High Speed Dubb
19th November 2003, 01:28
kempfand,

Kannst Du das nervous PeachSmoother Bild genauer auf Deutsch beschreiben?

If I’m interpreting “nervousness” correctly, you would probably see an improvement with PeachSmoother using a lower Stability setting.

FredThompson
19th November 2003, 06:25
DoubleWeave().SelectOdd() will create some goofiness. See this thread: http://forum.doom9.org/showthread.php?s=&threadid=46765

kempfand
19th November 2003, 17:39
@ Lindsey :

I tested 2 settings (being fully aware that I should run different values to hopefully find optimal settings):
-> PeachSmoother(NoiseReduction=35, Stability =20, Spatial=100, ShowMotion=false) and
-> PeachSmoother(NoiseReduction=50, Stability=30, Spatial=200, NoiseLevel=3.5, BaseLine=2.5)

Regarding the "nervous" (trying to explain this in German): Das Bild war irgendwie unruhig, nicht fliessend, sondern eckig & kantig (stotternd wäre übertrieben, aber es geht in diese Richtung).


@ Fred :

Completely agree. I think it should be pointed out more, as I often see "wrong" scripts using DoubleWeave().SelectOdd() before feeding into spatio-temporal filters. I stopped using it and was only mentioning above to make the point about TFF for DVD-MPEG playback.

If I have to change the field order, I use Simon Waters' Reverse Field Dominance (http://www.geocities.com/siwalters_uk/fnews.html).

To make the spatio-temporal filters work correctly, I either use
- Stickboy's Fold / UnfoldFieldsVertical (http://forum.doom9.org/showthread.php?threadid=59029&highlight=UnfoldFieldsVertical) , which I understand is similar to Simon Walter's View / UnViewFields in the link you gave above or
- Bob(0,0.5)
...<filters>...
SeparateFields().SelectEvery(4,1,2).Weave()
Offtopic: I saw your Q in the other forum about changing field-dominance in MPEG2 (without de- & re-mux to m2v, which is needed for ReStream). Tried to register there but didn't get activatio yet. In short: If I remember correctly, Darim's EasyChanger will do (don't have a link handy, but PM in case you need help).

Regards,

Andreas

FredThompson
19th November 2003, 20:05
@Lindsey,

If you're still watching this thread, would you please comment on what you think the strengths/weaknesses are of peachsmoother vs. dust?

Also, am I correct that PeachSmoother and GuavaComb are both interlace-aware?

@kempfand,

You could also split your interlaced source into 2 streams which might be safer. If I understand the code snip from stickboy, spatial-temporal filters which do not support interlaced source will still corrupt the frames. You will have the top of one field right next to the bottom of the other. How would the filter know these are not related and filter across the "border"?

Try something like this:

even=SelectEven(SeparateFields()).Your_Function_Here()
odd=SelectOdd(SeparateFields()).Your_Function_Here()
Interleave(even,odd).Weave()

Boulder
20th November 2003, 17:07
Originally posted by FredThompson
You could also split your interlaced source into 2 streams which might be safer. If I understand the code snip from stickboy, spatial-temporal filters which do not support interlaced source will still corrupt the frames. You will have the top of one field right next to the bottom of the other. How would the filter know these are not related and filter across the "border"?


See this : http://forum.doom9.org/showthread.php?s=&threadid=64253&perpage=20&pagenumber=2 . I asked the very same question there. Basically ViewFields-Spatio-TemporalFiltering-UnViewFields works fine and you won't notice any oddities.

The SelectEven/SelectOdd/Interleave works fine on most cases but some filters don't like to be called more than once in the script. IIRC PeachSmoother may be one of those, and the Dust filters won't even work if they are called more than once per script.