View Full Version : need help on removing green bar on top of a vhs video
lansing
8th July 2012, 03:51
There's a stationary green bar sitting on top of each frame of the video, I tried to remove it using the overlay function with different color adjusting filters, the best I can get is through coloryuv, but it's still visible, is there a better filter to do this?
http://img825.imageshack.us/img825/9132/originalyd.jpg http://img801.imageshack.us/img801/5122/coloryuvov.jpg
sample is here:
http://www.mediafire.com/?hed3y7eg7pkeed2
o=AVISource("top green bar.avi")
AVISource("top green bar.avi").crop(0,4,-6,-468)
ovrlay = ColorYUV(gain_u=0, gain_v=53)
Overlay(o, ovrlay, x=0, y=4, opacity=1.0, mode="blend")
Guest
8th July 2012, 04:49
You can always crop it! Then resize if necessary. With that terrible video, it wouldn't look much worse. You have head-switching noise that needs to be cropped off the bottom anyway, so why not just do both?
Or maybe you can try something like BorderControl():
http://www.geocities.com/siwalters_uk/bdrcntrl.html
lansing
8th July 2012, 12:58
i don't want to crop it out because it still has details in it unlike the bottom
juhok
8th July 2012, 14:36
Here's a suggestion for a similar issue by jmac698 at digitalfaq.com forums (http://www.digitalfaq.com/forum/13874-post6.html), adjust as needed:
#Fix Sony 9000 Digital8 video
#A Script which fixes a problem where the top 6 lines of video have a green color
#Version 0.1 by jmac698 Dec/10
dir="G:\project001a\vcr comparison\"
imagesource(dir+"sony9000.jpg")#change this to:
#avisource(dir+"yourvideo.avi")
pal=1#set to 0 for NTSC (obviously would apply to an equivalent NTSC hi8 deck)
goodline=13#increase this until the color is fixed, refers to the cropped coordinates
newwidth=720#The final width of the new video
newheight=(pal==1)?576:480#The final height of the new video
#This script is not completely general, generally only even numbers are supported
left=4#adjust these to closely crop your video
right=9
top=0
bot=7
Crop(left, top, -right , -bot)#Crop your video
addborders((newwidth-last.width)/2,(newheight-last.height)/2,(newwidth-last.width)/2,(newheight-last.height)/2)#Re-Centre your video
converttoyuy2
badcolor=last.vtoy#This is where the green line comes from
fillcolor=badcolor.crop(0,goodline,0,-(newheight-goodline-2)).pointresize(newwidth/2,goodline)
fixcolor=stackvertical(fillcolor,badcolor.crop(0,goodline,0,0))
ytouv(last.utoy,fixcolor,last)
Mounir
8th July 2012, 19:59
Didée gave you the solution last time
# Move the chroma Up:
crop(0,0,0,-6).pointresize(width,height,0,0,width,height).mergeluma(last)
pointresize(width,height,0,6,width,height).mergeluma(last)
But it's not perfect with that crappy video once it is deinterlaced with nnedi3 i think i know why only U or V is concerned with the chroma misplacement, let's wait for Didée ;)
lansing
8th July 2012, 21:49
Didée gave you the solution last time
# Move the chroma Up:
crop(0,0,0,-6).pointresize(width,height,0,0,width,height).mergeluma(last)
pointresize(width,height,0,6,width,height).mergeluma(last)
But it's not perfect with that crappy video once it is deinterlaced with nnedi3 i think i know why only U or V is concerned with the chroma misplacement, let's wait for Didée ;)
that one doesn't work, it shifted the entire luma upward, making lots of ringing in all other areas.
lansing
9th July 2012, 10:22
Here's a suggestion for a similar issue by jmac698 at digitalfaq.com forums (http://www.digitalfaq.com/forum/13874-post6.html), adjust as needed:
...
thanks for this script, there still exhibit some light green and yellow after, so added camcorder color denoise on the top part and it works out pretty well.
LoadVirtualdubPlugin("VirtualDub-1.10.2\plugins\ccd_sse2.vdf", "CCD", 1)
AVISource("top green bar.avi")
assumetff()
nnedi3(field=-2)
pal=0 #set to 0 for NTSC (obviously would apply to an equivalent NTSC hi8 deck)
goodline=16#increase this until the color is fixed, refers to the cropped coordinates
newwidth=720#The final width of the new video
newheight=(pal==1)?576:480#The final height of the new video
#This script is not completely general, generally only even numbers are supported
converttoyuy2
badcolor=last.vtoy#This is where the green line comes from
fillcolor=badcolor.crop(0,goodline,0,-(newheight-goodline-2)).pointresize(newwidth/2,goodline)
fixcolor=stackvertical(fillcolor,badcolor.crop(0,goodline,0,0))
ytouv(last.utoy,fixcolor,last)
# add ccd on top part
ConvertToRGB32
temp = last
top = temp.CCD(100,1).crop(0,0,0,-(newheight-goodline))
bottom = temp.crop(0,goodline,0,0)
StackVertical(top, bottom)
ConvertToYV12(chromaresample="point") # convert back to yv12
jmac698
10th July 2012, 03:57
Hmm, my scripts do get around.. glad it worked
cooli
17th September 2017, 14:08
Hello,
how can I adapt this to a right vertical green line?
https://www.fvnet.ch/tmp/test/border.png
LemMotlow
17th September 2017, 19:54
I already did that with chuibbyrain2 in the script in a previous thread. https://forum.doom9.org/showpost.php?p=1818058&postcount=2. Here's the part that cleaned it up:
# ------------ chubbyrain2 - interlaced, clean up border stain ----
separatefields()
a=last
a
chubbyrain2()
SmoothTweak(Hue2=7)
crop(690,0,0,0,true)
b=last
overlay(a,b,x=690)
weave()
Adding CamcorderColorDenoisie later in the script finished the job:
LoadVirtualDubplugin("drive:\path\VirtualDub\plugins\ccd.vdf","CamcorderColorDenoise",1)
ConvertToRGB32(interlaced=false,matrix="Rec601")
CamCorderColorDenoise(32,1)
Sorry to didn't take notice.
cooli
17th September 2017, 22:33
Hello,
Is there any x64 alternative to CCD?
I'm trying to adapt this part to vertical to see the results but
without any success for no.
converttoyuy2
badcolor=last.vtoy#This is where the green line comes from
fillcolor=badcolor.crop(0,goodline,0,-(newheight-goodline-2)).pointresize(newwidth/2,goodline)
fixcolor=stackvertical(fillcolor,badcolor.crop(0,goodline,0,0))
ytouv(last.utoy,fixcolor,last)
Tried to install everything in 32bit but how can I force AVS+ to install 32bit instead of X64?
BTW thanks for helping, I really like the output of your script.
I already did that with chuibbyrain2 in the script in a previous thread. https://forum.doom9.org/showpost.php?p=1818058&postcount=2. Here's the part that cleaned it up:
# ------------ chubbyrain2 - interlaced, clean up border stain ----
separatefields()
a=last
a
chubbyrain2()
SmoothTweak(Hue2=7)
crop(690,0,0,0,true)
b=last
overlay(a,b,x=690)
weave()
Adding CamcorderColorDenoisie later in the script finished the job:
LoadVirtualDubplugin("drive:\path\VirtualDub\plugins\ccd.vdf","CamcorderColorDenoise",1)
ConvertToRGB32(interlaced=false,matrix="Rec601")
CamCorderColorDenoise(32,1)
Sorry to didn't take notice.
LemMotlow
17th September 2017, 22:40
Guess you'll have to wait for 300-plus Avisynth and VirtualDub filters to get re-engineered into 64-bit versions. Sorry to say, it's not likely to happen. I guess that's why so many people still use 32-bit, even with 64-bit OS's.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.