Hi everyone,
I am digitalizing some old VHS-C tapes from the 90's. However when the last few tapes where shot back then, the camera was going bad. Apparently one of the record heads was going bad, resulting in noise and and reduced colors in only the odd frames. The other frames look good. see the examples below.
I was wondering if it is possible to improve those bad frames using the good ones. But since i have alsmost no experience at video editing i have no idea how. So i was wondering if someone knows some tricks to do this. I am currently using adobe premiere pro CC 2015 and i also have after effects installed.
Is there someone who could help me?
Thanks a lot.
Good frame:
[Attachment 54040 - Click to enlarge]
Bad frame:
[Attachment 54039 - Click to enlarge]
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 17 of 17
Thread
-
-
VHS-C is interlaced video. Are your 2 pictures taken after deinterlacing/bobbing? Maybe only one field of the interlaced source is bad and you could just bob and keep the good field, loosing temporal resolution unless you synthesize and replace the dropped bad field.
When you upload a short sample of the captured source you may get better advice. -
If you look at the Y, U, and V channels you'll see that the problem is mostly in the chroma channels:
Good YUV:
[Attachment 54042 - Click to enlarge]
Bad YUV:
[Attachment 54043 - Click to enlarge]
If the bad frames are infrequent and there's not too much motion you can detect the bad frames and replace the chroma with the chroma of a good frame (in AviSynth):
[Attachment 54044 - Click to enlarge]
A video sample would be helpful. -
Want my help? Ask here! (not via PM!)
FAQs: Best Blank Discs • Best TBCs • Best VCRs for capture • Restore VHS -
-
I wrote a script to automatically detect frames which differ significantly from both adjacent frames. It gives you the option of simply saving the bad frame numbers, or having the script automatically replace a bad frame with a frame motion estimated from its neighbors.
Here is a link to that script:
Finding individual "bad" frames in video; save frame number; or repair
Note that there is a link in the first line of my post which takes you to a better version of the script which I eventually created using hints and ideas that people gave me.
To adapt the script to the OP's problem, and given what jagabo showed (that the main problem is in the chroma channel) I would probably add a couple of lines to feed the comparison function only the chroma portions of the video.
BTW, one neat thing about scripts like this one is that if you set the threshold a little too low so that some frames are flagged that aren't really a problem, the motion estimation usually creates a replacement frame that is very close to the real frame. -
I only have two frames to work with so I wrote a script that interleaves them, identifies the frames with more noise in the Y channel, and replaces the chroma of those frames with the chroma of the frame before:
Code:########################################################################## # # Abs(v1-v2) # # Y, channel only # ########################################################################## function AbsSubtract(clip v1, clip v2) { Subtract(v1, v2) Overlay(last.ColorYUV(off_y=-126), last.Invert().ColorYUV(off_y=-129), mode="add") } ########################################################################## v1 = ImageSource("good.jpg", start=0, end=23, fps=23.976) # get the good image as a short clip v2 = ImageSource("bad.jpg", start=0, end=23, fps=23.976) # get the bad image as a short clip src = Interleave(v1, v2).ConvertToYV12() # interleave the two videos, convert to YV12 test = src.ConvertToYV12().Spline36Resize(192, 288) # spots in the chroma channel reduced to about 1 pixel test = AbsSubtract(test.UtoY(), test.UtoY().Blur(1.4)) # subtract blurred image from original (a high pass filter) to see only spots, abs(v1-v2) patch = MergeChroma(src, src.Loop(2,0,0)) # merge luma of every frame with the chroma of the previous frame ConditionalFilter(test, patch, src, "AverageLuma()", "greaterthan", "5") # if the spots are strong enough select the patch image instead of the original
-
Thanks for the replies so far. I uploaded a sample video.
I have no real experience with video, but i do have a background in electronics/programming so hopefully i should be able to understand things.
I played the VHS-C tape in a VCR and captured the video using a dongle. I couldn't capture it directly from premiere so i had to use the software that came wit it. That software did output a mpeg file. I then used premiere pro in order to cut and edit the video in order to make a dvd.
Also the flickering noise is also visible on the (crt) tv when playing the tape. The good and bad frames are alternating. This continues to be the case for the whole tape.
Thanks for the scripts. I will have a look at aviSynth.
Since I will be busy the coming days it could take a while before i am able to respond. -
Every other frame is screwed up. All bad frames replaced with motion interpolated frames:
Code:########################################################################## # # Abs(v1-v2) # # Y, channel only # ########################################################################## function AbsSubtract(clip v1, clip v2) { Subtract(v1, v2) Overlay(last.ColorYUV(off_y=-126), last.Invert().ColorYUV(off_y=-129), mode="add") } ########################################################################## # replace every frame with a motion interpolated frame (between the frame before and the frame after) function InterpolateAll(clip c) { e = SelectEven(c).InterFrame(cores=4, FrameDouble=true).SelectOdd() o = SelectOdd(c).InterFrame(cores=4, FrameDouble=true).SelectOdd() Interleave(e,o) Loop(2,0,0) } ########################################################################## src = Mpeg2Source("Sequence 01.d2v") test = src.ConvertToYV12().Spline36Resize(192, 288) test = AbsSubtract(test.UtoY(), test.UtoY().Blur(1.4)) patch = InterpolateAll(src) ConditionalFilter(test, patch, src, "AverageLuma()", "greaterthan", "5")
-
Want my help? Ask here! (not via PM!)
FAQs: Best Blank Discs • Best TBCs • Best VCRs for capture • Restore VHS -
Note that the video the OP provided in post #8 had all even frames that were good, all odd frames that were bad. In that particular case it would have been easy to just blindly replace all the odd frames. But the code I gave identifies frames with the noisy chroma and replaces only those. Yes, in this case it's the same thing. But the given code would work with any random sequence of good/bad frames -- except when there are multiple bad frames in a row.
-
Jagabo provided the script in post #9. That script replaces the chroma in the bad frame with the chroma from an adjacent frame.
As for automatic detection, here is a link to the script I created over at doom9.org:
Finding individual "bad" frames in video; save frame number; or repair
This script detects frames which differ significantly from both adjacent frames (i.e., scene changes don't trigger anything).
All you need to do is put jagabo's function into my script, and change the call to the motion estimated replacement to a call to jagabo's function. -
Actually the script in post #9 replaces the bad frame with a motion interpolated frame. It could easily be changed to copy the chroma from the previous frame by replacing the "patch" line with the patch line from post #7. In this particular video motion interpolated frames look better because there's very little motion. It does screw up at the scene change though.
-
So ... what would a merge script look like then?
And how long does it take for you to run the script?
Perhaps some GPU acceleration?Want my help? Ask here! (not via PM!)
FAQs: Best Blank Discs • Best TBCs • Best VCRs for capture • Restore VHS -
The time would depend on the video, but generally speaking the script runs blazingly fast, usually several hundred fps. The reason for this is that the frame comparison logic uses the built-in AVISynth comparison functions. The interpolation code, which is pretty slow, only gets called when a replacement is actually needed.
However, if every other frame needs to be replaced, then the speed will drop to well below real time. -
I described how to use the previous frame's chroma in post #14.
Code:########################################################################## # # Abs(v1-v2) # # Y, channel only # ########################################################################## function AbsSubtract(clip v1, clip v2) { Subtract(v1, v2) Overlay(last.ColorYUV(off_y=-126), last.Invert().ColorYUV(off_y=-129), mode="add") } ########################################################################## # replace every frame with a motion interpolated frame (between the frame before and the frame after) function InterpolateAll(clip c) { e = SelectEven(c).InterFrame(cores=4, FrameDouble=true).SelectOdd() o = SelectOdd(c).InterFrame(cores=4, FrameDouble=true).SelectOdd() Interleave(e,o) Loop(2,0,0) } ########################################################################## src = Mpeg2Source("Sequence 01.d2v") test = src.ConvertToYV12().Spline36Resize(192, 288) test = AbsSubtract(test.UtoY(), test.UtoY().Blur(1.4)) #patch = InterpolateAll(src) patch = MergeChroma(src, src.Loop(2,0,0)) # merge luma of every frame with the chroma of the previous frame ConditionalFilter(test, patch, src, "AverageLuma()", "greaterthan", "5")
Last edited by jagabo; 11th Jul 2020 at 11:12.
Similar Threads
-
Burning recorded video
By Videographer in forum Newbie / General discussionsReplies: 2Last Post: 22nd Dec 2019, 04:13 -
Camera or Video Camera for film?
By Orange Fox in forum Camcorders (DV/HDV/AVCHD/HD)Replies: 4Last Post: 8th Sep 2017, 18:48 -
Random audio/video sync problem with webcam recorded video
By TinoArts in forum Video ConversionReplies: 2Last Post: 3rd Aug 2016, 12:57 -
How to save screen recorded video after editing
By shans in forum Video Streaming DownloadingReplies: 15Last Post: 28th Jan 2016, 19:46 -
Is it possible to have realtime video, inside a pre recorded video
By Oliver2854 in forum Video Streaming DownloadingReplies: 9Last Post: 8th Nov 2015, 09:12