Have a large interlaced AVI file digitized from VHS or umatic tape. I don't have the tape so re-copying is not possible, if it would even help. The entire video (about 50 minutes) has the image problem as seen in sample. Can it be significantly reduced?
Also wondering if ivtc'ing is possible without dropped frames. I've tried TFM/Tdecimate on an AVI with similar specs and that happened. Deinterlacing with QTGMC to 29.97 looked better but motion has a blurry look.
Thanks.
+ Reply to Thread
Results 1 to 25 of 25
-
-
Here's a start:
Code:LWLibavVideoSource("Class clip.avi", format="YUY2") ConvertToYV12(interlaced=true) src = last # first dehalo BilinearResize(width/2, height) SeparateFields() Dehalo_alpha(rx=2.5, ry=1.0, BrightStr=1.5, DarkStr=1.5) Weave() Spline36Resize(src.width, height) # then fix first order ghost ColorYUV(gain_y=-60) Overlay(last, ShiftRight(24), mode="add", opacity=0.20) return(last) ################################################ function ShiftRight(clip v, int amount) { v.Crop(0,0,-amount,-0).AddBorders(amount,0,0,0) } ################################################
[Attachment 53116 - Click to enlarge] -
I use FFvideoSource to import video (I don't know if it's equivalent to using libavcodec), but the dehalo video looks too soft compared to the original.
I guess this halo/double-image was from interference during an over-air broadcast vcr recording. -
Yes, you have two issues: multipath reception causes the ghosting, and an overactive sharpening filter in the VCR causing halos.
Remove the dehalo portion of the script if you think it's softening the picture too much. You can also work on fine tuning the horizontal shift and and opacity values. And apply a second ghost removal for the further away ghost.Last edited by jagabo; 5th May 2020 at 15:29.
-
The trade-off in quality wasn't worth it (to me), but I still need some advice on deinterlacing. The blurring with motion is perhaps from blended frames, so instead of following QTGMC with "selecteven," I tried Srestore with 29.97, and 23.976, in two different scenes. Paradoxically, each frate worked good in one but not the other. I'd like to get the frate to 23.976, so I'm uploading the scene it failed in.
If you look at the woman's coffee cup as she lowers, it get funky. There was a similar issue when she talks, but I cut that off because the file size was getting too big. -
The problem with that clip is that the bottom part of the screen moves before the top part. So in one frame you'll see the part part of the frame is clean but there's blending in the bottom part. Then in the next frame the bottom is clean but there's blending in the top part. For example, after a simple bob(0.0,1.0), you'll see blending at the bottom of frame 60. Then at frame 61 the bottom is clear but the top is blended. )The blending on the top of frame 61 is a little hard to see but if you move on to frame 62 you'll see the top part clean up.)
So there aren't enough completely clean frames for SRestore() to produce a perfect result. In many cases it just has to pick frames with the least blending. -
Thanks, jagabo. I was hoping setting some parameters might enable it to lock onto the right fields or frames. I was confused by the plugin write-up.
If 23.976 isn't going to be perfect, is there a better way to get 29.97 progressive than Qtgmc.selecteven? -
You could try using SRestore() on the top and bottom portions separately, then stacking them back together. I did a quick test with and it looked better for the most part.
-
That's thinking outside the box (from my pov). How do you call srestore twice? Did you use 2 different scripts, and stack them in the 2nd script? Or stack top/bottom as left/right, call srestore, then reverse stacking steps? I tried that (using frate 23.976) but had the same results.
Last edited by spiritgumm; 18th May 2020 at 09:44.
-
I did this:
Code:LWLibavVideoSource("C:\Users\John\Downloads\2ndclip.dv", format="YUY2") QTGMC(preset="fast") top=Crop(0,0,-0,340) bot=Crop(0,340,-0,-0) top = top.SRestore(frate=23.976) bot = bot.SRestore(frate=23.976) StackVertical(top, bot)
-
I'm using 64 bit AviSynth+ and fairly recent versions of most filters.
SRestore version 2.796
# 10/28/2013 martin53
# - Update v2.7e -> v2.7f
# Callable more than once from the same script with help of unique global variables per instance.
# Moderate reformatting to re-establish readability with the new variable names.
# Needs GRunT pluginLast edited by jagabo; 18th May 2020 at 13:08.
-
Yep, I found that SRestore version (which was missing a function). Seems to work with 64bit Avisynth 2.5.
It worked for splitting it in half (crop 240), but produced slight jerky video in another part of clip. Maybe because there was momentary videotape snow across the middle of the frames and SRestore picked cleaner frames (the snow was mostly removed).
Because your 340/140 crop is off center, the snow is untouched, and video was not jerky. So that's good, unless something throws off the function elsewhere (like lower snow).
Is there a reason you chose 340/140? That is, does the blending always effect the bottom third that way? Or is this random, so that proportion wouldn't be correct for upper blend problems?
Btw, are the negative signs for zeroes in your crop necessary?Last edited by spiritgumm; 18th May 2020 at 15:40.
-
I looked at the position where the ghosting transitions in the frame. It's hard to tell but it's around line 340. I don't know if it changes in the full video.
You are correct, the negative signs for the zeros aren't necessary. I just like to use them for visual consistency. Ie, negative values for the 3rd and 4th values mean "remove that number off columns/lines", positive values mean "keep that number of columns/lines". -
Here's a script that blends the boundary between the top and bottom parts:
Code:LWLibavVideoSource("2ndclip.dv", format="YUY2") QTGMC(preset="fast") split = 340 # specify top/bottom split top=Crop(0,0,-0,split+16).AddBorders(0,0,0,height-split-16) bot=Crop(0,split-16,-0,-0).AddBorders(0,split-16,0,0) top = top.SRestore(frate=23.976) bot = bot.SRestore(frate=23.976) alpha = StackVertical(Crop(0,0,-0,split).ColorYUV(off_y=256), Crop(0,split,-0,-0).ColorYUV(off_y=-256)) alpha = alpha.BilinearResize(width, height/8).BilinearResize(width,height) Overlay(bot, top, mask=alpha)
-
You might not have seen this problem in the clip I uploaded. I did the entire show overnight, and using the prior script, the two sections are frequently not synced. I'm uploading a processed clip a few seconds earlier than the original clip to demonstrate. When the camera moves across the drums at 3 seconds, and guy's belly at 10 seconds. Scene changes (5,7 seconds).
I just tried your border mask in same clip as below, which helped with the separations and even one of the scene changes, but I wonder if it will look okay on a TV, or if encoded to dvd mpeg.Last edited by spiritgumm; 19th May 2020 at 08:19.
-
Yes, I mentioned that you might get tears when the selected top and bottom didn't come from the same film frame.
-
I appreciate all your work - I can't even figure out how your last script works - but I don't like this split method. Splitting it exactly in half worked best, except for when a tape glitch threw it off. If that was the only reason for that problem, it would be acceptable since there aren't many tape glitches. But the tearing at scene changes is unacceptable.
-
jagabo, I have some mpeg made from these avi (or from the video that was used to make the avi). They don't look interlaced to me, and look better than the 29.97 fps progressive video I made. But they have the same field pattern as the AVI and are identified as interlaced. I tried to replicate this with HC encoder, but the video looks badly interlaced (guess I'm not doing it correctly). I'm attaching a sample of the mpeg (without audio) made by the folks that made the AVI transfers. Thanks for any guidance on this.
-
I don't understand the question. The m2v has the same problem as the earlier AVI (fields partly from different film frames). Unlike the AVI it's encoded interlaced. But like the AVI it has some interlaced frames.
-
To my eyes, watching this from a dvdr on HD TV looks great, as well as on my monitor using Media Player. The mpeg came with the AVI from the same source people. I hadn't watched it since I wanted to use the earliest source material (the AVI) to work on. I was focused on cleaning it up, and encoding deinterlaced progressive video, which unfortunately has an odd blurry look during motion (whether to MKV or mpeg). Anyway, I thought the accompanying mpeg looked good for dvd video. However, when I try to encode the AVI to interlaced mpeg, it looks terrible.
-
All you have to do is pass the AVI frames to an MPEG 2 encoder and encode as interlaced, bff. It will playback exactly the same as the m2v clip.
-
Ah, I was thinking "assumebff" in the script would address the BFF setting. Ticking the BFF setting in HC encoder was the solution. Will this work after I clean up the video? Will an MKV encode have visible interlacing (by that I mean combing, which for some reason I'm not seeing with the mpeg)?
-
Last edited by jagabo; 4th Jun 2020 at 12:19.
Similar Threads
-
Double Image
By Micheal81 in forum RestorationReplies: 14Last Post: 6th Apr 2020, 21:38 -
Removing dark artifacts around halo's
By killerteengohan in forum RestorationReplies: 11Last Post: 28th Mar 2020, 10:46 -
Assistance in halo trail removal/reduction in animation?
By StevenRichard in forum RestorationReplies: 0Last Post: 20th Feb 2019, 16:47 -
What causes the dark halo around bright spots on old video?
By brassplyer in forum EditingReplies: 7Last Post: 30th Jun 2018, 18:33 -
Color bleeding + halo?
By bugsyb in forum Capturing and VCRReplies: 2Last Post: 3rd Jun 2015, 01:50