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

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th February 2011, 04:17   #1  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 530
old VHS, lots of bleeding ghosting - what to do ?

The attached samples are from a much treasured 1983 VHS tape recording from TV, it has lots of what I think is ghosting and colour bleeding and some noise. The clips are "split" from the only remaining DVD copy of the lost tape.

I am wondering what to do to it to clean it up and sharpen it. I had thought crop it a bit, MDegrain1, and then ... lost the plot.

Suggestions (with examples if possible) on how to address the issues would be most welcome.

http://www.mediafire.com/?32f18ve0c754le4 10Mb see 1/2 way in
http://www.mediafire.com/?dxu78k4sv2v7lu2 10Mb

Last edited by hydra3333; 26th February 2011 at 04:22.
hydra3333 is offline   Reply With Quote
Old 28th February 2011, 16:51   #2  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: Yorkshire, UK
Posts: 1,673
Impressive how it's been blend deinterlaced while leaving interlaced jaggies in there - that don't respond to deinterlacing. That's quite a trick. Are you sure it was simple VHS > DVD? No resizing, Xvid, etc?

Some of the ghosting (multipath reception during the original recording?) is reduced by this...
PHP Code:
shift=52
a
=last
b
=last.Crop(0,0,-shift,0).AddBorders(shift,0,0,0)
overlay(b,opacity=0.07,mode="add").MergeChroma(a)
return 
last 
but that leaves a hard line near the left hand side - soften the border somehow, then you'll have a soft line(!) because either way there's a bit of wanted information missing.

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 28th February 2011, 20:19   #3  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
The interlacing artefacts and some of the noise can be tackled with QTGMC's progressive repair mode:
Code:
QTGMC( Preset="Slower", InputType=2 )
or the dual version (slow), which fixes a few more problems:
Code:
t=QTGMC( Preset="Slower", InputType=2 )
b=QTGMC( Preset="Slower", InputType=3 )
Repair(t,b,1)
Might slightly enhance the halos, so you could set a lower sharpness.

N.B. I could only get QTGMC to properly work with this source using DGDecode_mpeg2source.
-Vit- is offline   Reply With Quote
Old 4th March 2011, 22:55   #4  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 530
Thanks to both for your responses !

Quote:
Originally Posted by 2Bdecided View Post
Impressive how it's been blend deinterlaced while leaving interlaced jaggies in there - that don't respond to deinterlacing. That's quite a trick. Are you sure it was simple VHS > DVD? No resizing, Xvid, etc?
No I'm not sure. Given it's on DVD and the source was VHS capture then there would have been some processing of some kind, maybe with an early version of tmpgenc or something.

Will give these a try.
hydra3333 is offline   Reply With Quote
Old 8th March 2011, 09:40   #5  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 530
Quote:
Originally Posted by -Vit- View Post
or the dual version (slow), which fixes a few more problems:
Code:
t=QTGMC( Preset="Slower", InputType=2 )
b=QTGMC( Preset="Slower", InputType=3 )
Repair(t,b,1)
Ever had one of those days where literally everything goes wrong ? I've been having one

Anyway, the above script gives me
Quote:
multiple calls to qtgmc, set PrevGlobals="Replace" or read script docs on 'GLOBALS'
hydra3333 is offline   Reply With Quote
Old 8th March 2011, 09:47   #6  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
Actually, you're lucky. The reason you're getting that error is because I've speeded up just that kind of thing. You only need to do what it said (add PrevGlobals="Replace" to your QTGMC calls). But in this case there's a better solution:
Code:
t = QTGMC( Preset="Slower", InputType=2 )
b = QTGMC( Preset="Slower", InputType=3, PrevGlobals="Reuse" ) # Reuse motion vectors from first call for a good speed-up
Repair( t, b, 1 )
The second QTGMC call will now reuse some calculations from the first, making it quite a bit faster than it would be.
-Vit- is offline   Reply With Quote
Old 20th March 2011, 07:58   #7  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 530
Thanks. X264 kept crashing on me, until I told it not to use MT mode 2 and only use 1 thread, and ensured that all of the latest versions of plugins were loaded (including the fftw3.dll thingy - copy the latest libfftw3f-3.dll to fftw3.dll and then copy both into Windows-System32 for XP or SysWOW64 for win7).

Code:
SetMTmode(mode=5,threads=1) # start with mode=5 forAVIsource http://forum.doom9.org/showthread.php?p=1067216#post1067216 
#<snip loading plugins etc)
Mpeg2Source("G:\HDTV\sport\1983-sport.d2v",info=0,ipp=true,cpu=0) 
Assumefps(25) 
Crop(0,16,-32,-8,align=true) 
AddBorders(16, 16, 16, 8) 
# The interlacing artefacts and some of the noise can be tackled with QTGMC's progressive repair mode: 
#QTGMC(Preset="Slower",InputType=2) 
# OR ... 
t=QTGMC(Preset="Slower",InputType=2, Sharpness=0.9) 
b=QTGMC(Preset="Slower",InputType=3, Sharpness=0.9, PrevGlobals="Reuse") 
Repair(t,b,1)
Will see how it goes...

Last edited by hydra3333; 20th March 2011 at 10:03.
hydra3333 is offline   Reply With Quote
Old 20th March 2011, 15:34   #8  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
You shouldn't try to x264 at the same time as a complex multi-threaded script. You'll run out of memory on 32-bit Avisynth. Render the script to some lossless format, then x264 that.
-Vit- is offline   Reply With Quote
Old 20th March 2011, 17:59   #9  |  Link
Taurus
Registered User
 
Taurus's Avatar
 
Join Date: Mar 2002
Location: Krautland
Posts: 903
Interesting how any Discussion about avisynth filtering vanishes into MT tweaks.

@hydra3333:
Why dont you clean up your stuff, I mean your video,
and play the speedgame later on?
As -Vit- suggested:
Test your scripts in a single theaded environment 32bit or 64bit until you're satisfied with the result.

I am back to 32bit for now. Could'nt stand the hazzles with suboptimal plugins for 64bit.
In 32bit most scripts work multithreaded without crashing or trashing.
And dont give a d... for 8...10% more speed.
Of course allocated memory is an argument to use 64bit.
But I can see you are using SD source material and just two instances of QTGMC.
Should be quite easy to handle.
I've tried to download your samples.
But Mediafire hangs at the moment.
Maybe later.

Last edited by Taurus; 20th March 2011 at 18:05.
Taurus is offline   Reply With Quote
Old 21st March 2011, 11:21   #10  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 530
It worked ok (32 bit avisynth etc, Win7 Home Premium 64bit) with one thread. Not fussed about speed, this is a once-off... or tending to be lots of a once-off whilst homing in on reasonable eye experience

I wondered if the sharpness could be improved without too many hassles (since the source is so awful and ghosted anyway) so I am trying this ...
Code:
t=QTGMC(Preset="Slower",InputType=2, Sharpness=1.2, SLMode=1) 
b=QTGMC(Preset="Slower",InputType=3, Sharpness=1.2, SLMode=1, PrevGlobals="Reuse") 
Repair(t,b,1)
Also throwing in a deblock_qed as a final step since I thought I saw blocking in the result.

Last edited by hydra3333; 21st March 2011 at 11:24.
hydra3333 is offline   Reply With Quote
Old 21st March 2011, 12:14   #11  |  Link
Taurus
Registered User
 
Taurus's Avatar
 
Join Date: Mar 2002
Location: Krautland
Posts: 903
I have tried your source and script .
QTGMC is so......slooow with this settings.
If it's a one time thingy it might be allright,
but this must be a real treasure if you throw all your grips
and cpu cycles on this source.

Did you try deblocking first with Mpeg2Source?
I see you enabled postprocessing for force field-based (interlaced) post-processing.
But you disabled deblocking.

Yeah, I noticed the strong ghosting and some leftover bleeding in the encoded video.
Dont sharpen it more.
The result will not please your eyes.
I've tried adhoc a few degrainers and denoisers for speed reasons.
I must say QTGMC is doing a good job on this source.
Deblock_qed will do more harm then good.
Any way I do not see so much blocking after encoding your samples.
But this could be because of me loosing eyesight or my old CRT monitor
Taurus is offline   Reply With Quote
Old 21st March 2011, 12:41   #12  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 530
Right ho. "Dear to my heart" is a term I'd use for this video Maybe I'm imagining blocking or saw it in non-clipped video high motion areas. Have just aborted a current encode to use this for the source ...
Code:
Mpeg2Source("file.D2V",info=0,ipp=true,cpu=6)
Thanks.

Last edited by hydra3333; 22nd March 2011 at 10:27.
hydra3333 is offline   Reply With Quote
Old 28th March 2011, 23:54   #13  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 530
Well it turned out OK, by comparison to the source , with this
Code:
SetMemoryMax(256) 
LoadPlugin("C:\SOFTWARE\DGindex\DGDecode.dll") 
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\DePan.dll") 
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\AGC.dll")  
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\Cnr2.dll")  
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\dctfilter.dll")  
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\fft3dfilter.dll")  
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\degrainmedian.dll") 
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\Convolution3d.dll")  
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\despot.dll")  
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\WarpSharp.dll")  
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\aWarpSharp.dll")  
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\mt_masktools-25-broke-backward-compatibility.dll")  
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\mvtools2.dll")  
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\Unfilter.dll")  
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\AddgrainC.dll")  
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\hqdn3d.dll")  
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\Colormatrix.dll") 
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\NNEDI2.dll") 
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\NNEDI3.dll") 
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\EEDI2.dll") 
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\EEDI3.dll") 
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\VerticalCleanerSSE3.dll") 
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\dfttest.dll") 
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\VariableBlur.dll")  
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\FFTQuiver.dll")  
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\RemoveGrainSSE2.dll")  
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\RepairSSE2.dll")  
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins-zzz\RemoveDirtSSE2.dll")  
Import("C:\Program Files (x86)\AviSynth 2.5\LimitedSharpenFaster.avs") 
Import("C:\Program Files (x86)\AviSynth 2.5\Deblock_QED_MT2.avs") 
Import("C:\Program Files (x86)\AviSynth 2.5\QTGMC-3.31.avsi") 
Mpeg2Source("G:\SDTV\the-file.d2v",info=0,ipp=true,cpu=6) 
Assumefps(25) 
Crop(0,16,-32,-8,align=true) 
AddBorders(16, 16, 16, 8) 
# DE-INTERLACING and RE-INTERLACING http://forum.doom9.org/showthread.php?p=1374335#post1374335 
# Some of the ghosting (multipath reception during the original recording?) is reduced by this... 
# The interlacing artefacts and some of the noise can be tackled with QTGMC's progressive repair mode: 
#QTGMC(Preset="Slower",InputType=2) 
# OR ... 
t=QTGMC(Preset="Slower",InputType=2, Sharpness=1.2, SLMode=1) 
b=QTGMC(Preset="Slower",InputType=3, Sharpness=1.2, SLMode=1, PrevGlobals="Reuse") 
Repair(t,b,1) 
AssumeFPS(25) 
SetPlanarLegacyAlignment(True)

Last edited by hydra3333; 28th March 2011 at 23:56.
hydra3333 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 21:45.


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