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 13th August 2004, 11:28   #1  |  Link
Sighting
Registered User
 
Join Date: Jun 2004
Posts: 13
VHS rainbow problems

Hi, I'm in process of making a clean xvid encode out of an old VHS tape... Here is my script so far:

LoadPlugin("c:\Program Files\Avisynth 2.5\plugins\LoadPluginEx2.dll")
LoadPlugin("c:\Program Files\Avisynth 2.5\plugins\DustV5.dll")
vid=AviSource("c:\capture.avi").Telecide(order=1,guide=2).Trim(1316,38910).CNR2().Crop(0,10,0,-14).PixieDust(5).BicubicResize(480,360).FadeOut(20)
blk=Blackness(vid,20)
UnalignedSplice(blk,vid)

The main problem that I have now is some rainbowing on some subtitles. I tried the Antiblink filter on it with both the recommended parameters that were described in the readme. This DOES make the rainbowing disappear, but it gives me a bigger problem: in the last frame before a scene change, the colors get messed up.

Could anyone help me with finding a better solution for the rainbowing? It only happens for a short time, but I would still like to get rid of it. I also tried Guavacomb, but that one didn't seem to help at all.

Also, if you have any suggestions for my current script, you're welcome
Sighting is offline   Reply With Quote
Old 14th August 2004, 19:44   #2  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
hmm... is there a sample of 20 or so frames available?

there's rainbows and then there's rainbows some can be quite successfully dealt with, others can only be "fixed" by completely destroying the chroma channels.

unfortunately, once alias frequencies appear, they are nigh-on-impossible to distinguish from regular signal, at least in any reasonable amount of time. i find interlaced rainbows that invert every field are the easiest to get rid of (just comb-mask-and-deinterlace the chroma channels), but if there's too long-term a pattern to the rainbows, then there's not much hope of getting rid of them. (guavacomb attempts this, but requires a sequence where nothing moves but the rainbows)
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 14th August 2004, 21:44   #3  |  Link
Sighting
Registered User
 
Join Date: Jun 2004
Posts: 13
Here's a compressed huff avi that shows the 'scene' that has the rainbow errors in the subtitle. This avi has telecide and CNR2 applied to it and no dust of rainbow filter yet.

LINK
Sighting is offline   Reply With Quote
Old 15th August 2004, 04:54   #4  |  Link
hartford
Registered User
 
hartford's Avatar
 
Join Date: Nov 2003
Posts: 324
You might try this (although, your "rainbows" are nothing compared to
what I've had):

AviSynth script:

Loadplugin("c:\program files\avisynth 2.5.5\plugins\MaskTools.dll")
Loadplugin("c:\program files\avisynth 2.5.5\plugins\MipSmooth.dll")
Loadplugin("c:\program files\avisynth 2.5.5\plugins\MSharpen.dll")
Loadplugin("c:\program files\avisynth 2.5.5\plugins\old\LoadpluginEX.dll")
Loadplugin("c:\program files\avisynth 2.5.5\plugins\old\Dustv5.dll")


Import("c:\program files\avisynth 2.5.5\plugins\jdl-util.avs")
Import("c:\program files\avisynth 2.5.5\plugins\DeRainbowYUY2.avsi")

Avisource("c:\1.avi")

jdl_UnfoldFieldsVertical(flip=true)
Pixiedust(limit=2)
DeRainbowYUY2(last,30)
jdl_FoldFieldsVertical(flip=true)


For jdl-util.avs Search Stickboy.

Be sure to get the correct "LoadpluginEX.dll" as there are several.


Virtual dub filters: copy this to 1.vcf and load it as
"Load processing settings"


VirtualDub.audio.SetSource(1);
VirtualDub.audio.SetMode(0);
VirtualDub.audio.SetInterleave(1,500,1,0,0);
VirtualDub.audio.SetClipMode(1,1);
VirtualDub.audio.SetConversion(0,0,0,0,0);
VirtualDub.audio.SetVolume();
VirtualDub.audio.SetCompression();
VirtualDub.audio.EnableFilterGraph(0);
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(3);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetCompression();
VirtualDub.video.filters.Clear();
VirtualDub.video.filters.Add("smart smoother HiQuality (2.11)");
VirtualDub.video.filters.instance[0].Config(5, 50, 0, 254, 1, 0, 1, 0);
VirtualDub.video.filters.Add("dynamic noise reduction (MMX)");
VirtualDub.video.filters.instance[1].Config (4);
VirtualDub.video.filters.Add("static noise reduction (1.3)");
VirtualDub.video.filters.instance[2].Config (4,0);
VirtualDub.audio.filters.Clear();


Your "rainbows" are rather insignificant, in my opinion.


Best.
hartford is offline   Reply With Quote
Old 15th August 2004, 09:18   #5  |  Link
madness
Registered User
 
Join Date: Jun 2003
Posts: 29
you could try sh0dan's derainbow script I found the forum quite a while ago and someone created a function for it I can't quite remember who was it but anyway, it works quite effective for some dvd source has heavy rainbow on static areas.
Heres a reprint of the script:
Quote:
function DeRainbow(clip org, int "thresh")
{
assert(org.isYV12(),"DeRainbow() requires YV12 input!")
thresh = default(thresh, 10)

org_u = utoy(org)
org_v = vtoy(org)

msharpen(org, threshold = thresh, mask=true)
reduceby2()
greyscale()
uv = blur(1.5).levels(0,2.0,255,0,255, coring=false).blur(1.5).blur(1.5).levels(50,2.0,255,0,255, coring=false)

filtered_u = org_u.mipsmooth(spatial=255, temporal=255, scenechange=3, show=false, method="strong", scalefactor=0.5)
filtered_v = org_v.mipsmooth(spatial=255, temporal=255, scenechange=3, show=false, method="strong", scalefactor=0.5)

u_final = MaskedMerge(org_u, filtered_u, uv)
v_final = MaskedMerge(org_v, filtered_v, uv)

return ytouv(u_final, v_final, org)
}
just copy and paste that into notepad and save it derainbow.avs or something you can remember in the future and in your avs script just put Derainbow() make sure the input is YV12 colorspace if not then do ConvertToYV12().DeRainbow()
the default threshold for the derainbow is 10 u can chnage the value to shuite ur needs.
oh also make sure you got these filters loaded into your script
MSharpen.dll, MaskTools.dll, MipSmooth.dll
its needed inorder for the derainbow to work.
madness is offline   Reply With Quote
Old 15th August 2004, 10:54   #6  |  Link
Sighting
Registered User
 
Join Date: Jun 2004
Posts: 13
Thanks for the replies!

I will use this then:

Quote:
LoadPlugin("c:\Program Files\Avisynth 2.5\plugins\MSharpen.dll")
LoadPlugin("c:\Program Files\Avisynth 2.5\plugins\MaskTools.dll")
LoadPlugin("c:\Program Files\Avisynth 2.5\plugins\MipSmooth.dll")
LoadPlugin("c:\Program Files\Avisynth 2.5\plugins\old\LoadPluginEx.dll")
LoadPlugin("c:\Program Files\Avisynth 2.5\plugins\old\DustV5.dll")
Import("c:\Program Files\Avisynth 2.5\plugins\derainbow.avs")
vid=AviSource("c:\capture.avi").Telecide(order=1,guide=2).Trim(1316,38910).CNR2().Crop(0,10,0,-14).PixieDust(5).ConvertToYV12().DeRainbow().BicubicResize(480,360).FadeOut(20)
blk=Blackness(vid,20)
UnalignedSplice(blk,vid)
Greetings

Last edited by Sighting; 15th August 2004 at 11:28.
Sighting 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 04:25.


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