Try DVD-Fab Video Downloader and rip Netflix video! Or Try DVD-Fab and copy Blu-rays! or rip iTunes movies!

# Can this movie can be repaired/ improved?

Thread
1. Hello.

I recently found a movie from the year 2000.
It is strangly disturbed.
I don't know about the device it has been taken with.
I do enclose a digital cut (original stream).

What happened there, and can it be repaired/ improved somehow?
I usually use VirtualDub2, but can handle AviSynth a bit too.

Thanks in advance!  Quote
2. It looks like a type of interference pattern

Do the "lines" change angle in other parts of the movie? Right now it looks like the "stripe" artifacts go from roughly top left to bottom right. If that pattern is fairly fixed, one approach is to apply a convolution kernal - essentially a line blur

Destripe is a function by *.mp4guy based on mt_convolution, originally meant to handle vertical stripes. If you rotate, filter, rotate back, some denoising/sharpening it might improve it a bit

The negatives are it will soften the image (you're blurring the artifacts away, and denoising afterwards, which will soften the entire image), and processing will be fairly slow

Here is a starting point, as usual you can adjust to your tastes

Code:
```MPEG2Source("Distortions_track1_[und].d2v")
AddBorders(160,160,160,160)
Rotate(39)
destripe(2,2,32)
destripe(2,1,16)
Rotate(-39)
crop(160,160,-160,-160,true)
mctemporaldenoise(settings="high", strength=50)
nonlinusm(str=0.2, rad=3)
CAS(0.5)

#thr is strength, rad is "how big are the (whatevers)" offset is "how far apart are they" rad goes from 1 to 5, offset from 1 to 4, thr from 1 to bignumber

function DeStripe(Clip C, int "rad", int "offset", int "thr")
{

rad = Default(rad, 2)
offset = Default(offset, 0)
thr_ = Default(thr, 256)

Blurred = Rad == 1 ? C.Mt_Convolution(Horizontal=" 1 1 1 ", vertical = " 1 ", u=1, v=1) : C
Blurred = Rad == 2 ? offset == 0 ? C.Mt_Convolution(Horizontal=" 1 1 1 1 1 ", vertical = " 1 ", u=1, v=1) : C.Mt_Convolution(Horizontal=" 1 0 1 0 1 ", vertical = " 1 ", u=1, v=1) : Blurred
Blurred = Rad == 3 ? offset == 0 ?  C.Mt_Convolution(Horizontal=" 1 1 1 1 1 1 1 ", vertical = " 1 ", u=1, v=1) : offset == 1 ?  C.Mt_Convolution(Horizontal=" 1 1 0 1 0 1 1 ", vertical = " 1 ", u=1, v=1) : C.Mt_Convolution(Horizontal=" 1 0 0 1 0 0 1 ", vertical = " 1 ", u=1, v=1) : Blurred
Blurred = Rad == 4 ? offset == 0 ?  C.Mt_Convolution(Horizontal=" 1 1 1 1 1 1 1 1 1 ", vertical = " 1 ", u=1, v=1) :  offset == 1 ? C.Mt_Convolution(Horizontal=" 1 1 1 0 1 0 1 1 1 ", vertical = " 1 ", u=1, v=1) :  offset == 2 ? C.Mt_Convolution(Horizontal=" 1 1 0 0 1 0 0 1 1 ", vertical = " 1 ", u=1, v=1) : C.Mt_Convolution(Horizontal=" 1 0 0 0 1 0 0 0 1 ", vertical = " 1 ", u=1, v=1) : Blurred
Blurred = Rad == 5 ? offset == 0 ?  C.Mt_Convolution(Horizontal=" 1 1 1 1 1 1 1 1 1 1 1 ", vertical = " 1 ", u=1, v=1) :  offset == 1 ?  C.Mt_Convolution(Horizontal=" 1 1 1 1 0 1 0 1 1 1 1 ", vertical = " 1 ", u=1, v=1) :  offset == 2 ?  C.Mt_Convolution(Horizontal=" 1 1 1 0 0 1 0 0 1 1 1 ", vertical = " 1 ", u=1, v=1) :  offset == 3 ?  C.Mt_Convolution(Horizontal=" 1 1 0 0 0 1 0 0 0 1 1 ", vertical = " 1 ", u=1, v=1) : C.Mt_Convolution(Horizontal=" 1 0 0 0 0 1 0 0 0 0 1 ", vertical = " 1 ", u=1, v=1) : Blurred
Diff = Mt_Makediff(C, Blurred)

THR=string(thr_)
MedianDiff =  Rad == 1 ? MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 1 0 -1 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : Diff
MedianDiff =  Rad == 2 ? offset == 0 ?  MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 1 0 -1 0 2 0 -2 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 2 0 -2 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : MedianDiff
MedianDiff =  Rad == 3 ? offset == 0 ?  MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 1 0 -1 0 2 0 -2 0 3 0 -3 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : offset == 1 ? MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 2 0 -2 0 3 0 -3 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 3 0 -3 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : MedianDiff
MedianDiff =  Rad == 4 ? offset == 0 ?  MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 1 0 -1 0 2 0 -2 0 3 0 -3 0 4 0 -4 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : offset == 1 ?  MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 2 0 -2 0 3 0 -3 0 4 0 -4 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : offset == 2 ?  MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 3 0 -3 0 4 0 -4 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 4 0 -4 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : MedianDiff
MedianDiff =  Rad == 5 ? offset == 0 ?  MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 1 0 -1 0 2 0 -2 0 3 0 -3 0 4 0 -4 0 5 0 -5 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : offset == 1 ?  MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 2 0 -2 0 3 0 -3 0 4 0 -4 0 5 0 -5 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : offset == 2 ?  MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 3 0 -3 0 4 0 -4 0 5 0 -5 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : offset == 3 ?  MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 4 0 -4 0 5 0 -5 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 5 0 -5 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : MedianDiff
ReconstructedMedian = mt_makediff(Diff, MedianDiff)
Mt_AddDiff(Blurred, ReconstructedMedian)

Return(Mergechroma(Last, C, 1))
}```

There might be more targetted approaches, using frequency domain filtering -eg. fanfilter, fftquiver, fquiver,- but it's difficult to tune the proper parameters in my experience.

http://www.avisynth.nl/users/vcmohan/FanFilter/FanFilter.html
http://www.avisynth.nl/users/vcmohan/FFTQuiver/F1Quiver.htm
http://www.avisynth.nl/users/vcmohan/FFTQuiver/F2Quiver.htm  Quote
3. VirtualDub's Defreq filter was designed for these sort of interference patters (often caused by adjacent channel interference on old OTA broadcasts).

Here's a link:

Defreq

Here's the doom9.org discussion from when the author first created the filter:

DeFreq plugin - Interference frequency remover

Defreq is a plugin for AVISynth, not a filter for VirtualDub. My bad.  Quote
4. Thank you for your hints - both of you.

As I don't have any experiences with this kind of
disturbance I really appreciate.

So I will try if there will achievable an improvement
by the methods you propose.
Although if I have a look at the one poisondeathray
produced or the examples of Defreq there doesn't
seem much hope.  Quote
5. My results:

The method poissondeathray kindly proposed kills to much detail for my taste.
So I tried Defreq.
The best result I achieved so far is with
Code:
`DeFreq(fx=39.2,fy=-35,dy=12,fx2=39.2,fy2=65,dy2=12,cutx=100,cuty=100)`
Result see attachment.

Actually I really don't can tell if the mentioned FanFilter or FQuiver are
more sophisticated and would produce better results.  Quote
6. You got Neat V5 to deal with these bars or a mix of f1quiver + neat + defreq more likely  Quote
7.  Quote
8. Thank you for the feedback!

themaster1
Actually the Neat restauration does look quite similar
to the one poisondeathray produced.
Seems much detail loss.

I wonder if the resolution of the frames have been
decreased by the distortion, and so "removing" these
frequencies (as Defreq says/ does) cannot "recover"
that information anyhow.

I know that a blurry image "looks shaper" if one
adds noise to it.

So... is it noise or is it information?

I've to admit that my Defreq result (see above)
seems to still have much noise in it.

Maybe the restauration of poisondeathray removes only
all the noise, leaving frames that have only about half
of the resolution?
As that information had been destroyed by the distortions
once and forever?  Quote
9. The information isn't there. VHS tapes have only about 320 lines of resolution across the width of the frame. What you're seeing as sharper is just the noise.  Quote
10. Oh, surprise!

I didn't know what kind of advice the movie was originally taken with.
Are you sure (by the kind of distortions) that it was a VHS tape?

(If so there is no need for me to look for a better restauration than the
"unsharp" ones above. All I can hope is to remove the noise,
so remove it so it won't disturb the resampling to 320p afterwards).  Quote
11. Are you sure (by the kind of distortions) that it was a VHS tape?
I can't say for sure if it was VHS but it was some consumer analog tape format. And not as good as s-vhs or hi8. So likely VHS, 8mm or Beta. The hints are the low horizontal resolution, the horizontal time base wiggle, and the ~ 6 pixel wide horizontal oversharpening halos.  Quote
12. Thank you for sharing your experiences.

Still for me the question remains by which means to remove the noise
(so it won't disturb the resampling afterwards).

Defreq doesn't do very satisfying, as there remains much noise.
Also the sharpness parameter doesn't has much effect:
Having done a first pass of Defreq und showing the FFT in a second pass
the effected rectangle looks quite the same, when sharp = 0 or 100.
Also there is missing a strenght parameter for the amount of attenuation
of the peak frequency...

Are FanFilter or FQuiver better alternatives?  Quote
13. Apply a strong motion compensated temporal noise filter after defreq. Like TemporalDegrain() or MCTemporalDenoise(). Too strong will result in smearing when there's motion, panning, etc. and people may look like mannequins in closeups.  Quote
14. To close this thread I would like to express my thanks to all for the help. I'm very grateful and wished to return the favour,
but it looks like (although I learned alot once more)
I will always stay the "pupil" in this forum. Greetings!  Quote

Statistics