![]() |
Sanlyn,
Thanks a lot for taking your time to explain this again. I continue to use NeatVideo as this gives me the best noise filtering results from all the different things I tried and it's user friendly. I used to use settings below the default, but that slipped my mind and now I used default settings (adaptive, auto, 0% adjustment of noise level, 60% luma and 100% chroma noise reduction, 0% sharpening). Yes, there is a subtle loss of details in busy textures, but the awful noise of old and tired VHSc is gone. I see no posterization whatsoever. Thanks for clarifying the YUY2 vs YV12 difference. So far I used YUY2 or RGB only in the process, so it should be OK. Based on your post today, I started using Logarith/RGB for compression after the masking and Neatvideo. It runs slower than hyffyuv, but not a huge difference. I'll try later if that's acceptable for my later encoding/authoring/burning steps. in summary this is my most current workflow: 1. capture entire cassette with huffyuv/YUY2 2. VDub cutting into smaller clips (direct stream copy) 3. using your above .avs script for masking in Vdub combined with NeatVideo and save into Logarith/RGB does it look right to you? |
9 Attachment(s)
Quote:
The workflow looks OK to me. Again it comes down to preference. I use NeatVideo often, but not for everything and sparingly at that. Most of my denoising is in Avisynth, color correction in Virtualdub. There are many problema and defects that NeatVideo can't touch, and many that VirtualDub won't fix either. The more problematic the source, the less I can do with NeatVideo. Below are some examples..... The images are from a 1991 tape recorded off an underpowered cable signal overmodulated with a cheap RadioShack analog cable amp, with a cheap Sears RCA 2-head VCR at 6-hour speed (Yes, I could be shot for what I didn't know back then!). The noise is horrific, the color is putrid. I couldn't use my AG-1980 for playback, as the output had green or pink color bars across the top that came and went. The AG-1980 just didn't like that tape. So I used a rebuilt Panasonic PV-S4670 SVHS, an ES10 tbc pass-thru and an AVT-8710 frame tbc, into my AIW 9600XT card, to huffyuv YUY2. Below, from the original capture: Note the white spot on the right side and the greenish rainbow tint across the middle, plus discolored magenta and cyan blotches in the background and floor. There are about 12 of those bright white spots all over the frame during the short AVI sample I've attached to this post. Neither NeatVideo nor CamcorderColorDenoise could fix these uglies: http://www.digitalfaq.com/forum/atta...1&d=1501173496 Problems mostly fixed with QTGMC, dfttest, MDegrain2, RemoveSpotsMC, and color correction: http://www.digitalfaq.com/forum/atta...1&d=1501173568 Below, at the bottom there's a two-headed sudden bright flash on the floor, plus cyan and magenta noise in the floor and background, and a "floating" cyan stain in the upper background. NeatVideo/Virtualdub, no help here: http://www.digitalfaq.com/forum/atta...1&d=1501173631 Spot "flash" and color fixed with the same Avisynth plugins plus some clean detail patches borrowed from other frames and overlaid onto the bad original: http://www.digitalfaq.com/forum/atta...1&d=1501173712 Below, note the green rainbow that flashed across the upper middle for two or three frames, plus the usual blotches in the floor and upper background. http://www.digitalfaq.com/forum/atta...1&d=1501173784 Rainbow and blotches about 90% fixed with the same Avisynth filters, plus VDub color correction: http://www.digitalfaq.com/forum/atta...1&d=1501173839 The Attached Avi sample "GB_Liv7C1_ivtc_spots_and_noise_L.avi" is lossless Lagarith YUY2. It's from the original capture, has been inverse telecined to remove duplicate fields but is otherwise unfiltered. I couldn't get NeatVideo to play nice on this, but you can give it a run. As you play this crummy original note also the bad left-hand image flutter and the flickery noise across the top third of the frame. A lot of unstable noise here. The murky greenish color is really bad, down to the dark blue that's missing from the tuxedos. Anyone who wants to tackle this one, go right ahead. Took me about 4 hours. I also zipped a NeatVideo .dnp noise sample (device noise profile) from a clear neutral area in another part of the same original movie, attached as "F09_616a_dnp.zip". This is a challenging test for NeatVideo as a one-stop-shoppping cleanup filter. The imperfect result I got with Avisynth (with no NeatVideo) is attached as "GB07b_Avisynth_results.mp4". |
Your problem is different from mine. My issue is home recordings with lots of fine to medium grain (analog) luma and some chroma noise. NeatVideo was the only filter that effectively eliminated that. The only quality issue that I have left is a few random horizontal lines and dropouts from time to time. I understand those lines are the "Static Lines" as per http://www.digitalfaq.com/guides/vid...tore-video.htm
I'm currently researching ways to deal with that, maybe VirtualDub Median filter, maybe RemovedirtMC in AviSynth, but I don't want this to be a never-ending project even though those family recordings are precious. As for the saving intermediate files in RGB, it's a default in VirtualDub and I didn't want to force yet another conversion. But if YU12 is all it's needed for authoring, I may need to consider that. BTW, when I remember again how to save frames from VD, I'll post some examples. PS: Maybe I found a solution for lines and dropouts: http://forum.doom9.org/showthread.ph...hlight=depulse need to figure out how to use it and test it. |
Admittedly the AVi sample is an extreme case of horrible cable transmission, cheap recording, and aging tape. The concept is that many defects, including the static lines you mention (dropouts) can be fixed. The sample is full of dropouts, large and small, as well as other nasties. As you say, it depends on your picture of what you want as a final product. In this case the movie takes me back to another time and place, so it becomes something of importance and extra effort. Not everything goes through this process. No one has forever for this. When something assumes such importance, it's a good idea to suit the tool to the job. In this case my old standby NeatVideo didn't fill the bill.
Fortunately most of my old tapes don't look like this. Thank heaven. :) |
5 Attachment(s)
I guess I'll keep this thread as a witness to my journey through video editing.
Below are test frames from my current project. VHSc from 24 years ago. this is about the worst frame in the end of the tape sequence where there are more tape problems (tape reused numerous times). however, the video noise is similar everywhere and dropouts every second or two. vertical median filter is best for 1 line dropouts (lower part of the frame) while NeatVideo controls noise. |
None of these are much of an improvement and would be indiscernible during normal play. Across how many consecutive frames do these dropouts persist? One might get entirely different impressions if you had included a video sample from the original capture.
Another aspect of median averaging is that it assumes defects like dropouts will look different each time the tape is played. That's seldom possible: a dropout is physical damage that is in the same location on every playback, so it will look pretty much the same way on each play most of the time. That's why it works OK with some problems, doesn't work well with other problems, and doesn't do anything at all on others. In this case, the Virtualdub version is not a true multi-sample averaging filter like Avisynth's median, but an attempt at averaging motion analysis of several different frames from the same capture, not an averaging of several different versions of the same frame from multiple captures. This means that these two "medians" are two entirely different processes, not one and the same. However, your post is essential documentation and a further example of results with the methods discussed. In the past, in many cases, I solved the problem by playing the tape in a better player. |
2 Attachment(s)
Quote:
My current working plan is to capture 768x576 saved as huffyuv/YUY2 and then later mask/transform to RGB in that AviSynth script you gave me together with NeatVideo and vertical median filter from JPSPR (as needed only) and save to Logarith/YV12. Tomorrow I will try some authoring, wish me luck. Can you combine PAL and NTSC clips on the same PAL (or NTSC) DVD? |
Quote:
Yes, true, it is better than the source in some ways, but is now worse in others. Using Avisynth and VirtualDub, it could be cleaned up better ... and more. Perhaps when I get more time, I can show you a sample of what I'd do. |
5 Attachment(s)
Quote:
Noise, frame 268, VirtualDub Median/NV1 fix: http://www.digitalfaq.com/forum/atta...1&d=1501411445 Noise, frame 268, Avisynth fix: http://www.digitalfaq.com/forum/atta...1&d=1501411500 Levels, Color, Definition: frame 5, Median/Nv1: http://www.digitalfaq.com/forum/atta...1&d=1501411551 Levels, Color, Definition: frame 5, Avisynth/gradation curves/ColorMill: http://www.digitalfaq.com/forum/atta...1&d=1501411616 Try the attached Raw_fix_PAL.mp4 and let us know if you think it's a little cleaner: http://www.digitalfaq.com/forum/atta...1&d=1501411730 Allow, if you will, a bit of objective summary about some basic operations that could be improved: Quote:
Something else you can't do is make DVD from 768x576. DVD and standard definition BluRay are anamorphic formats, not square-pixel. If you feed 768x576 into an NLE or authoring program, it's going to be resized to something PAL can accept (720x576 or 704x576) or something NTSC can accept (720x480 or 704 x480). Resizing costs. Always. You're wasting your time capturing 768x576. If you post it on the net it'll be resized by the website to a standard frame format like 640x480. Don't use oddball frame sizes. You're just making problems for yourself. The top sample that you posted is not a "raw" format. It's a high-loss, low-bitrate, low-accutance encode that's very nearly unusable for effective restoration, with a large-GOP structure that's unsuitable for clean edits. It has illegal luma levels with brights so badly blown out that it's impossible to restore the full dynamic contrast range of the source video. Black levels are artificially high and look under saturated and washed out. The NeatVideo sample looks grossly over filtered and denuded of fine detail and texture, so that it looks foggy and plastic. You can't seriously promote this as quality work. It looks like a demo of typical YouTube missteps. You seem bright enough to do better. |
[EDIT] oops, in my haste I encoded that fixed PAL mp4 with an audio sampling rate of 44.1KHz. Oh, well, a little too early in the day to keep it all 100% straight. 44.1K would work for the web, though.
:smack: |
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
|
Quote:
|
6 Attachment(s)
Quote:
So to keep that comparison kosher, let's compare three frames with the proper frame numbers, with your mp4 fix on top and the Avisynth mate for each below it: frame 266: http://www.digitalfaq.com/forum/atta...1&d=1501460580 http://www.digitalfaq.com/forum/atta...1&d=1501460589 frame 267: http://www.digitalfaq.com/forum/atta...1&d=1501460675 http://www.digitalfaq.com/forum/atta...1&d=1501460683 frame 268: http://www.digitalfaq.com/forum/atta...1&d=1501460778 http://www.digitalfaq.com/forum/atta...1&d=1501460792 Quote:
Sorry for the technical jargon and details. I made invalid assumptions based on most readers who show up in forums such as this in order to learn more about video and how to get better results. We don't usually get readers who are looking for the opposite. My error. |
Get scripts from 'VirtualDub border masking? (not cropping!)' thread?
While searching for one thing on DigitalFAQ, I always run into something else interesting and then go down that rabbit hole. Today, I found the thread "VirtualDub border masking? (not cropping!)" that started on 08-13-2015 and ended on 07-30-2017. The masking discussion was interesting but the topic that really woke me up was Sanlyn's restoration examples on page 2. Wow! I'm very impressed with his changes to a 1991 tape and the noise eliminated in the baby clip. I have seen similar issues with the VHS tape captures I am doing.
I'm back to learning how to use AviSynth effectively and am studying the filter settings Sanlyn suggested for some terrible 16mm captures I have. To further my education, are the scripts for the clips in the "VirtualDub border..." thread available? I believe they would be great examples of how I should approach my captured VHS tapes. Thank you very much for your extensive help in this and other threads, Steve |
Quote:
PM sanlyn, as for his input (here in this thread) since those are his scripts. :wink2: |
3 Attachment(s)
Quote:
Quote:
Meanwhile the script for the baby video mp4 in post #29 of this thread has long since disappeared. However, I reworked the script and added a tweak or two. The source video is the lossy compressed "raw.mp4" in post #27 (http://www.digitalfaq.com/forum/atta...masking-rawmp4). Apparently the owner doesn't have the original capture. Referring to h.264 encodes as "raw" isn't really correct. Raw is a specific format, definitely not h.264. When working with lossy encodes don't expect the same results one would get from a lossless capture. Lossy video means unrecoverable loss as well as compression artifacts that are difficult to deal with. In this case, the mp4 source has severe dropouts or "rips" that require destructive filters -- which is why, if drastic repairs are required, lossy samples are a very very very poor choice. The source mp4 was resized to a 768-pixel width while still interlaced, which makes the dropout distortion look worse. Apparently the 768x576 width was used to get a 4:3 square-pixel image. This is often used (incorrectly) with web posting in mind and to help inferior playback systems that can't handle anamorphic video. Keep in mind that resizing for this 4:3 result makes no improvement whatever and exacerbates problems with video that hasn't been denoised. The result is also unsuitable for web posting because it is still interlaced; any website on which it is posted would deinterlace it using the quickest and worst means possible, and the video would be resized anyway to something more standard such as 640x480. As-is, the mp4 sample is unplayable on a website. The script below is approximately the same script I used for the "fix" mp4 posted as "Raw_fix_PAL.mp4" in post #29. The results of the below script are attached as "Raw_fix2_25p.mp4". Because the FixRiptsP2 filter is a very slow memory-intensive plugin, I used a two-step process with two scripts for the total job. Code:
===================================##-- open video only with FFMS2 - no audio --## ffVideoSource("Drive:\path\to\raw.mp4") Avisynth's FFMS2 plugin is used to decode the video-only track of the source video. FFMS2 is also known as FFMpegSource and has many functions. http://avisynth.nl/index.php/FFmpegSource ColorYUV(off_y=-25,gamma_y=-5,off_u=3,off_v=-2) Tweak(sat=1.3,dither=true,coring=false) #-- test for levels -- #Crop(12,0,-12,-12) #Histogram("Levels") #return last #-- end levels test -- This section of code corrects obviously high black levels which look washed out and which results in bad clipping of bright details. Tweak() is also used to correct low saturation and color density loss. The lines that begin with "#" show some test code that is disabled as comments-only for the final output version. Note that Crop() is used to avoid borders that would affect the YUV histogram. When enabled, the YUV histogram that appears for the original, uncorrected images looks like the histogram below, with high gamma and bright clipping beyond y=-235: baby video original YUV levels http://www.digitalfaq.com/forum/atta...1&d=1537321065 The corrected image produces this YUV histogram: baby video corrected YUV levels http://www.digitalfaq.com/forum/atta...1&d=1537321108 AssumeTFF() SeparateFields() FixRipsP2() Weave() FixRipsP2 is a last-resort plugin script designed for the kind of severe dropouts in the source video. It's a slow and destructive filter that involves compromise; in high-motion scenarios it can produce bizarre distortions and can make objects disappear entirely. In this case motion wasn't so hectic that the filter couldn't do some work. But you will see signs of minor distortion. FixRipsP2 should not be used on interlaced video, so SeparateFields() is used, then Weave() is used to restore interlacing. Given the bad dropout problem, a full deinterlace would look horrible. FixRipsP2.avs is here:http://www.digitalfaq.com/forum/atta...d-fixripsp2avs. FixRipsP2 requires the following: DePan_Tools v1.13.1. http://www.digitalfaq.com/forum/atta...1&d=1531396979 RgTools.dll http://avisynth.nl/index.php/RgTools (also supplied with the QTGMC package). Also required: Microsoft Visual C++ 2015 Redistributable Package (x86 / x64). https://www.microsoft.com/en-us/down....aspx?id=53587 MVTools 2.27.21.x or later. http://www.digitalfaq.com/forum/atta...s2_27_21_22zip (also supplied with the QTGMC package). Crop(12,0,-12,-12).AddBorders(12,6,12,6) ##----------- Return video only. -----------## ##-- Save as "Raw_Step 1.avi" using Lagarith YV12 --## return last This code crops away uneven borders and bottom border head-switching noise, then adds new black borders and centers the image. The original left border also has 2 pixels of noisy "stuff". The "return last" line outputs the results of the last operation, which is the Crop() line. The script was run in Virtualdub, so VDub was set to save the file as YV12 using Lagarith lossless compression using the filename Raw_Step 1.avi. Code:
===================================aud = ffAudioSource("Drive:\path\to\raw.mp4") vid = Avisource("Drive:\path\to\Raw_Step1.avi") The first line uses FFMS2 to decode the original lossy audio (low quality audio that can't be used on then 'net). The audio data is saved in memory as an entity that I named "aud". It will be used later at the end of the script. AviSource() is used to decode the Step 1.avi that came from the Step 1 script. The video portion is saved in memory to a video clip that I named "vid". vid AssumeTFF() QTGMC(preset="medium", border=true, fpsDivisor=2) #<- creates progressive 25fps output. source=last The first line directs Avisynth to focus operations on the video clip named "vid". AssumeTFF() sets proper field polarity and overrides Avisynth's BFF default. QTGMC is used to deintelace using its "medium" setup parameter, which includes some denoising, motion smoothing, and some anti-aliasing. The border=true parameter helps prevent top-border twitter. The fpsDivisor=2 parameter drops alternate fields after creating new interpolated frames from both fields, resulting in 25fps progressive video. If this parameter is omitted, QTGMC's output would be 50fps double-rate progressive. The choice is up to the user, but motion will be smoother at 50fps or as interlaced 25i. Many websites will drop alternate fields anyway, so you may as well let QTGMC do a much cleaner job of it. The last line saves the deinterlaced result in memory as a new clip arbitrarily named "source". The QTGMC plugin package with its support files is at http://www.digitalfaq.com/forum/atta...g-qtgmc_newzip. chroma=source.Loop(8,265,0) chroma=MergeChroma(source, chroma) ReplaceFramesSimple(source, chroma, mappings="[266 272]") Chroma_A=last This group of lines plays tricks with chroma, borrowing chroma from one frame to overlay its colors onto other frames. There are several consecutive monochrome frames in the source video that suffered chroma loss through poor tracking. This code attempts to borrow the chroma values from frame 265 and apply that chroma to frames 266 thru 272 in the source. The line chroma=source.Loop(8,265,0) copies frame 265 eight times over the original video starting at frame 265, and creates a new video clip in memory called "chroma". With chroma=MergeChroma(source, chroma) the "chroma' video is then modified to merge the chroma-only of the "chroma" clip with the luma-only of "source". Thus, the "colors" in frame 265 are now used to overlay all of the frames in the new "chroma" clip. But we really want borrowed colors only in frames 266 thru 272. So ReplaceFramesSimple(source, chroma, mappings="[266 272]") replaces frames 266 to 272 in the "source" video with frames 266 thru 272 of the "chroma" video. The results of the borrowed and replaced chroma are saved in memory as a new clip named "Chroma_A". Merge function: http://avisynth.nl/index.php/Merge Loop function: http://avisynth.nl/index.php/Loop ReplaceFramesSimple (in RemapFrames): http://avisynth.nl/index.php/RemapFrames chroma=source.Trim(275,275) chroma=chroma.Loop(377,0,0) chroma=MergeChroma(source,chroma) ReplaceFramesSimple(Chroma_A, chroma, mappings="273 274") The first line chroma=source.Trim(275,275) creates a new version of "chroma" that contains only frame 275 from the "source" clip. Then "chroma" is expanded to contain a loop of 377 copies of frame 275 (which is frame "0" in the new clip). You'll need a clip that is at least 377 frames long in order to match the frames in "Chroma_A". ReplaceFramesSimple(Chroma_A, chroma, mappings="273 274") replaces the monochrome frames 273 and 274 in "Chroma_A" with borrowed chroma frames 273 and 274 in "chroma". The next few lines will perform operations on the results. ReplaceFramesMC(267,2) RemoveDirtMC(30,false) ReplaceFramesMC is used to interpolate new replacement frames for the noisy remnants in frames 267 and 268. There's not much motion in those two frames, so any distortion created by the interpolation will be minor. The two new frames for 267 and 268 will be created based on information in the preceding and following frames, which are frames 266 and 269. Then RemoveDirtMC(30,false) is used for mild denoising of some of the lossy compression grunge that remains in the video. RelaceFramesMC.avsi is here: http://www.digitalfaq.com/forum/atta...ceframesmcavsi. It requires MVTools 2.27.21.x or later (see above). MVTools is also supplied with the QTGMC plugin. RemoveDirtMC.avs is here: http://www.digitalfaq.com/forum/atta...emovedirtmcavs. The filter requires RemoveDirt_v09 (http://www.digitalfaq.com/forum/atta...ovedirt_v09zip). It also requires the RemoveGrain package (http://www.digitalfaq.com/forum/atta..._v1_0_fileszip) or use the RgtTools plugin mentioned earlier. If you are using Windows 7 thru W10, you might also need some VC++ support files. Read here: http://www.digitalfaq.com/forum/vide...s-running.html. MergeChroma(aWarpSharp2(depth=20).aWarpSharp2(dept h=10)) LimitedSharpenFaster(edgemode=2) GradFun2DBmod(thr=1.5,mask=false) AddGrainC(1.25,1.25) Chroma_B=last The aWarpSharp2 code tightens some color bleed around edges and smooths some ragged lines. The code sharpens chroma only, not luma. LimitedSharpenFaster(edgemode=2) sharpens inner detail between edges and is limited so as not to produce more edge halos. GradFun2DBmod is used to mollify some of the muddy posterizing effects that come from low-bitrate lossy encoding in the source sample, often called "clay-face' effects. AddGrainC adds small amounts of very fine film-like grain to help mask hard gradient edges in large smooth expanses such as the background walls. Finally, the result of all of the preceding code is saved as a new video clip named "Chroma_B". GradFun2DBmod: main page and download link are at http://avisynth.nl/index.php/GradFun2DBmod. It requires GradFun2DB (http://avisynth.nl/index.php/GradFun2db). It also requires AddGrainC, MaskTools2, and RGTools, which are all included with QTGMC (see above notes). LimitedSharpenFaster is in LimitedSharpenFaster.zip (http://www.digitalfaq.com/forum/atta...arpenfasterzip). It requires aWarpSharp2 (http://www.digitalfaq.com/forum/atta...sharp2_2015zip). It also requires MaskTools2 and RemoveGrain, which are included with QTGMC (see earlier links for the QTGMC package). AudioDub(Chroma_B,aud) return last The last two lines join the video in "Chroma_B" with the audio in "aud", and then the results of the "last" operation are output. AudioDub function: http://avisynth.nl/index.php/AudioDub There are links to some other popular Avisynth filters in this post: http://www.digitalfaq.com/forum/vide...html#post55834. |
2 Attachment(s)
Quote:
The original recorder no longer exists, which is just as well -- there is no way I would use it for capture. The bad and noisy cable signal, cheap wiring, and cheap gear produced recordings with a horrible noise level. I made multiple captures, each having their own set of defects and problems. The players used were a Panasonic AG-1980 and a 1996 Panasonic PV-V4670 (with a Panasonic Es-10 for tbc pass-thru with the 4670). Both are SVHS machines with s-video output. The capture version used for different processing segments depended on which player gave me fewer tracking problems with dried-up, poorly stored tape. To this day I can barely tell which player produced which capture. The cables used were BlueJeans Cables YC-2 s-video (https://www.bluejeanscable.com/store/svideo/index.htm) and Belden 1694-A for audio (https://www.bluejeanscable.com/store/audio/index.htm). With both players the bad tape and noisy signal gave false Macrovision effects, so my trusty old AVT-8710 frame-level tbc from 2004 was used in the chain. For a UV LED meter to check signal levels, I used a SignVideo PA-100 proc amp with no color correction applied (I saved color work for post processing). YUV levels were double-checked in VirtualDub Capture with image borders temporarily cropped and then restored before starting capture to YUY2 using huffYUV lossless compression and uncompressed PCM audio. The capture card used for this particular capture was an ATI All In Wonder 9600XT AGP. After reviewing the original capture, I cut it into several segments (cable tv commercials removed) into Lagarith YUY2 files archived on an external hard drive. I use file naming and coding conventions that are pretty much standard for my workflow -- including oddball file names that help identify the source video and the processing stage. For example, the file name "GB_Liv7C1_ivtc.avs" identifies the file as an Avsinyth script. The "GB" is a group of work and output files from groupings starting with "A" thru "K". These are working groups from a long capture split into 8 to 10-minute segments. "Liv7C1" identifies the original lossless source capture name. "ivtc" indicates that the script performs inverse telecine. That script would produce a lossless AVI named "GB_Liv7C1_ivtc.avi", which matches the name of the script. One of several sequential .avs scripts that worked on the ivtc'd source is called "GB07_Liv7C1_ivtc_Q_vd.avs". This name identifies the work as belonging to the "GB" group and would be script number 07 in the series that splits the ivtc'd source into several smaller output files. The source capture has many problems that vary scene by scene, so several scripts are often used on a 10-minute source, breaking the source into many smaller sections. The sections are joined later for encoding. "Liv7C1_ivtc" identifies the source as the ivtc'd file. "Q_vd" indicates that QTGMC is used in the script and that VirtualDub filters ("vd") are applied to the script's output. The VirtualDub settings for that script are saved as "GB07_Liv7C1_ivtc_Q_vd2.vcf" using a name that identifies the matching script and a "2" to indicate version 2 of the VDub settings. The lossless file produced is named "GB07_Liv7C1_ivtc_Q_vd.avi" to match the name of the script. And so on. I haven't attempted to change the path names shown in the scripts but I removed many of the superfluous "#" comments and disabled lines. Script #1 is the inverse telecine script for the source capture segment Liv7C1, which was a 22-minute segment of the original 86-minute capture archived on an external hard drive ("J:"). The script starts at frame 14898, using the last 7.5 minutes of the original file. Code:
AviSource("J:\Livin567\Living7_C1.avi")"GB_Liv7C1_ivtc_spots_and_noise_L.avi" (http://www.digitalfaq.com/forum/atta...and_noise_lavi). The sample is losslessly compressed YUY2 using the Lagarith codec. The first cleanup stage used on the last part of the sample scene is the script below. The script begins by loading a specified set of Avisynth plugins that allow using QTGMC in a YUY2 colorspace and allows use of some 16-bit processing later in the script with the GradFun3 function. The script also begins with a "Loop" function to add frames to the end for fade-in and fade-out, but I don't recall exactly how I figured that out and wouldn't want to do it again. Input from the ivtc'd source file is YUY2 progressive at 23.976 fps film speed. This script isn't the final cleanup for this scene. Code:
# ======== files for QTGMC AVS26 & YUY2/dither ============There were still a ton of dropouts, blobs, blotches, and odd "flashes" in difficult places, as shown in the images in post #22. So a third Avisynth run with special "patching" routines was required. By this I mean that because there was so much motion, the usual de-spot filters didn't work and complete frame replacement with ReplaceFramesMC wasn't feasible because of the gross movement distortion involved. So small square "patches" had to be created from clean areas of the frame and overlaid onto the trouble spots. Input to the script below was Lagarith YV12 output from the previous script: Code:
AviSource("E:\Livin\GB\"GB07_Liv7C1_ivtc_Q_vd.avi")A sample of how the "patches" work: [code] b0=a11 b01=a11.ReplaceFramesMC(436,3).Crop(142,66,-490,-404) b02=Overlay(b0,b01,x=142,y=56) a12=ReplaceFramesSimple(a11,b02,mappings="436 437 438") /code] Line #1 saves the previously repaired "a11" clip as "b0", to be used later in line 4. Line #2 creates a frame with some motion distortion but the undistorted portion is in a small square patch with frame coordinates x=142 y=56 on the upper left corner of the clean area. The size and location of the patch was found by copying the "bad" frame into Photoshop (you could also use MSPaint) and moving the cursor around the 4 corners of the area that contains the "bad" glitch. The new frames are cropped to include only the square patch area in each frame, and the clip created is saved as "b01". Line #3 Overlays all of the newly created patches from b01 onto the original b0, thus covering up the bad spots at x=142. This new overlaid clip is saved as "b02". What b02 contains is actually hundreds of copies of the same small patch at x=142. That's not what we want. All we want are 3 frames with cleaned patches. Line #4 replaces frames 436 thru 438 in the previous "a11" with the same cleaned frame numbers from b02. The new clip is saved as "a12". Does this stuff take patience and a long time? Yes. Did I have many tapes that were as godawful as this? Not many. In the meantime this 1954 movie has been released on DVD, so why not just ditch the tape? Well, as some of you might know, ugly things can have strong sentimental value. Besides, when you're working with pristine VHS tapes that need very little work, you don't learn anything about processing. It also helps to be a little nutty. |
Wow! (maybe I should trademark wow since I'm using it so much)
Another excellent demonstration of what can be done with AviSynth and VirtualDub. Thank you for taking the time to find the old information, posting it and explaining it. Steve |
Thank goodness every capture doesn't need that much work!
|
Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.