Restoration or removal of horizontal stripes and other defects in the video

I saw this tutorial by @Bentacular and thought of other interesting applications to restore some of the defects in my videos.

Extracting a series of frames and then implementing them in the timeline can be a solution to correct some defects (such as scratches or cuts) in some home videos.


It is a laborious job because it involves extracting the damaged or flawed clips, editing them manually as images in an editor such as GIMP, and reincorporating them back into Shotcut.
I thought that perhaps duplicating the frame immediately before the bug and blending with the buggy frame(s) using a mask might be another solution.
Besides these options, is there a filter in Shotcut that helps to minimize small horizontal stripes in a less laborious way?

1 Like

A preliminary conceptual design of a filter comes to my mind:

  • The filter expects a black/white-binary mask to precede (and perhaps Mask:Apply after)
  • The mask needs to use Keyframes
  • For each pixel, the filter identifies the most recent non-masked frame, and the nearest future non-masked frame for that pixel.
  • The colors are averaged linearly.
  • (Or if cubic is selected, two frames unmasked ahead and two behind, cubic calculation)

A more complex version, using generated polygon submasks for each frame, one for each pair of “last frame where this was unmasked” and “first frame ahead where this is unmasked”, and applying these to a series of generated frames, created as if making a B-frame from the ahead and behind reference frames as if I-frames…
…can be envisioned, however, the computational horsepower required, and the software programming resources needed to create it, would probably be prohibitive.

In either case, this would create the unwanted side effect of a mask-shaped artifact, as even the good pixels would be replaced in the masked area of each frame. This could be minimized by yet another Keyframed mask, with feathered edges, controlling the opacity of overlaying the reconstructed pixels on the damaged frames.

(I’m not asking anyone to do it; just speculating on a possible design.)

Thank you for your reply. :slightly_smiling_face:
I will probably have to manually edit the extracted frames in an editor like GIMP using Heal Selection.

1 Like

That would be the easiest way to remove those lines in GIMP (Or Photoshop) when there is no camera movement. Copy the area from an unaffected frame and paste it on the damaged frames. That could be tricky thought when the camera moves. But not impossible.

2 Likes

Great use-case for the technique! I never thought of that, but great idea

2 Likes

This topic was automatically closed after 90 days. New replies are no longer allowed.