Good afternoon friends,
First of all, I apologize for my English when using the translator.
I really appreciate having discovered this forum so that we restoration lovers can have help from friends to achieve our goal, and I hope that some kind soul can help me in this mission.
Well, I have some files (VHS-Rip) that are very problematic, and I don't have the VHS to be able to digitize with a better quality, so I would have to restore them the way they are.
Unfortunately, I have no knowledge with Avisynth or software that uses programming codes, but if someone is willing to make a tutorial specifically for my case, I would be very grateful for that.
I wanted to know if there is a software that does a good restoration with this file of mine (Film9) for example...
As you can see from the video I left the link, the file has A LOT of lack of stabilization, tremors, and what bothers me most about the image would be this horizontal defect (defect of the damaged vhs), would it be possible to use some technique to remove it?
Speaking of this horizontal strip, I saw an example of restoration on YouTube, in which they used a technique in Avisynth to remove it, but as I said earlier, I have no knowledge of the software and I am looking for an easier software that does something similar...
+ Reply to Thread
Results 1 to 30 of 34
-
Last edited by Isac.martins; 7th Nov 2023 at 17:25.
-
Neat Video (plugin available for multiple other tools)
or
Topaz Video
might be something easy to use, which could help a bit, but that video looks too far gone to get something I would call 'usable'.users currently on my ignore list: deadrats, Stears555, marcorocchini -
You cannot do anything with the noise at the bottom (and the top) except to crop it. "Cropping" means that you remove it by replacing it with black.
The occasional loss of color cannot be fixed with tools available to us.
Some of the jumping that only lasts for one frame can be fixed with an AVISynth script which detects a frame which does not match either the the previous or the next frame, and inserts a duplicate of the previous frame. I did this for movie film which was recorded in a defective camera, but the same trick works for video:
Restoration of Jumpy Film
After you do those two things, you might be able to make the remaining video look a little better using Neat or some other denoiser, but don't expect too much. I think cropping and removing the jumps is about all you can do. -
Friend, I saw this example on YouTube that you sent, this guy used AVIsynth with MFlow in the MVtools2 function, I sent you the attached print with him explaining...
But I don't know how to use AVIsynth, could you help me by making a tutorial with this technique he did? 🙏🏻 -
You are asking a lot for a stranger to design a custom tutorial, just for you.
Use Google to find AVISynth tutorials which already exist. You will be able to get these tutorials instantly, rather than wait for someone to respond. Here is one example of what you will get if you use the Google search engine:
Getting started - Avisynth wiki -
Sorry if I'm bothering you friend, but if I'm here creating the topic, it means that I've already used the Google tool before in search of a tutorial that could help me, but unfortunately I couldn't find it.
I admired your great work so I wanted to know how you managed to get to the result, I didn't think that sharing a little of your knowledge would be too much to ask or an arduous task to help someone like me who is so inexperienced with software, unlike you.
Again sorry for the request. -
Have you actually read the tutorial I linked to and tried to do the things it suggests? There is nothing that I, or anyone else, will be able to tell you which will be any different from the instructions that tutorial provides.
My suggestion: read it and try doing what it tells you to do. -
-
-
Here is a link to not only the script, but the discussion which surrounded my development of the script so you can get some idea of how it works:
Finding individual "bad" frames in video; save frame number; or repair
If you want to use the script, I posted a better version later in that thread:
Better Version of Script -
-
One note: my script will only work when there is a single-frame jump. Your video does have a few places where the video jumps up and stays there for 2-3 frames. My script will neither detect or repair those multiple-frame jumps.
-
Gosh what a pity,
Will you get a similar effect using the deshaker in VirtualDub? I wanted to use a tool that didn't have to crop the image by zooming in to stabilizeLast edited by Isac.martins; 12th Aug 2023 at 20:50.
-
I was the person who wrote the Deshaker manual fifteen years ago so I know quite a bit about it. It works well for stabilizing continuous movement, but cannot deal with discrete jumps, such as you have in your video.
I don't know of any way to stabilize a jump which persists for more than one frame other than to do it manually in an editing program. -
As I already told you on youtube, there is not much you can do to fix the video, but you can improve a little bit the overall look.
bad area of the picture: just crop as johnmeyer suggested
visual aspect: deinterlace, dehalo, denoise as jagabo suggested
interpolation of bad frames: this can be do for dropped frames and for heavily damaged frame(s) that you can replace with a new generated frame(s); there are several example in the forum, search for ReplaceFrames AviSynth functions (based on MVTools, SVPflow, RIFE)
concerning the shifted fields/frames some of them can be detected automatically (but the picture must be clean across time, which is not your case), some not. Search digitalfaq forum and doom9 forum for some threads about "shifted fields". Unfortunately, in most of the case a manual operation of shifting the fields is required in AviSynth, which is heaily time consuming. For tenth of operations still makes sense, for thousands of frames is insane (but you can afford it if you really want)
Instead of asking for a dedicate tutorial in general your approach should be to try yourself to implement a first solution, and then ask for help in improving/rewrite/change. And we'll be happy to support you. -
The small vertical bounces can be fixed with Stab(). I think I've worked out a way to detect the larger (~20 lines), single frame, vertical bounces. Here is the same section I posted above with a fix for that (interpolated with InterFrame). The interpolated frames are marked as such in the top left corner to make them easy to detect.
The video also has a problem with duplicate frames... -
And here's a clip where I tried to reduce the black dot noise in highly saturated parts of the video. A lot of the dots are gone but there's some ghosting too.
-
-
I worked out a way of fixing multiple shifted frames.
Oh, I should first point out that the badly shifted frames were almost always shifted up by 20 lines. So my shifted frame detector detects frames that are shifted up about 20 lines relative to the following frame. It works well when a single frame is shifted up. When multiple frames are shifted up it detects only the last one. In my earlier attempts I was replacing the shifted frame with a motion interpolated frame based on the frame before and the frame after. This doesn't work right when multiple sequential frames are shifted -- the shifted frame is replaced with a half shifted frame.
I then started looking at just shifting the frame down by 20 lines. That leaves garbage (the top 20 lines of the original frame) at the top of the frame. So I copied the top 20 lines of the next frame to fill the area. That works well when there isn't much motion at the top of the frame. In cases where multiple sequential frames are shifted the last of the sequence is now "fixed". I can repeat the process to fix the next to last of the original sequence. Again to fix the next. Etc. I can fix N sequential shifted frames by calling the function N times.
Attached is a sample where a sequence of 3 frames is fixed starting at 1951, then a sequence of 4 frames starting at 1962. -
Shifting is what you have to do when there are multiple frames in a row which have shifted up or down. I've many times had to do what jagabo describes, although I've always done it manually in Vegas. To get the top of the frame to fill in, once I've shifted it down by 20 frames (or whatever the number happens to be), I simply put a copy of the video on the track below and shift it by "x" number of frames, where "x" is the number of shifted frames. The way Vegas works, any blank space left from the shifting is automatically filled in with the video from the tracks below. It isn't perfect, but is far better than the original jumpy video.
For your video, jagabo's technique should work pretty well. -
-
Unfortunately, the jumps mostly coincide with duplicate frames. So even though they no longer bounce up they're still duplicates.
-
-
Here's the script as I have it now:
Code:########################################################################## # # Abs(Y1-Y2) # # Works for YUY2 and YV12 only # ########################################################################## function AbsSubtractY(clip v1, clip v2) { IsYUY2(v1) ? mt_lutxy(v1.ConvertToYV16(), v2.ConvertToYV16(),"x y - abs", chroma="-128").ConvertToYUY2() \ : mt_lutxy(v1, v2,"x y - abs", chroma="-128") } ########################################################################## # # Saturation mask, rough approximation # ########################################################################## function SaturationMask(clip c) { U = UtoY(c) V = VtoY(c) mt_lutxy(U, V, expr="x 128 - abs 2 * dup * y 128 - abs 2 * dup * + 0.5 ^") PointResize(c.width, c.height) } ########################################################################## # # Copy lighter pixels from previous and next frames in very high saturation areas. # ########################################################################## function LightenBlackDots(clip c) { lightened = Overlay(c, c.Loop(2,0,0), mode="lighten") # overlaylighter pixels from previous frame lightened = Overlay(lightened, c.Trim(1,0), mode="lighten") # overly lighter pixels from next frame SatMask = SaturationMask(c).ColorYUV(gain_y=400, off_y=-200).mt_expand() # an alpha mask based on saturation Overlay(c, lightened, mask=SatMask) # limit black dot removal to high saturation areas } ########################################################################## # # Shift the frame down by N lines if it's detected as shifted up by N lines relative to the next. # Works well for static shots, probably not for high motion shots. # ########################################################################## function DownShift(clip c, int lines) { c AbsDiffShifted = AbsSubtractY(Crop(0,0,-0,-lines).AddBorders(0,lines,0,0), Trim(1,0)) AbsDiffLast = AbsSubtractY(last, Trim(1,0)) TestFrame = Subtract(AbsDiffLast, AbsDiffShifted).Crop(32,32,-32,-32).AddBorders(32,32,32,32,color=$7f7f7f) ConditionalFilter(TestFrame, Overlay(last.Trim(1,0), last, x=0, y=lines), last, "AverageLuma", "greaterthan", "129") } ########################################################################## # # Main script # ########################################################################## LWLibavVideoSource("copia.mkv", cache=false, prefer_hw=2) # # reduce MPEG DCT blocking, interlaced # SeparateFields() Deblock(quant=40) Weave() # # deinterlace # QTGMC(Sharpness=0.0) # # reduce over sharpening halos # dehalo_alpha(rx=3, ry=3) # alternatively, FineDehalo() will fix only the strongest halos and remove less detail # # lighten black dots in high saturation areas. You may want to limit this to the early part of the video # LightenBlackDots() # # General noise reduction, cleaning # SMDegrain(thsad=300, tr=3) # temporal noise reduction MergeChroma(aWarpSharp2(depth=20)) # sharpen chroma ChromaShiftSP(x=2, y=2) # shift the chroma to better align with luma # # Shift down frames that are detected as shifted up by 20 lines # Up to 4 in a row with four calls # DownShift(20) # fix single frames shifted up by 20 lines DownShift(20) # again to cover two in a row DownShift(20) # again to cover three in a row DownShift(20) # again to cover four in a row # # Further stabilize frame bounce # Stab doesn't work for very large bounce (like 20 lines) # Crop(16,8,-16, -48) Stab(dxmax=4, dymax=8, range=2, mirror=15) # AddBorders(16,8,16,48) # restore frame size if needed prefetch(20)
-
-
-
Similar Threads
-
Restore a wavy VHS capture with software
By the98 in forum EditingReplies: 0Last Post: 11th Aug 2021, 15:08 -
Seeking someone to restore a 120 minute PAL VHS capture!
By editor999 in forum RestorationReplies: 15Last Post: 16th Jul 2020, 05:08 -
VHS restore script review
By FLP437 in forum RestorationReplies: 10Last Post: 12th Jan 2020, 17:17 -
AVIsynth tutorial for newbies please from start to finish for VHS restore
By seby20 in forum RestorationReplies: 1Last Post: 2nd Jan 2020, 10:43