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 24th January 2013, 04:18   #1  |  Link
zipi
Registered User
 
Join Date: Nov 2007
Posts: 27
VHS Halo Nightmares & DGIndex Levels

Hello, I am in the process of attempting restoring some PAL VHS tapes, & having a real hard time with it.
I have cleaned the video up a little & ran it through qtgmc.

1. I have extreme Haloing edges I do not know how to get rid of, multi color ones:






2. If you look in the levels on the right of the pictures, it appears DGINDEX, is serving the D2V with PC LEVELS, although I did select the TV checkbox, it has no effect.

I need it to remain in TV levels, without unnecessary conversions.
As I am an AviSynth newbie, ANY info & help will be greatly appreciated, Thanks a lot!

Last edited by zipi; 24th January 2013 at 04:22.
zipi is offline   Reply With Quote
Old 24th January 2013, 04:33   #2  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,412
values Y' <15 look like they are from the pillarboxing, not the active image area

dgmpgdec serves the levels same as source, you can adjust them with levels() or similar filters if you want, but there isn't a big problem here

You can try various dehalo filters, but unlikely that you will get good results since the halos are very wide and severe. You will probably cause more damage than good
http://avisynth.org/mediawiki/External_plugins#Dehaloing

Last edited by poisondeathray; 24th January 2013 at 04:36.
poisondeathray is offline   Reply With Quote
Old 24th January 2013, 04:51   #3  |  Link
zipi
Registered User
 
Join Date: Nov 2007
Posts: 27
Thanks, I looked into what you said, it appears it is in the Halos.
Can it be the VHS to DVD recorder has some extreme sharpening when it records? Its an LG unit.

zipi is offline   Reply With Quote
Old 24th January 2013, 05:02   #4  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,412
Yes, I would check to see if you can disable sharpening processing, or edge enhancement in the recorder unit. Check the manual to see if there are such settings
poisondeathray is offline   Reply With Quote
Old 24th January 2013, 05:16   #5  |  Link
zipi
Registered User
 
Join Date: Nov 2007
Posts: 27
Just checked, no way to disable it.

What would one do in such a weird scenario?

Place a limiter after the source, so things sharpening filters etc can work correctly
& then put another limiter also at the end of script ?

Is there a way to create a mask that mimics this obviously horrible sharpening filter, & then attempt to invert it & substratct it or something of the sort?

Last edited by zipi; 24th January 2013 at 05:19.
zipi is offline   Reply With Quote
Old 24th January 2013, 05:25   #6  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,412
Quote:
Originally Posted by zipi View Post

What would one do in such a weird scenario?
I don't think there is much you can do without some manual work... maybe other people have suggestions

Quote:
Place a limiter after the source, so things sharpening filters etc can work correctly
& then put another limiter also at the end of script ?
I would be careful about sharpening this content at all - because of the existing halos

Quote:
Is there a way to create a mask that mimics this obviously horrible sharpening filter, & then attempt to invert it & substratct it or something of the sort?
Many of the dehalo filters attempt to do something like this already. The problem is it's impossible to be accurate enough with the mask - You end up destroying many good lines or missing halos


Maybe other people will have better suggestions, but looking at the severity of the halos, this looks very difficult to treat
poisondeathray is offline   Reply With Quote
Old 24th January 2013, 05:33   #7  |  Link
zipi
Registered User
 
Join Date: Nov 2007
Posts: 27
Many thanks, I was hoping to try & upscale this somehow, & with these halos, its just horrible .

If anyone can briefly guide me on how to even attempt this, or after looking at the images, recommend a dehalo filter that might be able to handle the job, thatd be great.

Last edited by zipi; 24th January 2013 at 05:37.
zipi is offline   Reply With Quote
Old 24th January 2013, 06:47   #8  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 711
have you tried this:

FastLineDarken(luma_cap=28,thinning=220) # adjust luma_cap carefully, thinning aswell
mergeluma(aWarpSharp(depth=9, thresh=0.6, blurlevel=1, cm=1))

awarpsharp is not mandatory but i thought it could be a plus
Mounir is offline   Reply With Quote
Old 24th January 2013, 10:19   #9  |  Link
S_Prince
Registered User
 
Join Date: Aug 2012
Posts: 23
Well after doing some tests on the first jpg..result looks quite impressive.though the halo did not got removed completely.but it is quite good.Still A Lot of effort needed to make it something decent

I Just Worked on the halos..here it is :




Special Thanks To 'Mounir' For The AwarpSharp line

Script :

Code:
a=Dehalo_alpha()
b=mergeluma(a,aWarpSharp(depth=9, thresh=1.0, blurlevel=4, cm=1))
Regards,
S_Prince is offline   Reply With Quote
Old 24th January 2013, 11:27   #10  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,145
Quote:
Originally Posted by zipi View Post
2. If you look in the levels on the right of the pictures, it appears DGINDEX, is serving the D2V with PC LEVELS, although I did select the TV checkbox, it has no effect.
It's not supposed to have any effect. Those choices are for when you're creating VFAPIs. It's explained in the DGIndex manual.
Quote:
Can it be the VHS to DVD recorder has some extreme sharpening when it records? Its an LG unit.
If you cared about these videos you wouldn't be converting them to DVD using a DVD recorder, intending to then work on them some more. You'd get a decent S-VHS player with a TBC and digitize them in a better way. Using a DVD recorder on your precious tapes is about the worst method you can use. Maybe all that edge enhancement is in the tapes themselves, but you'll never know if you just run them through the DVD recorder.

Last edited by manono; 24th January 2013 at 11:38.
manono is offline   Reply With Quote
Old 24th January 2013, 13:21   #11  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,390
Dehalo_alpha is not suited for this kind of halo'ing. The pictures show darken-only halos, caused by a box kernel. DeHa-alpha assumes centered halo energy, and uses a gaussian-like kernel. Quite a different ballgame.
Warpsharp isn't well suited either. Methinks those halos are much too thick to combat them with awarpsharp.

If you're going to really remove the halos, you'll end up with something like that:
(Ignoring the text-areas, obviously)

(Based on an expand.inpand orgy, plus some juggling, and some more)

Are you really sure you want to remove the halos?
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 24th January 2013, 13:44   #12  |  Link
S_Prince
Registered User
 
Join Date: Aug 2012
Posts: 23
Quote:
Originally Posted by Didée View Post
Dehalo_alpha is not suited for this kind of halo'ing. The pictures show darken-only halos, caused by a box kernel. DeHa-alpha assumes centered halo energy, and uses a gaussian-like kernel. Quite a different ballgame.
Warpsharp isn't well suited either. Methinks those halos are much too thick to combat them with awarpsharp.

If you're going to really remove the halos, you'll end up with something like that:
(Ignoring the text-areas, obviously)

(Based on an expand.inpand orgy, plus some juggling, and some more)

Are you really sure you want to remove the halos?


Yeah.This Looks Wonderful.
S_Prince is offline   Reply With Quote
Old 24th January 2013, 14:23   #13  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,390
Well ... I can show you the script that I used:
Code:
imagesource("D:\__DL\crhuu.jpg").converttoyv12()
o  = last  ox=o.width() oy=o.height()

x1 = o.mt_expand().mt_expand(mode="horizontal").mt_expand(mode="horizontal").mt_expand(mode="horizontal")
 \                .mt_inpand(mode="horizontal").mt_inpand(mode="horizontal").mt_inpand(mode="horizontal").mt_inpand()
x1 = x1.mergechroma(o)
x2 = o.repair(o.repair(o.repair(x1,1,0),1,0),12,0)
e  = x2.mt_edge("prewitt",0,255,0,0).mt_lut("x 4 - 2 *").mt_expand().removegrain(11,-1).mt_expand()
 \                                  .mt_expand(mode="horizontal").mt_expand(mode="horizontal").mt_expand(mode="horizontal")
x3 = o.mt_merge(x2,e,U=2,V=2).mt_lutxy(o,"x 1 + y < x 2 + x 1 - y > x 2 - y ? ?",U=2,V=2)
x3a = x3.removegrain(11).merge(x3,0.251)
x3b = x3a.mt_makediff(mt_makediff(x3a,o).bicubicresize(ox/5/4*4,oy/4/4*4,.5,.25).bicubicresize(ox,oy,1,0),U=2,V=2)

# interleave(o,x1,x3b)
x3b
return(last)
But the problem is that this worked on the picture you posted, which is not the original resolution. If you feed your video with the original resolution (720x576, i.e. smaller) into this script, then several things won't "fit" anymore, and the result will be worse.

Lesson learned: post screenshots always in original 1:1 resolution. Do not resize.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 24th January 2013, 15:52   #14  |  Link
FlimsyFeet
Registered User
 
Join Date: Feb 2003
Posts: 362
Quote:
Originally Posted by manono View Post
If you cared about these videos you wouldn't be converting them to DVD using a DVD recorder, intending to then work on them some more. You'd get a decent S-VHS player with a TBC and digitize them in a better way. Using a DVD recorder on your precious tapes is about the worst method you can use.
A little harsh, maybe? I agree with the SVHS player with TBC comment, but I think a decent DVD recorder model recording on the best quality setting (XP on my LG recorder averages between 8.75 and 9 Mbps) is not significantly worse than the "better way" (eg using a capture card with a lossless codec).
For VHS, I mean.
FlimsyFeet is offline   Reply With Quote
Old 24th January 2013, 17:19   #15  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: Yorkshire, UK
Posts: 1,673
Quote:
Originally Posted by FlimsyFeet View Post
A little harsh, maybe? I agree with the SVHS player with TBC comment, but I think a decent DVD recorder model recording on the best quality setting (XP on my LG recorder averages between 8.75 and 9 Mbps) is not significantly worse than the "better way" (eg using a capture card with a lossless codec).
For VHS, I mean.
I have seen "good enough" VHS captures using a DVD recorder. I have also seen atrocious ones (too much noise, too low a bitrate, source desperately needed a TBC but one was not used).

This is neither - this is bizarrely over processed, so it looks like plastic (with halos!). At a low resolution or on a small display, it might look rather good (compared with some other possibilities; at least it'll look sharp and noise-free!) - however, if you're going to upscale it and watch it on a larger display, it's an awful place to start.


IME Noise can sometimes be removed better than you ever dared to hope for. OTOH Removing halos usually gives a result which is even worse than you feared!

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 24th January 2013, 17:32   #16  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 1,985
The DVD recorder, by its design, should have the "HQ" circuitry turned off (it's the sharpening circuit). For VHS recorders that do have the ability to defeat this, the function is often called the "edit" control. You want to enable "edit."

[edit]After looking at the halos again, I don't think those were caused by HQ circuitry in the deck.

Last edited by johnmeyer; 24th January 2013 at 19:47. Reason: Added last sentence after re-reviewing initial post
johnmeyer is offline   Reply With Quote
Old 25th January 2013, 00:17   #17  |  Link
zipi
Registered User
 
Join Date: Nov 2007
Posts: 27
Thanks a lot for the replies!
I apologize for the plastic looking pics.
I hoped it will show the issue ..
I should have done it 1:1, thanks for the tip!

I have made a small sample ,of the original mpg2, in an mkv container.
The transfer was done with the LG RCT689H recorder, in XP mode.

It has all the variations of it, the RGB 0 & RGB 255 Black white halos, (on what otherwise would be in the "TV range?)
the color halos, & the gentler thinner halos, that look like an offset double of the image,
& then also shots where it appears less pronounced.
Thank you!

Last edited by zipi; 25th January 2013 at 01:10.
zipi is offline   Reply With Quote
Old 27th January 2013, 20:38   #18  |  Link
zipi
Registered User
 
Join Date: Nov 2007
Posts: 27
Well, I have been trying some of the code suggested.

Mounir, thanks for the code, with awarpsharp, I did manage to do something about the chroma halos with the awarpsharp code, although I had to change "thresh=1.0" to "thresh=0.9", as awarpsharp2 that I have here crashed.
Didée, thanks for the code, it is way over my head, I couldnt undertand how to tweak it.

On an interlaced source like this, should I do all this before, or after QTGMC deinterlacing ?
I need some advice on understanding the correct chain for cleaning this.

I uploaded a sample in the post above, If you guys can please have a look, if these Halos can be eliminated/reduced.
zipi is offline   Reply With Quote
Old 28th January 2013, 01:13   #19  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 711
so what's the full code you have used finally, out of curiosity
Mounir is offline   Reply With Quote
Old 28th January 2013, 02:53   #20  |  Link
zipi
Registered User
 
Join Date: Nov 2007
Posts: 27
I have not used a final result, just tried what you guys suggested, still need help Im afraid.
I just did the line you gave me, & changed thres to 0.9, aWarpSharp(depth=9, thresh=0.9, blurlevel=4, cm=1), & it did restrain the colored halos.
zipi 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 03:41.


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