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 6th December 2008, 22:27   #1  |  Link
RidgeShark
Registered Amatuer
 
Join Date: Feb 2007
Posts: 20
Help needed in cleanup of multi-generational VHS recording

So I've searched all over the doom9 message boards and found a very useful script for cleaning up some ugly VHS footage I have. Here's a sample of that footage - http://www.megaupload.com/?d=NSVVJ4H1

And here's the script I've been using -

Quote:
AviSource("C:\Source")
ConverttoYV12()

source=last
backward_vec2 = MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1,

idx = 1,dct=1)
backward_vec1 = MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=1,

idx = 1,dct=1)
forward_vec1 = MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=1,

idx = 1,dct=1)
forward_vec2 = MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1,

idx = 1,dct=1)
MVDegrain2

(source,backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=100,idx=2)
I'm posting this message because I am very much an amateur at using Avisynth. I don't know if there are better techniques out there that could help with this particular VHS footage. For instance, although this script goes a long way towards cleaning up the footage, I'm still left with slight, strange horizontal lines in the video. Also, I'd like to convert the footage to 23.976 progressive fps if possible. After doing the cleanup, I tried using this script -

Quote:
Telecide()
Decimate()
But it has problems and still shows interlacing in many frames. I know the source is bad, but I still hope it's possible to accurately IVTC the footage.

Any help is very much appreciated.

Last edited by RidgeShark; 7th December 2008 at 00:53.
RidgeShark is offline   Reply With Quote
Old 7th December 2008, 00:15   #2  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,653
youl'll need to bob-deinterlace it (simple bob() should suffice)
then do some wavelet denoising to get rid of the horizontal interference.
after this do your mocomped denoise and
as last step you need deblending to get back to the original 23.976fps.
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 7th December 2008, 01:49   #3  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
That's an awfully low thSAD if your material is very bad as you say.. the default is 400, and on noisy material you usually have to increase it.
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.
Sagekilla is offline   Reply With Quote
Old 7th December 2008, 03:23   #4  |  Link
Nightshiver
Quality Freak
 
Join Date: Jun 2007
Location: Area 52
Posts: 597
This gets rid of most of the noise:

converttoyv12()
bob()
degrainpiramid(2,4,3)
source = last
vectors = source.MVAnalyseMulti(refframes=5, pel = 2, overlap=4, sharp=1, idx = 1)
source.MVDegrainMulti(vectors,thSAD=1000,idx=1)

for degrainpiramid, go here: http://forum.doom9.org/showpost.php?...89&postcount=6
You still have to get the frame rate back to 23.976, though.
Nightshiver is offline   Reply With Quote
Old 9th December 2008, 12:21   #5  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
Is this the best source available?

You need to shift the chroma up a few lines, since it drops one line for each generation of VHS, e.g. try

Code:
bob(0.0,1.0)

Vshift=4
Hshift=0
last.mergechroma(last.crop(Hshift,Vshift,0,0).addborders(0,0,Hshift,Vshift))
Change the Vshift value until the chroma lines up vertically.

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 28th January 2009, 03:31   #6  |  Link
RidgeShark
Registered Amatuer
 
Join Date: Feb 2007
Posts: 20
Thank you all very much for the help. I've Frankensteined a script from all of the suggestions, as well as from reading some other threads, and came up with this -

Quote:
AviSource("video.avi")
ConverttoYV12()
FFT3DFilter(plane=3,sigma=3,interlaced=true)
source=last
fields=source.AssumeTFF().SeparateFields().degrainpiramid(2,4,3)

prefiltered = degrainmedian(norow=true, mode=0,limity=10) #aggresive for better motion search
super = MSuper(levels=1,rfilter=4)
superfilt = MSuper(prefiltered)
backward_vectors = MAnalyse(superfilt, isb = true)
forward_vectors = MAnalyse(superfilt, isb = false)

forward_compensation = MCompensate(super, forward_vectors)
backward_compensation = MCompensate(super, backward_vectors)

interleave(forward_compensation, last, backward_compensation)
DeGrainMedian(norow=true, mode=0) #norow filters single rows, good for getting lines could be less aggressive
selectevery(3,1)
source=last
fields=source.AssumeTFF().SeparateFields() # or AssumeBFF
backward_vec2 = fields.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1)
forward_vec2 = fields.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1)
fields.MVDegrain1(backward_vec2,forward_vec2,thSAD=900,idx=1)
Weave()
aux=DeGrainMedian(mode=0, limity=7, interlaced=true)
VagueDenoiser(threshold=2, auxclip=aux, interlaced=true, wiener=true)
It does a great job cleaning and also manages to get rid of most of the horizontal line interference. It leaves a little splotchiness in the darker areas in the video, but I'll accept it if that's the price I have to pay to remove the horizontal interference.

Finally, to extract a 23.976 framerate, I'm using AnimeIVTC -

Quote:
animeivtc(mode=1,aa=0)
When paused, traces of blended frames (which is a problem with the source) can be seen. Despite this problem, I am very happy with the output. The image is about as pleasing at it can get and the motion looks natural.
RidgeShark is offline   Reply With Quote
Old 2nd May 2009, 03:04   #7  |  Link
RidgeShark
Registered Amatuer
 
Join Date: Feb 2007
Posts: 20
I've recently discovered that all the noise in my videoclip exists completely in the luma channel, and is not present in the chroma. Using this script helps to quickly and easily get rid of most of the horizontal noise -

Quote:
DeGrainMedian(limitY=8, limitUV=0, mode=1, interlaced=true, norow=false)
DeGrainMedian(limitY=3, limitUV=0, mode=1, interlaced=true, norow=false)
RidgeShark is offline   Reply With Quote
Old 8th May 2009, 01:14   #8  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 773
no chroma noise on vhs, how is that even possible? you're mistaken imo
Mounir 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 00:41.


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