View Full Version : Fixing Horizontal VHS Tracking Noise
Revgen
13th June 2011, 08:38
Source: http://www.megaupload.com/?d=U9WSKQQL
Processed clip: http://www.megaupload.com/?d=SYX3MMQL
Mask: http://img10.imageshack.us/img10/175/inpaintmask5.png
SetMemoryMax(700)
v1=avisource("batsource.avi").converttorgb24()
#v2=converttorgb24(v1).crop(0,0,0,-13).addborders(0,0,0,2,$008000)
#v3=converttorgb24(v1).crop(0,470,0,0).addborders(0,1,0,0,$008000)
#v4=Stackvertical(v2,v3)
v5=imagesource("E:\inpaintmask5.png",start=0,end=0,pixel_type="RGB24")
greycinpaint(v1,v5,init=4,iter=10,threads=1)
converttoyv12()
I'm trying my best to eliminate the constant tracking noise at the bottom of the clip. The best solution I could find so far is using greycinpaint. Unfortunately, it's really really slow. I'm wondering if they're are faster solutions or perhaps even ones that are more ideally suited for this problem.
2Bdecided
13th June 2011, 11:38
You are lucky to have such a small problem area, with stable video above and below.
When I've tried this with my videos, where the bottom 9 lines are basically junk, the inpainting was sometimes wrong, and often temporally unstable. This was really distracting. So I just blacked those lines out. Which is at least faster ;)
Is that inpainting algorithm faster if you don't feed it the whole frame?
Cheers,
David.
Ghitulescu
13th June 2011, 13:33
Crop all sides (for PC) or black them (for tape/DVD). This area is a spare one and should not contain any information. It is also not shown on TVs because of overscan.
2Bdecided
13th June 2011, 15:28
It's not shown on TVs (even modern ones) if you feed an SD signal.
But if you were to feed it from a PC, or upscaled via HDMI etc, then it would be visible on many modern TVs.
It won't contain captions etc, but it obviously contains valid picture information, trashed by the VHS head switching.
Cheers,
David.
Ghitulescu
13th June 2011, 15:34
... it obviously contains valid picture information, trashed by the VHS head switching.
AFAIK these lines contain some duplicated info, and since it's not shown anyway, it shouldn't harm to remove the whole overscan. When the VHS was invented no HDMI, no PCs and no flatscreen TVs existed. My Pio doesn't show any underscan irrespective of the source, if it was once analog. Also PIP shows the overscanned image.
Revgen
13th June 2011, 17:23
@2Bdecided Yep, the area is only 3 pixels high, with usable information above and below, so the inpainting works pretty well. It's not faster if I crop it. The only way to make it faster is to use SetMTMode or reduce the "iter=x" parameter. It's still very slow regardless of what I do, I'll probably just have to accept that. I use an HTPC so removing it is necessary.
@Ghitulescu Cropping isn't the answer for me. I want to see as much of the picture as possible.
Thanks for the ideas, but it looks like this is the ideal solution for me so far.
2Bdecided
13th June 2011, 17:51
It's not faster if I crop it.Unless that's a typo, it's really weird if crop and inpainting are the same speed. Maybe there's a huge speedbump elsewhere?!
Cheers,
David.
2Bdecided
13th June 2011, 17:51
AFAIK these lines contain some duplicated infoNo, they don't. ;)
Ghitulescu
13th June 2011, 18:07
@Ghitulescu Cropping isn't the answer for me. I want to see as much of the picture as possible.
I cannot see the clip on my linux, but if it originated from a commercial source (and their team did its job) you won't loose anything from the picture. Cropping the overscan (or at least the "defective" part) it will render the image as seen on TVs and control monitors (set on overscan ;)), as the director wanted it.
Revgen
13th June 2011, 18:38
Unless that's a typo, it's really weird if crop and inpainting are the same speed. Maybe there's a huge speedbump elsewhere?!
Cheers,
David.
I misunderstood what you said.
Yes, cropping is faster than inpainting.
Revgen
13th June 2011, 18:40
I cannot see the clip on my linux, but if it originated from a commercial source (and their team did its job) you won't loose anything from the picture. Cropping the overscan (or at least the "defective" part) it will render the image as seen on TVs and control monitors (set on overscan ;)), as the director wanted it.
The director made this film in 1926. I very much doubt he thought it would be shown on TV.
If you're using linux, you should be able to play the source with Mplayer.
Ghitulescu
13th June 2011, 20:23
Since I'm a fan of silent movies, I can tell that there are more silents on DVD than on VHS. Instead of spending hours on converting an inferior format, why not spend some/few $ for the DVD version? Of course I might be wrong and your movie never appeared on DVD or in your region. And there are fan communities ready to swear that VHS versions have more seconds :) than the DVD one.
Concerning the picture "visibility", I'm not sure that you know you can't see the original frame even in a cinema :) the 35mm frame is matted to hide the imperfections at the margins, and to adjust the DAR to match the director's intent (a fullframe projection might reveal props, lousy microphones etc).
Revgen
14th June 2011, 00:38
Since I'm a fan of silent movies, I can tell that there are more silents on DVD than on VHS. Instead of spending hours on converting an inferior format, why not spend some/few $ for the DVD version? Of course I might be wrong and your movie never appeared on DVD or in your region. And there are fan communities ready to swear that VHS versions have more seconds :) than the DVD one.
Concerning the picture "visibility", I'm not sure that you know you can't see the original frame even in a cinema :) the 35mm frame is matted to hide the imperfections at the margins, and to adjust the DAR to match the director's intent (a fullframe projection might reveal props, lousy microphones etc).
The silent movie in question is from a DVD. The master is a VHS. I didn't make it, but it came to me this way.
At this point it seems to me that you're making assumptions about the video. A video that you claim you haven't even watched. If I cropped the picture as you have suggested, than I'd be cropping out part of the clock at the 8 second mark. That would not look aesthetically pleasing to my eye.
2Bdecided
14th June 2011, 16:55
There's the maximum area that can be exposed on the film without revealing the sprocket wholes, the "correct" area, the camera gate, the projector gate, the scan area on the telecine, and the area that gets through VHS unscathed.
At each stage, the picture area is reduced. If care if not taken to maximise what's preserved at each stage, you can end up with far less picture than the director originally intended!
Many vintage films are/have been telecine'd with a reduced area, visibly cropping important details, or even captions, when displayed on a TV with normal overscan.
Many older telecines seem to default to academy, cropping it to 1.33 (from 1.37), and zooming in quite a bit to hide any edge defects. Putting a silent film through this process without re-adjusting will lose even more of the original image (since the full silent film frame is larger than the academy frame).
EDIT: a picture is worth all those words...
http://www.widescreenmuseum.com/widescreen/filmdims.htm
Cheers,
David.
Ghitulescu
14th June 2011, 19:32
There's the maximum area that can be exposed on the film without revealing the sprocket wholes, the "correct" area, the camera gate, the projector gate, the scan area on the telecine, and the area that gets through VHS unscathed.
At each stage, the picture area is reduced. If care if not taken to maximise what's preserved at each stage, you can end up with far less picture than the director originally intended!
Many vintage films are/have been telecine'd with a reduced area, visibly cropping important details, or even captions, when displayed on a TV with normal overscan.
Many older telecines seem to default to academy, cropping it to 1.33 (from 1.37), and zooming in quite a bit to hide any edge defects. Putting a silent film through this process without re-adjusting will lose even more of the original image (since the full silent film frame is larger than the academy frame).As usual, you're almost all the time correct. However, all these are beyond my reach as a consumer, so I have to trust the transfer operator that s/he handles the film material in a correct manner.
The silent movie in question is from a DVD. The master is a VHS. I didn't make it, but it came to me this way.
At this point it seems to me that you're making assumptions about the video. A video that you claim you haven't even watched. If I cropped the picture as you have suggested, than I'd be cropping out part of the clock at the 8 second mark. That would not look aesthetically pleasing to my eye.
My PC runs linux and fails to have most codecs, due to licences and HDD space (server HDDs of affordable price are quite small in size :)).
There is only one DVD that had a VHS master AFAIK, it's a series of documentaries concerning the WWI and WWII. There are also exploitation movies those only surviving master was a Umatic master tape, and of course the adult ones that have been filmed in VHS (or for this matter in S-VHS) originally. If one could telecine a film for VHS then the celluloid/nitrate (or safe copy thereof) is available, as the current code of practice requires that the transfer be made from a copy and not from the original itself.
Anyway the public archive contains a 16mm copy thereof encoded as MPEG-4 in case you may want it. http://www.archive.org/details/TheBat1926
Filker
15th June 2011, 00:23
Maybe it's faster to crop the frame into two images from the middle of the noise line use a border softner like bordercontrol:
http://www.geocities.com/siwalters_uk/bdrcntrl.html
and stack the top and bottom back again.
greycinpaint is slow as hell, maybe a logo remover will be faster with similar sophistication level.
manono
15th June 2011, 07:48
There is only one DVD that had a VHS master AFAIK...
I must be misunderstanding this because I personally know of hundreds of retail DVDs made from VHS sources.
Revgen
15th June 2011, 16:56
Maybe it's faster to crop the frame into two images from the middle of the noise line use a border softner like bordercontrol:
http://www.geocities.com/siwalters_uk/bdrcntrl.html
and stack the top and bottom back again.
greycinpaint is slow as hell, maybe a logo remover will be faster with similar sophistication level.
Thanks for the bordercontrol suggestion. It's definitely faster than greycinpaint, but unfortunately this is a classic case of "getting what you pay for".
I don't mind paying the cost somewhat, say 3-4fps. Unfortunately, greycinpaint is so slow it goes at 0.40fps even with MT turned on.
I'll try some delogo scripts and see if they work better.
StainlessS
16th June 2011, 01:59
This does a fairly reasonable job:
Import("D:\avs\SCRIPT\S_ExLogo.avs")
Avisource("D:\avs\avi\batsource.avi")
ConvertToYUY2() # For S_ExLogo()
S_ExLogo(0,466,-0,4,LOGOMODE=2) # '-0' = Full width as in crop
#EDIT: S_ExLogo(0,467,-0,3,LOGOMODE=2) # Probably better
return last
I did not spend more than 60 seconds setting it up,
but it looks ok. Might need to play with the vertical dimensions,
if crud is wondering about.
Should easily play in real time.
See here for the thread:-
http://forum.doom9.org/showthread.php?t=154559&highlight=s_exlogo
EDIT: Additional args to play with
LOGOMODE=0 # Initial logo position setup (2=normal use)
Amount=252 (default), # 256=fully opaque, reduce to show some of the damage
BLURMODE=4 (default Blur(1.0)), # =0 OFF, =5 Maximum .
Minimum height possible = 2
Gerry62
25th June 2011, 17:13
Wow, Its pretty Clean compared to the rubbish prints I get to work on!
When did you convert it to 19.8fps? Id do all that After any cleaning work, more chance to clean more junk out.
What I'm more interested in, is how you will Clean the image, Got any scripts in mind?
Just to get the creative juices going, Here's a '10 second' clean I just did of the said clip, Remember I'm only new to scripting!
http://www.megaupload.com/?d=J1S5L9FN
Ive used one of the stock standard de-logo VDUB ones here.
I also believe in the 'theroy' that If a source is released on any format then it's utterly pointless to spent many hours trying to polish a turd, If it's 'out there' then it seems a waste to work on it. Not trying to be negative, but Ive many thousands of audio restorations under my belt, and when the customer hands you some crappy '101 strings' album that looks as if someone has eaten thier dinner from it, it's always handy to have a massive collection of 'good' copies. I mean, 2$ from Ebay, or 2 hours cleanig every click by hand... I know what I'd rather do!
Then again, you can't do that with Acetates and one shot 16inch TS discs
Revgen
28th June 2011, 08:43
Wow, Its pretty Clean compared to the rubbish prints I get to work on!
When did you convert it to 19.8fps? Id do all that After any cleaning work, more chance to clean more junk out.
What I'm more interested in, is how you will Clean the image, Got any scripts in mind?
Just to get the creative juices going, Here's a '10 second' clean I just did of the said clip, Remember I'm only new to scripting!
http://www.megaupload.com/?d=J1S5L9FN
Ive used one of the stock standard de-logo VDUB ones here.
I also believe in the 'theroy' that If a source is released on any format then it's utterly pointless to spent many hours trying to polish a turd, If it's 'out there' then it seems a waste to work on it. Not trying to be negative, but Ive many thousands of audio restorations under my belt, and when the customer hands you some crappy '101 strings' album that looks as if someone has eaten thier dinner from it, it's always handy to have a massive collection of 'good' copies. I mean, 2$ from Ebay, or 2 hours cleanig every click by hand... I know what I'd rather do!
Then again, you can't do that with Acetates and one shot 16inch TS discs
Wow, I forgot about this problem. I was busy with other stuff. I'll try the new ideas sometime soon.
I'm not exactly trying to "polish a turd" as much as I just want to get rid of the most disgusting issue which is the line at the bottom. Once that is gone, I can start cleaning it up.
As far as denoising before decimating goes, I don't think it's useful for B&W film. Getting rid of rainbows just requires the greyscale() filter. And I've yet to see any issues with noise removal after deinterlacing and decimating.
As far as noise-removal goes, I'll probably just use FFT3DFilter or MDegrain.
StainlessS
5th July 2011, 18:28
I'm not exactly trying to "polish a turd" as much as I just want to get rid of the most disgusting issue which is the line at the bottom.
I did not really want to bump this, but you seem not to have
seen my previous post on this matter (one before Gerry62).
If you did see the post and try the solution, did it not live
up to expectations?
I did try to download your clip when 1st put up, unfortunately,
my ISP was crippling my download speed from that site, and
~30MB at 2-3KB per second was more than I could bare.
If you did try it out, and it did not work for you, at least let me
know what was lacking, thanks.
Edit: answer here or in the s_ExLogo thread, whichever you prefer.
Gerry62
10th July 2011, 18:16
Thanks, Yep will try those things out tomorow, System doing a long 19hr job!
Sorry for not getting back!
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.