Where to begin restoring VHS video?
1 Attachment(s)
I'm capturing just fine with Virtualdub.. thank you for your help getting me going on that.
My VHS tapes can basically be put into two different categories -- Outdoor with decent lighting, and dark indoor video. I wanted to share the an example of the former first, because to my novice untrained eye I don't know what should be done with avisynth and virtualdub to improve the video but I cannot wait to be enlightened. I uploaded a 7 second clip (78mb)... if that is too short let me know. I tried to pick something that was on tripod. Thanks in advance! |
try this script with avisynth:
Quote:
|
2 Attachment(s)
Thank you for that sample. It was correctly cut, saved, and posted. You'd be surprised how many attempts it takes some readers to get that far, LOL!
I took a somewhat different approach than the scripts posted earlier: There are four main problems. The first is the cyan color cast. This was the camera's fault, seeing as how the lighting is subdued, slightly overcast bluish sunlight. That's easy enough to fix. Second, the capture was made with blown-out highlights. The brightest parts of the image xceed y=255, so it's impossible for digital video to maintain highlight details with brights extending outside the contrast range. You can see bright clipping in the way the bright plates at the lower right lack detail and look like "hot spots". That can be fixed to a certain extent, but brights are going to look little washed out, even with lvels correction. The first step I took was to tame bright luma levels in Avisynth and YUY2 (you can'[t make that initial correction in an editor's RGB, because clipped brights will look even worse when converted to RGB for processing or display). Also, the kids look a little dim and pale, so RGB filters were used to heighten some shadow detail and lower midtones while keeping the deepest shadows a realistic darker level. Third, there is some oversharpening. This can be seen in dark halos on bright edges and bright halos on dark edges. This can be overcome to some extent, but notice the bright edge ghost 6 pixels to the right of the woman's white shirt. It's also present on other bright edges but is partially masked by other details. This causes the buzzing edges and line shimmer in the image to look worse than it should. That shimmer is also a result of problem #4 -- I see that there's no line tbc in your capture gear. The wiggly edges and the edge twitter and moire effects on fine-textured objects (checkered clothing bottom left and top right, center girl's t-shirt design, bright forks at bottom center, thin black iron legs at top left)etc.) are the result of oversharpening and scanline sync errors. I know you have an external TBC-1000, but that's a frame-level tbc, not a line tbc. This is also where the twitter and saw-tooth edges come from. Filters can mitigate the noise somewhat, but there's no real cure. I began by fixing luma levels and blue contrast, then proceeded to denoising in Avisynth (which in this case required deinterlacing with QTGMC and some its noise reduction parameters customized), then edge cleaning, more smoothing with RemoveDirtMC, then reinterlacing, and finally color correction in VirtualDub. I'll be able to get into more detail with the Avisynth script and VDub filters later (starting to get very busy at my house today). I made two versions from the sample, one encoded for DVD and one square-pixel for mp4 and smart TV or whatnot. The square-pixel version could be deinterlaced for web posting. The script for each version used the same filter sequence, but resizing was a little different for the mp4. Here is the main script I used: Code:
Import("drive:\path\to\plugins\RemoveDirtMC.avs") I'll be able to fill in more detail and notes in a later post. Gotta run with the family now. The biggest improvement you could make to reliee motion nnosie and some of the excess interlace effects would be to find a way to incorporate a line-level tbc into your filter chain. Easiest and least expensive would be a tbc pass-thru device with line-tbc pass-thru circuitry, like a Panasonic ES10 or ES15. More expensive would be a VCR with a built-in line tbc. |
The attached test capture looks really good. The hardware in use has taken care of most issues here already. There's no instabilities, no timing problems, nothing unusual, simply some mild chroma and color issues. JVC S-VHS with TBC, external TBC, USB capture, correct? Looks like it.
This clip does have a mild color cast. It's picking up the overcast sky as blueish. If the entire video was that way, or a long clip, I'd consider making it less blue. If it was just a fleeting clip, or if the camera's auto white balancer kept changing some, I'd leave it alone. I do all color work in Adobe Premiere Pro, sometimes VirtualDub Colormill, rarely Avisynth. And in this case, I have a line in my Avisynth MultiScript that would probably fix this, or at least be easily tweakable to fix it. There is mild chroma offset/shift, aka "color bleeding". This is easy to fix in Avisynth. Follow it up with the Camcorder Color Denoise (CCD) filter in VirtualDub. I see the usual overscan noise. Mask it. Done. SoundForge or Audacity would easily wipe out that hiss, if you can find clean print (noise only area) to work with. I prefer to leave ringing alone, as it was created by the camera as false sharpening. It has to be really bad, usually due to nth generation copying, for me to even bother. I'd not deinterlace it at all. Our own home movies look like this, most people's do, and archiving as interlaced MPEG-2 15mbps is ideal. I doubt the highlights were blown out on capture. The camera did it. Very common. Unless I'm having to match other source videos, and for something important (aka paid stupid work), I never bother trying to fix it. For one thing, it's unfixable. All you can do is make it less bad. You risk other color qualities of the image by screwing with it too much. Order matters: - chroma offset fix first - dering if you must, other NR if you must - color cast fix next - overscan mask last - audio separate task, post-video, so also last |
Quote:
On my equipment, I actually have a JVC-SR-VS30 which has line TBC, and I'm 99% sure I had it activated during the capture (I've never turned it off.) And my frame TBC is actually Datavideo TBC3000. Did it seem like the VCR TBC was not doing its job? Do you have a post with all your avisynth plug-ins attached? On your script, is every single plug-in customized to what you saw on the video example or are there any that you would use on every single video regardless? Quote:
Quote:
Is there a prior thread or guide on fixing audio with Audacity? I use audacity at work for voiceovers so I'm more familiar with that software out of the box than I am with Soundforge. I plan on archiving as 15mbps mpeg.. have your guide on Avidemux handy. Quote:
What do you do in Virtualdub/Avisynth before sending to Premiere for your color work? Then do you encode for storage straight from Premiere or do you send it back lossless then re-encode somewhere else? |
5 Attachment(s)
Quote:
Quote:
Quote:
Quote:
Quote:
These are some of the methods I used to make the samples and to determine the script and VirtualDub notes I posted. I usually begin with a quick look at capture and its levels, color balance, general noise level, and obvious problems. When I first open your sample I use the quickie script below: Code:
AviSource("Lou test.avi") http://www.digitalfaq.com/forum/atta...1&d=1505070926 The histogram in the image measures luma and chroma levels in the image. Here, the image includes your original borders and the head-switching noise across the botom border. These affect the histogram and will be removed for a better reading later. The hgistogram mesures dark values on iuts left side, bright on its right side. The area across the middle of the histogram inside the darker borders indicate the safe zone of y=16 to y=235 luma values. Anything inside the dzrk borders t each side is consiered unsafe for NTSC or PAL transmission and encoding. Values outisde the safe zone will be clipped off nd/or distorted in RGB. #1 points to a sharp slender "spike" at the left side of the histogram, exactly at y=16. This indicates that your capture device is clipping all superblack values, which muddies dark shadow detail and makes it impossible to retrieve any clipped dark details. In a dark scene this would not be near disastrous. #2 points to bright values that extend beyond y=235 -- which ultimately means that they will exceed RGB 255 during play, which forces invalid luma levels into the display, and will be clipped or distorted. The camera itself is clipping off bright details in the white objects at the lower right, but further clipping in YUV makes it look worse ("hot spot"). Overly bright values are also in the woman's white sunlit shoulder at upper left. #3: the black spikes should be smooth metal, but they're shimmering and wobbling in the moving image because of a weak line TBC. The image below is a 3X blowup of the area pointed to by arrow #3. The frame was deinterlaced to create this image so that interlace combing wouldn't affect the objects. http://www.digitalfaq.com/forum/atta...1&d=1505071037 You can see that the black spikes are visibly notched -- the distortions vary with each frame to cause a noisy twitter. There is a tbc at work, but it's not powerful enough to handle line sync arrors from the current tape. The same mini-notch shimmer occurs on the edges of both side borders of the frames, which buzz during play. The weak tbc also makes horizontal noise and aliasing look worse than it should. You can also see the bright edge halos from sharpening. Angular aliasing in the image's deck chair is rather common with consumer cameras. The image below is the same frame 102 after removing borders and head-switching noise that affect the histogram. This gives a more accurate histogram of the image content and was produced by the temporary cropping script below: Code:
AviSource("Lou test.avi") The basic difference in the histogram below is that clipped superblacks (black borders) that affected the histogram are no longer present. Bright level clipping at y > 235 is still at the right edge of the histogram. There is still slight clipping of superblacks at the little "spike" to the left. The script below corrected levels to the range of y=16-235, and the image below it shows that some very slight detail has been eked from the clipped area (not much), but mainly the hot spots in the lower right and upper left are tamed and more workable. Code:
AviSource("Lou test.avi") After running the other repair and denoising filters in the script posted earlier, VirtualDub filters were applied to the script's output while it was running. By observing the color balance and measuring pixel areas with a pixel value reader, it was determined that the overall color cast was cyan (greenish blue). You can see this in all the off-color whites and grays in the clothing of the figures. There are no clean whites or clean grays. Gradation curves and ColorMill were used to manipulate color ranges so that colors were balanced, and flesh and hair tones tones looked more natural. The darkest shadows were darkened a bit to add some contrast and depth to the scene. Midtones were amplified to make the kids brighter and not so dim and recessed. The results are i the same frame 102 below, from the 640x480 mp4: http://www.digitalfaq.com/forum/atta...1&d=1505071338 A little later, in a subsequent post, I'll post some filter and usage links. |
Regarding scene-by-scene work, I often remind everybody that video requires patience.
However, I think sanlyn has more patience that even myself. :laugh: I'm sometimes not sure if his advice is academic, or if he actually does all that. Either way, it's hard to argue his results, the videos are improved. As I said in a previous reply, I'd never do scene-by-scene restoration, even for pay, or for myself, unless it was something very special. Or unless we're only talking like 3-4 scenes in the entire tape. However, most VHS scenes are mere minutes, and it quickly becomes tedious. Remember, "Hollywood" films do this sort of scene-by-scene correction. They shot on professional cameras, and everything was exposed correctly. The corrections are usually artistic, and done in something like DaVinci. And speaking of DaVinci, there's now a free version. I have it, but haven't used it yet. For me, Premiere is easier, since I've used it for 15+ years, and because it's somewhat similar to Photoshop. FYI, Photoshop also has limited video editing abilities there days. When I have workflows that involve color correction, all restoration is done first. The color work is last. Everything is intermediary codecs (Huffyuv, Lagarith, ProRes422) until the final formatting stages. MPEG for disc, H.264 for streaming. |
3 Attachment(s)
I see that you apparently managed to acquire the Avisynth plugins I used in the posted script, which many find impossible without some help. I'm including in this post a package of the QTGMC main avsi, updated support files, and documentation. I'm also including the version of RemoveDirtMC that most people use these days, which is considerably less complex than the version posted in the Avisynth wiki.
RemoveDitryMC.avs is posted as an avs instead of auto-loading avsi because it calls another version of plain ol' RemoveDirt internally. I usually import this version of RemoveDirtMC rather than let it autoload 2 versions of RemoveDirt. It's a good idea two download their packages, which contain valuable documentation. The others used in the script can be downloaded fom the 'net along with any other support files they might need: vInverse v0.9:http://avisynth.nl/index.php/Vinverse DeHalo_Alpha: http://avisynth.nl/index.php/DeHalo_alpha Santiag_v1.6: http://avisynth.nl/index.php/Santiag aWarpSharp2: http://avisynth.nl/index.php/AWarpSharp2 FixVHSoversharp: http://web.archive.org/web/200910261...oversharp.html One of the desktop utilities I used to take pixel value readings in csamp.exe. No install required, the file just sit son your desktop and can be executed at any time. Csamp.exe was previously posted in a digitalfaq post here: Csamp.zip. There's an old post that illustrates its usage, along with pics of how to use some other VirtualDub tools: http://www.digitalfaq.com/forum/vide...html#post38384. One of the tools mentioned above is a histogram multi-function that you can't do without for color correction info. ColorTools can be downloaded from here: ColorTools plugin zip. (If you\'re using Windows 7 or 10, you;ll need the updated version of ColorTools. I didn\'t use it here because I processed your sample in XP. Color Tools 2015 update .) There's another old digitalfaq upload that contains ccd, HueSatInt, ColorMill, Exorcist, and Gradation Curves for VirtualDub: Virtual Dub Plugins zip. Some posts that illustrates how some or all of these are used: http://www.digitalfaq.com/forum/vide...html#post42315. And here: http://www.digitalfaq.com/forum/vide...html#post42294. Finally, I'm attaching a VirtualDub .vcf file that contains the VDub filters and settings I used for color correction of your sample. A .vcf is a simple text file (you can edit it in Notepad if you want, but you'd better know what you're doing and save a backup copy). You load a .vcf in VirtualDub by clicking on "File" -> "load processing settings", locate the vcf, and select OK. It will load the filters and the settings I used. Note that loading a .vcf will overwrite any filters you might already have loaded. The two filters used are ColorMill and gradation curves, which must be in your VirtualDub plugins folder. You can load those filters and see what kind of settings I used. Any more questions, let us know. |
Yes, let's definitely attach filters and files anytime we discuss Avisynth.
There's been a lot of turmoil in the Avisynth space over the years. The most prolific were the meltdown of neuron2 (Donald Graft) at Doom9, and the DarkShikari (Jason/Fiona Glaser) sex-change fiasco at Doom10. We lost a lot of Avisynth information due to two people being petty and selfish. Both of those events happened in 2014, and years of data vanished. Many Avisynth filters have disappeared over the years, due to being released on bad channels (mediafire, etc), rather than attaching to forums, or having an official release channel like SoureForge/Github/etc. This is why we rescued KVCD.net from the same fate, and is the archives forum. It had some unusual and interesting Avisynth scripting and filters. We saved all of those from destruction. |
Quote:
A backyard birthday tape shot under the conditions shown here is likely to look the same way in every shot for several minutes, if not longer. Once you have the basic correction and denosing for those conditions and glitches, it should work for the entire sequence as well as for the next time you encounter a similar situation, with some very minor adjustments. Some tapes are so godawful, they're hopeless to begin with -- throw something heavy-duty at it like a strong dose of TemporalDegrain at full throttle (which would take out so many bad pixels you'd think you're getting an entirely different video) and a couple of passes of Tweak(), and be done with it. On a less frequent basis you have your pet projects and your nagging challenges. That's where the learning comes in, and they're the hassles that make the rest of it seem so easy. :) |
You just reminded me of something: My sister's wedding tape. I hate that thing. No matter what I try, it seems to get worse. It was shot long ago on a full VHS camcorder, and the camera values were all over the place. The dark venue and bright day make it miserable to try and correct. Tape flaws are often easier to correct compared to in-image color flaws. Every few years, I take another pass at it. It's probably due for another attempt in 2018.
|
1 Attachment(s)
Many thanks to both Sanlyn and Lordsmurf for all the help getting me going on this project. I have been playing around with so many different filters over the last week, and oh boy has it eaten up a lot of time!
I wanted to share the clip attached here because it is a perfect example of something I would want to do minimal restoration to. (save more time for videos I care more about) In that case would you just apply the #crop and #addborders commands? Or what would you say is the "bare-bones" restoration you would do before converting to 15mb/s Mpeg? Also, Lordsmurf, Playing around with your multiscript I ran into one Jam. How do i resolve this error? "avisynth open failure: Addborders: YUV image can only add by Mod 2 (left side)." |
2 Attachment(s)
Quote:
Quote:
There's no universal script that's suitable for all videos, especially concerning VHS. Meanwhile you have some serious player problems. Besides the usual noise, you have some bad flicker and distortion in the blue channel. The attached demo Red Green Blue Compare 10fps.mp4 runs at 10fps and has 4 panels that show the source, plus the red-only channel, the green-obly channel, and the blue-only channel. When channels are separated and view in this way, they appear as grayscale. The image below is what the video looks like (blue is in the lower right panel). http://www.digitalfaq.com/forum/atta...1&d=1505675582 The attached video plays at a slow 10fps. It would take a lot more than barebones work to make videos like this look better. There were similar problems on the previous sample. You need a better vcr, and you definitely need a line-level tbc. |
4 Attachment(s)
After further investigation, I think it is possible that tape is actually a 2-gen dub which could explain some quality issue. Sorry for the poor example.
Before determining the VCR is bad, would you peek at these attached clips? These are Huffyuv captures from four different tapes. I know for a fact they were all shot with the same JVC VCR and each one is a different type of scene (indoor/outdoor, etc). These collectively would be a good representation of my captures going forward as-is. Quote:
|
The VCR is fine. As expected, you're getting exceptional quality playback from it. :)
The issues is just a "bad" (not really) tape on the 'loutest2.avi' sample clip. The primary issue is chroma offset (slight left shifted color bleed), and some overall chroma noise. Avisynth shift for the former, VirtualDub CCD for the latter. Then all you're left with the some white-balance issues, from when it was shot (not a tape issue). Depending on several factors, I may or may not leave those alone. The 'loutest2.avi' sample also so some chroma smearing, which would make sense if a 2nd-gen dub. Too many folks forget that VHS had sub-4:2:2 color-under (though not as bad as 4:1:1). So it does appear worse, at a glance, than SD broadcast/digital video for that fact alone. It does appear somewhat smeary, even with a pumped-up edge contrast/sharpen (ie external detailers, Panasonic AG01980 sharpen sliders). I think you're project is going fine. The hardware is performing well for you. :) If you really want to correct scene-by-scene, you have some great advice by sanlyn here. You can also apply what's he's shown you, using my more conservative approach, to do whole-tape corrections when needed, and not scene-by-scene. Nothing in this thread is bothering me. I see no major flaws. |
As I experiment with all sorts of avisynth filters, I am getting a little confused about which ones require deinterlacing to be done (then re-interlacing at the end)
|
Motion smoothing, dropouts, spots, frame hops, chroma bleeding, edge cleaning, anti-aliasing, bad frame correction, and resizing require deinterlacing. Levels and color correction do not. With many denoisers you can use SepareateFilds and re-weave fields back together, but this feature varies. The plugin's documentation often tells you what to do. For a specific filter, ask about bst performance.
|
Chroma shifting (aka bleeding) does not require deinterlace/separate.
Some NR, even temporal, does not require deinterlace/separate. Even when following "the rules" or best practices, odd things can happen. The key is often in re-ordering the filters. Some combinations don't play nice with others. I have several Avisynth scripts I want to publish, in addition to the MultiScript, but have not finished the samples and write-ups. Those all take time. |
2 Attachment(s)
Here is my first good crack at it. In this case I used the Lordsmurf multiscript, using the lines I felt were appropriate for this video. Also used Colormill, Curves and CCD in Virtualdub.
-Color corrected best i could in colormill while looking at histograms in color tools. -Used threshold 50 in CCD -I still see color noise in red wall mats, not sure best attack of that, or if it should be expected because of low light in initial video -I'm still unclear how to reinterlace before outputting my final file. I don't need to output twice do i? testbasketball is the original capture, and testbasketball redo1 includes my corrections. Code:
AVISource("F:\Lou VHS Project\testing\test basketball.avi") |
I rarely use CNR2, preferring CCD in VirtualDub. CCD is more effective at actual removal, while CNR2 is more about temporally smoothing it.
The MergeChroma/ChromaOverlay is often correct as is, having been created with VHS in mind, and knowing how VHS colors tend to skew. But the values can be tweaked tape to tape. AwarpSharp has side effects. Only use when needed. Deblock and Deen sometimes have no effect. It really depends on source. I almost never sharpen. It has to be really blurry video. The side effect of sharpening is bringing out more noise. Sharpening is actually a task better handled in hardware. Again, it all depends on source and end goals. Restoring back to interlaced disc formats will differ quite a bit from streaming. The redo1 video is far too bight. And you can easily see the sharpen brought out noise. I think the color actually got worse, going even more green/red, and not restoring any of the blues. |
7 Attachment(s)
Thanks for posting a chunk of the original.
Quote:
Quote:
Quote:
Quote:
Since you're going square-pixel anyway, you can't use that for DVD. In many cases (like this one) you'll see better results with a good deinterlacer (like QTGMC) and either discard alternate fields to get 29.97 fps or keep all frames and get 59.94 fps. Unfortunately many players don't handle double frame rate that well, especially if the original was interlaced to begin with. You lose a little temporal resolution in action videos by discarding the odd frames and keeping 29.97 fps, but that's better than gross aliasing and noisy motion. For DVD, you can still encode at 29.97 progressive (but it won't work for BluRay). If you wanted interlaced video, you couldn't use SelectEven or SelectOdd. You have to keep all the fields. The last thing you would do after all your processing is reinterlace, as follows: Code:
AssumeTFF() ConvertToYUY2 # script below this line requires YUY2. Colorspace changes require that you specify if the video is interlaced, lest you smear chroma channels. The statement should read "ConvertToYUY2(interlaced=true)". This has been mentioned by lordsmurf, especially here: http://www.digitalfaq.com/forum/vide...html#post50800. In this case your sample is already YUY2 to begin with, so the statement does nothing. Cnr2("xoo",4,2,64) # remove chroma banding noise, wide UV setting. cnr2 won't remove banding noise and does little for chroma noise. It's very old tech, actually, and most would now use something else including CamcorderColorDenoise. Later in this post I'll show other suggestions. ChromaShift(C=2, L=-8) # align chroma over luma. I'm confused by this one. "L=-8" shifts chroma pixels upward by 8 pixels. Are you sure you want this? I see no need for it in your sample. I see in your redo1hat lifting chrom causes red background to bleed upward into the wall. Otherwise chroma is also shifted 2 to 4 pixels left in the original, so shifting it to the right with "C=2" makes sense. QTGMC(Preset="Slow") might be overkill for this video in terms of noise reduction, which appears to smear some facial contours and other details when combined with santiag(strh=2,strv=2). I think you'll find that these two together are overdone with this sample, especially since I don't see aliasing after the video is deintelaced, as explained earlier. In any case, if you had re-interlaced later the alaising would return. Any minor aliasing in the original fields is usuully pretty well cleaned up by QTGMC's slow setting. AwarpSharp(depth=10). I can suggest a better general sharpener later, especially one that doesn't bend edges (which is where its name comes from) or make edge halos worse. Sharpen(0.5). Again, there are cleaner sharpeners, especially since your original sample already has sharpening halos. Sharpen() has its uses, but it's a rather primitive filter. The two images below will show what's happening with the wrong sharpeners and how they exacerbate edge halos and distortion in the original. The image below on the left-hand side shows edge halos in redo1.avi, and on the right-hand side how the halos were mostly removed in the attached "redo2" mp4. Halos are in the original capture from the player and are difficult to address entirely without destroying more detail. http://www.digitalfaq.com/forum/atta...1&d=1506202640 ColorYUV(off_y=6, gain_y=-12) # lighten gamma. This doesn't lighten gamma. It raises darks too much and shrinks gamma and brights toward the dark end. ColorYUV(cont_u=-60, cont_v=-160) # increase saturation. No, negative contrast reduces saturation. This is one reason why your redo1 has pale colors and skin tones. Levels(0,1.000,250,2,255,true). This prouduces brights that exceed y=235. Not what you want. ### Typical VHS overscan crop Crop(20,2,-16,-6) # use both lines AddBorders(18, 4, 18, 4) # use both lines Sometimes it's better to crop before resizing. See the script and images below. The upper image is frame 120 from the redo1 avi. The core image inside the borders is 604x472 without the thick borders. That image is an aspect ratio of 1.28:1, which is more narrow than 1.3333:1. It's likely your camera wasn't recording exactly 4:3 anyway, but the image here seems just a little squeezed horizontally. http://www.digitalfaq.com/forum/atta...1&d=1506202798 The image below used different cropping, before resizing. The borders were cropped as before, but borders were added to make the frame size 704x480, with thinner side borders, then resized. The core image below is 622x472 without borders (aspect ratio 1.32:1). http://www.digitalfaq.com/forum/atta...1&d=1506202889 The wider core image comes from the fact that NTSC and PAL SMPTE standards use only 704x480 of the 720x480 frame with 4:3 source material. Cameras and Players differ from this standard somewhat, more or less, so you never can tell what the final dimensions will look like until you see the video played or captured by different devices. ConvertToYUY2 # assumes VirtualDub or MPEG encoder is next in video workflow chain The "ConvertTo" colorspace functions assume progressive video, so your statement is oK here. However, if you're going to use VirtualDub RGB filters after this script, why go back to YUY2? Why not convert to RBG at this point? If you were going straight to the MPEG or h.264 encoder, note that MPEG and h.264 are YV12, and your video is already YV12. The attached basketball_redo2.mp4 is the result of the script I used, below. Code:
Import("drive:\path\to\Avisynth 2,.5\plugins\FixChromaBleeding.avs") - CamcorderColorDenoise - temporalsmoother (setting=3) - ColorMill - Hue/Saturation/Intensity (Donald Graft) - gradation curves Everyone has their own idea of color balance. I this case I used ColorMill's Hue settings to undo the green color cast and greenish skin tones from florescent lighting in the original. The rest was tweaked with gradation curves and Donald Graft's Hue-Saturation-Intensity filter (a copy of this .vdf filter is attached as HueSatInt_vdf.zip). CamcorderColorDenoise and a mild built-in temporal smoother were added. The VirtualDub filters and settings I used can be loaded using the attached Basketball_vcf.vcf file. A .vcf is a text file that you can edit (if you know what you're doing!). Start Virtualdub and clikc "File" -> "load processing settings...", locate the .vcf file and click OK. The .,vcf will load the filters I mentioned in the same order and with the settings I used. You must have all the named filters in your VDub plugins folder. Note that loading a .vcf file will overwrite any filters already loaded. The general sharpener used was avisynth's LimitedSharpenFaster plugin. I activated chroma noise filtering with QTGMC's ChromaNoise and EZDenoise paramters and added CamcorderColorDenoise while running the script in VirtualDub. I've also attached Avisynth plugins.zip containing the following: - Avisynth's FixVHSOversharp, with docs. - Avisynth's LimitedSharpenFaster, with docs. - Avisynth's older MaskTools v1.5.1, used by LimitedSharpenFaster. The filter uses both the old v.1 and newer v.2 versions of MaskTools. You can have the old and new MaskTools .dll's in your AVisynth plugins folder at the same time. They have different file names, and internally they have different function names, so there won't be a conflict. Everyone has a different approach to processing, depending on the source. The more projecfts you see, the more tops you'll pick up. Hope this post has been helpful. |
2 Attachment(s)
the picture is too dull too me (unrealistic), lacks colors
i was never a fan of fixcolorbleeding, and once again, i found i was right after i tried it and it seems chromashift should be applied before qtgmc anyway, this the result i get: http://www.digitalfaq.com/forum/atta...-themaster1jpg http://www.digitalfaq.com/forum/atta...-themaster1jpg |
Quote:
-- merged -- sanlyn, Thank you sooooo much for this detailed explanation. This is epic! I was going through all of these lines in your script and trying to figure out all the nuances of the plugins in your approach. Quote:
Quote:
For the LimitedSharpenFaster, I removed the i in avsi so it would load, which is what I assume you did right? Could you briefly explain why you use the Import command instead of using autoload? Do I need to use the AssumeTFF() multiple times in a script (such as additionally during reinterlace) or does it remember throughout the script if I use it toward the top like you did? |
sanlyn, those are my (# text) remarks from the MultiScript, and do what the say ... for the tapes where tested. Remember, I'm not done with it, still an alpha, and what's currently in the forum isn't my latest one. Usage like this, used with other scripts, shows where it needs to be refined or explained more in depth.
The primary problem is that the values were not changed from the defaults. That's understandable, ragu is learning. :) Otherwise, great explanations. If you can think of any refining for comments, additions to make to the MultiScript, I'll be glad to look at it, probably incorporate it. That's the whole goal of the project. For me to learn from other Avisynth-savvy users was also an intended side effect. We all have tricks. I wanted to gather them into a single place, not have them strewn all over the place on different sites and forums. If for no other reason that my own sanity as a user! |
And I will say the multiscript is very helpful to me in my learning phase, figuring out what certain filters do and how to put together a script. Part of what I need to develop is my "eye" for seeing what exactly is wrong first... so I know the best way to fix it. For example, i knew the chroma was shifted incorrectly but I didn't think to change the default value because i wasn't thinking "that looks about 8 pixels too high."
You guys can "see the matrix" if you get the reference. Quote:
|
Quote:
This particular camera had an intelace problem. I ran a second script that was like the one I posted but with interlace restored before encoding. Thanks to QTGMC's cleanup the interlaced version looked cleaner than the original but there was still occasional aliasing on motion. Filters like santiag solved part of the problem, but not entirely -- it's just the nature of bad interlacing. It would look cleaner on a TV, not so clean on a PC. Most of the time you can make an interlaced version for distribution on disc, and then deinterlace that version for a progressive, square-pixel version if you need one or for web mounting. That second deinterlace comes from the same lossless and filtered working file you used for your interlaced version. To prevent overfiltering you can use QTGMC at the "super fast" preset which does very little unwanted processing. If you go the progressive/discarded fields route for DVD it will work, even if motion isn't quite as smooth. But you can't use square-pixel for DVD. If you want a standard def BluRay, it has to be interlaced. Quote:
Quote:
Use AssumeTFF() as a separate statement. People found that if you state it as part of a compound statement, such as in this way: Code:
AssumeTFF().QTGMC() [code]AssumeTFF().SeparateFields() Avisynth gets silly and assumes TFF applies only to that one statement but doesn't become universally understood for other operations that require field priority. Frankly, a lot of people just type AssumeTFF() or AssumeBFF() as many times as they want. But I have seen samples where the field order was accidentally reversed (and, yes, it sure plays like a nightmare, especially if telecined) or encoded incorrectly, so changing the field order requires explicit statements both ways. Fortunately you likely won't encounter that problem. |
1 Attachment(s)
Quote:
Code:
LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\FixVHSOversharp2_5\FixVHSOversharp2_5.dll") |
@ragu: Note the above script imports VirtualDub plugins, so the path is needed.
Some MT memory settings are used, and can be very system-dependent. If using AvsPmod, try the script first with those disabled, try to re-enable when ready to use. Sometimes AvsPmod will crash, sometimes everything will crash. You're basically forcing a memory setting on Avisynth, and it may no like it. Modern Avisynth 2.6.x should not require LoadPlugin. Nothing too unusual. It's given me an idea for something. :) His script needs to be edited to work for you. It's very computer specific, just as much as it's tape/source specific. You can't just copy/paste and expect it to work for you 100% as is. That's the first lesson of Avisynth that I should teach/warn. |
Question on resizing.
Do I still want to use the "Spline36resize(640,480)" command? My final destination for this (and any other video that I spend time on) is two files, one MPEG to keep for playing on TV via digital video player like WD or through my Tivo with pytivo. The second file mp4 to upload to vimeo. All my VHS videos were shot with the same camcorder, so I predict the cropping issues will be pretty consistent. Second question, has anyone posted to this forum preferred h.264 mp4 settings for avidemux? The mpeg-2 settings are very clear through Lordsmurf's guide. And is the 2.7 version preferred at this point? THANKS Quote:
|
I addressed the output options earlier in post #6. You can't make DVD or standard definition BluRay from square pixel video. Those two formats are anamorphic and interlaced. Make and save a 720x480 master for encoding. You can make it interlaced or you can use SelectEven() to make it 29.97 progressive (but either way, you tell your encoder to encode as interlaced. Many devices will play the disc as interlaced anyway).
Take that 720x480 version and make a 4:3 progressive version for square pixel mp4. If it's interlaced, deinterlace and remove 8 pixels from each side border, as shown here: Code:
AviSource(whatever 720x480 video) If it's not interlaced, omit the TFF and QTGMC lines: Code:
AviSource(whatever 720x480 video) |
For H.264, I've been using CRF for several years now.
Avidemux or Hybrid. |
5 Attachment(s)
I took a crack at this one using some of Sanlyn's tips, reading documentation for the filters I used and trying to adjust them as needed. Concentrated on halos. Tried to fix color balance issues. Please let me know where I failed and where I came close.
before: Attachment 7947 after: Attachment 7948 I attached the virtualdub settings. ANd here is the avisynth script. Code:
Import("C:\Program Files\AviSynth\plugins\FixChromaBleeding.avs") |
6 Attachment(s)
Quote:
The crippled and distorted blue channel is still there, and looks worse here. Notice how Blue has a solarized effect ("solar flare" on contrasting edges) and posterization: http://www.digitalfaq.com/forum/atta...1&d=1507573304 a 5fps video of the flicker, noise, and distortion in the blue channel is attached: original_bad_channel.mp4. Histograms show how badly blue is crippled. It's worse in dark and available lighting but it's present in brighter scenes, too. Below, YUV histogram is on the left, RGB on the right: http://www.digitalfaq.com/forum/atta...1&d=1507573467 You can raise blue into the brighter areas, but you're stretching available values and ending up with blotchy and patchy effects. Look at the uneven stains, poor flesh tones, and ugly yellow ochre shadows in the walls below from the "edited" avi. Note also that the original red-orange color cast has been replaced by an obvious green one, and there are odd effects in many object colors: for instance, what color is the wooden clock (it looks blackish green here, and the clock's face is cyan). What color is the flower pot, the uipholstery in the corner, or the t-shirts (are those t-shirts purple, dark blue, or light blue)?. The corrupt color channel corrupts most of the other hues as well: http://www.digitalfaq.com/forum/atta...1&d=1507573954 It's difficult not to notice the annoying edge noise, distortion and ragged edges in these videos. It's especially noticeable in available light shots but is seen everywhere and is the reason why you're having to throw away half your video when deinterlacing to avoid edge noise. It's caused by the absence of a line-level tbc. I know you say you have one, but it doesn't appear to be doing anything. You still have tell-tale vertical wiggles, distortion, and notched edges/ I prepared two 2x enlargements of areas in your sample and 5fps slow-motion videos so t hat you can see why the edges look so noisy (and why they can't be fixed): wrestling edited_plant_clock_bad_TBC.mp4 and wrestling edited_wall_bad_TBC .mp4. Until you can get better hardware or improve what you have, you'll spend a lot of time and effort working against yourself. |
Sanlyn do you believe the blue channel issues are a result of the VCR playing the tape for capture, or the original Camcorder that recorded the video?
(and just to answer a couple questions -- the clock should be dark brown with a white face. The flower pot should be black. The T-shirts should be purple. The wall should be white or slightly off-white. The couch should be various shades of tan with brown wood trim on it.) |
blue channel: I don't know if it;s the player or the original camera. Try a different tape not made with that camera, or try a different VCR even if it's not a high-end job. What's more difficult to deal with is that either the tbc isn't working or it doesn't exist. Color can often be fixed or tolerated, but scanline timing errors can't be fixed after capture.
|
It's the camera.
I doubt that wall is white, but probably more into the light tan. Given the samples so far, the "before" is better than "after". I think you're trying to push the color work too hard. Remember, this isn't a pure RGB, but YCrCb. You can't adjust one color without affecting others (and usually not for the better). Take baby steps in correction. Try to make it better, not make it perfect. Try it again, but with less aggressive filtering. |
2 Attachment(s)
Maybe you want it a bit more like this (script included)
http://www.digitalfaq.com/forum/atta...o-wrestlingjpg |
1 Attachment(s)
themaster1 -- that looks really good. I'd love to try out this script on my own but I'm missing quite a bit.
1. Lsmashsource -- not needed if I'm running the script on my avi file, correct? Or maybe I'm not understanding why this one is needed. 2. Could you help me find your script for RGBAdapt_auto_white_balance2.avs? 3. Can you provide MT 0.7? All download links i can find are dead. I think I have everything else you reference here. And Sanlyn, what do you use for Red Blue Green Compare? --Also Sanlyn and Lordsmurf, I have attached the same scene ripped from DVD from my original effort of digitizing my VHS tapes. I used a Panasonic DMR-EH59 to capture tapes played on a Panasonic VCR. But this should be able to show you if my color issues were the same back then and if my new capture looks better. |
2 Attachment(s)
i have filled your resquest see below (no need of lsmash if you use avi)
|
Quote:
I pass. |
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.