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 8th July 2012, 03:51   #1  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
need help on removing green bar on top of a vhs video

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?




sample is here:
http://www.mediafire.com/?hed3y7eg7pkeed2

Code:
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")

Last edited by lansing; 8th July 2012 at 03:53.
lansing is offline   Reply With Quote
Old 8th July 2012, 04:49   #2  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
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
Guest is offline   Reply With Quote
Old 8th July 2012, 12:58   #3  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
i don't want to crop it out because it still has details in it unlike the bottom
lansing is offline   Reply With Quote
Old 8th July 2012, 14:36   #4  |  Link
juhok
Registered User
 
juhok's Avatar
 
Join Date: Dec 2005
Posts: 110
Here's a suggestion for a similar issue by jmac698 at digitalfaq.com forums, adjust as needed:

Code:
#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)
juhok is offline   Reply With Quote
Old 8th July 2012, 19:59   #5  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 773
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
Mounir is offline   Reply With Quote
Old 8th July 2012, 21:49   #6  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Quote:
Originally Posted by Mounir View Post
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 is offline   Reply With Quote
Old 9th July 2012, 10:22   #7  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Quote:
Originally Posted by juhok View Post
Here's a suggestion for a similar issue by jmac698 at digitalfaq.com forums, 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.

Code:
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
lansing is offline   Reply With Quote
Old 10th July 2012, 03:57   #8  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,867
Hmm, my scripts do get around.. glad it worked
jmac698 is offline   Reply With Quote
Old 17th September 2017, 14:08   #9  |  Link
cooli
Registered User
 
Join Date: Jul 2003
Posts: 18
Hello,
how can I adapt this to a right vertical green line?


Last edited by cooli; 17th September 2017 at 16:46.
cooli is offline   Reply With Quote
Old 17th September 2017, 19:54   #10  |  Link
LemMotlow
Registered User
 
Join Date: Jul 2011
Location: Tennessee, USA
Posts: 266
I already did that with chuibbyrain2 in the script in a previous thread. https://forum.doom9.org/showpost.php...58&postcount=2. Here's the part that cleaned it up:

Code:
# ------------ 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:

Code:
LoadVirtualDubplugin("drive:\path\VirtualDub\plugins\ccd.vdf","CamcorderColorDenoise",1)
ConvertToRGB32(interlaced=false,matrix="Rec601")
CamCorderColorDenoise(32,1)
Sorry to didn't take notice.
LemMotlow is offline   Reply With Quote
Old 17th September 2017, 22:33   #11  |  Link
cooli
Registered User
 
Join Date: Jul 2003
Posts: 18
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.

Quote:
Originally Posted by LemMotlow View Post
I already did that with chuibbyrain2 in the script in a previous thread. https://forum.doom9.org/showpost.php...58&postcount=2. Here's the part that cleaned it up:

Code:
# ------------ 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:

Code:
LoadVirtualDubplugin("drive:\path\VirtualDub\plugins\ccd.vdf","CamcorderColorDenoise",1)
ConvertToRGB32(interlaced=false,matrix="Rec601")
CamCorderColorDenoise(32,1)
Sorry to didn't take notice.
cooli is offline   Reply With Quote
Old 17th September 2017, 22:40   #12  |  Link
LemMotlow
Registered User
 
Join Date: Jul 2011
Location: Tennessee, USA
Posts: 266
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.
LemMotlow is offline   Reply With Quote
Reply

Tags
green bar, remove, top, vhs

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 13:44.


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