Quantcast Suggestions for improving my home videos? (Avisynth, VirtualDub) - digitalFAQ Forum
Go Back    Forum > Digital Video > Video Project Help > Restore, Filter, Improve Quality

Reply
 
LinkBack Thread Tools
  #1  
10-23-2017, 01:18 AM
enphenate enphenate is offline
Free Member
 
Join Date: Dec 2012
Posts: 21
Thanked 3 Times in 3 Posts
Hi all,

Glad to see these forums are still active (and that smurf is in good health!), I originally registered in 2012 to tackle a huge home video conversion project and it took me until this weekend to finally get around to it

My capture workflow for each of these videos is as follow JVC HR-S7800U & JVC-HR-S7600EU (for PAL vids) --> TBC-1000 --> ATI Wonder 600 USB. I also have a TBC-4000 but could not find the power supply for it. I followed Sanlyn's Virtualdub settings guide. The only settings I modified before capturing the videos were the brightness/contrast settings while viewing the Histogram in order to keep the videos within acceptable levels. I believe the videos were first recorded on a 1992 Hitachi VM-E31A 8mm video camera then transferred to various PAL and NTSC VHSs.

I am ready to touch up and improve the home videos, but I am a bit lost on where to begin for each video. I have most of the recommended plugins for Avisynth & Virtualdub, but have never used Avisynth before nor any of the plugins in Virtualdub.

Looking to fix:
-Chroma (dull colors & color bleed)
-Blurry Videos (would like to sharpen if it is recommended) - Most noticeable in the 100 Hunt video
-Masking Borders & fixing horizontal tears - All videos
-Audio Hum and clicks (will do last via audacity after visual restoration) - Most noticeable in the 1993 & 1994 videos
-Any other issues you may suggest fixing

Some videos are compilations of different scenes that are not related and have different scenery. would it be suggested to cut the videos into the different scenes and then modify them?

I have 4 main videos that I would like to begin with. I have uploaded multiple clips per video as examples of each capture. They are located at the link below and available for download. Note that the 1996 video is a PAL video.
https://drive.google.com/open?id=0B5...HhCRS15LVJPWTQ

I would really appreciate some suggestions on where to begin for each video, or maybe a general AVsynth script that I could get more familiar with. Looking forward to learning some new techniques and to improving these videos

Thanks!
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
10-23-2017, 01:42 AM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 10,320
Thanked 1,778 Times in 1,545 Posts
Quote:
Originally Posted by enphenate View Post
Glad to see these forums are still active
Yep! Not going anywhere. In fact, trying hard for a special unveil in Dec 2017, our 15-year anniversary!

Quote:
(and that smurf is in good health!),
Thanks!

Quote:
I originally registered in 2012 to tackle a huge home video conversion project and it took me until this weekend to finally get around to it
Yep, tell me about it. I'm just now doing two projects I started in 2003 and 2008.

Quote:
I also have a TBC-4000 but could not find the power supply for it.
9V 2A (10W)

Quote:
-Chroma (dull colors & color bleed)
Chroma usually refers to just the noise, not color correction. So separate that. Avisynth helps realign, the VirtualDub CCD filter removes the leftover bleeding and other color noise issues. Noting that the best removal is still done with a S-VHS VCR TBC, and then software to clean what's leftover.

Avisynth, change C/L as needed (vertical, horizontal, 2px at a time, - or +)
Code:
ChromaShift(C=2, L=-8) # align chroma over luma
Quote:
-Blurry Videos (would like to sharpen if it is recommended)
Post samples. Usually not recommended, no. You just cause several issues (ringing/halos, noise, interlace artifacts, etc).

Quote:
-Masking Borders & fixing horizontal tears
Again, not the same.
Fixing tearing done in ES10 or ES15, in hardware, pre-capture. Aside from that, masking it is all that can be done once digitized.
A VirtualDub masking guide stickied here.

Quote:
-Audio Hum and clicks (will do last via audacity after visual restoration)
Audacity works, but far weaker than Sound Forge. I've mastered Sound Forge to the point where I rarely use Audacity or Goldwave now.
Note: Sometimes Amazon has boxed versions of 9 for cheap.

Quote:
-Any other issues you may suggest fixing
Usually, with VHS, it's overall color correction per tape (not scene by scene, unless scenes are 20+ minutes long each), chrome NR, general NR, hiss/noise audio removal. Don't go overboard. Make it better, probably much better, but perfection is a fool's errand. Advanced work is removing/fixing (making better) tracking noise, bad visual or audio issues.

Quote:
Some videos are compilations of different scenes that are not related and have different scenery. would it be suggested to cut the videos into the different scenes and then modify them?
Some do so, some do not. I do not. Only if it's studio work, to be used a documentary or something like that. Not anything personal. Not old videos of me playing little league.

Quote:
I have 4 main videos that I would like to begin with. I have uploaded multiple clips per video as examples of each capture. They are located at the link below and available for download. Note that the 1996 video is a PAL video.
https://drive.google.com/open?id=0B5...HhCRS15LVJPWTQ
Too much, too big. Give us about 5 clips, preferable 50mb in size (even though 99mb is allowed, haet to waste server space). Consider compressing the clip down to high-bitrate MPEG or H.264 MP4/MKV first.

That help some?

- Did my advice help you? Then become a Premium Member and support this site.
- Find television shows, cartoons, DVDs and Blu-ray releases at the TVPast forums.
Reply With Quote
The following users thank lordsmurf for this useful post: enphenate (10-26-2017)
  #3  
10-23-2017, 02:40 AM
enphenate enphenate is offline
Free Member
 
Join Date: Dec 2012
Posts: 21
Thanked 3 Times in 3 Posts
Thanks for the swift response! Seems that I have a couple of items confused, thanks for the clarification.

I have converted the big files and chose 1 clip from each video and uploaded them here. The original folder with all of the AVI clips is still available here.

Here are some of the issues ive noticed with these clips. I would appreciate any other suggestions to improve them as well.
Blurry Video

Need general suggestions for this one

Screen tearing on top

Audible clicking disrupting the audio + Hum

General suggestions

Thanks
Reply With Quote
The following users thank enphenate for this useful post: lordsmurf (10-25-2017)
  #4  
10-24-2017, 10:49 PM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,227 Times in 968 Posts
Thanks for all the samples! Plenty to think about.

First. allow me to offer a capture tip and suggest how to make uploads easier:

1. I'd advise against using HuffyuvMT for capture. It's long obsolete and isn't as well optimized for multi-core CPU's as newer versions. Note that multi=threadiug and multi-core are two different things. huffyuvMT preceded multi-core by a good stretch and was not as efficient as older non-MT versions. The preferred huffYUV is here: https://www.videohelp.com/download/huffyuv-2.1.1.zip. You can keep hyuffYUV and huffyuvMT both loaded in your system at the same time without conflict for compliance with old and new huff captures.

2. You might already be aware that most of your samples were uploaded as uncompressed RGB. Converting to uncompressed RGB from the (supposedly) original YUY2 Huff files increased the size of each file by 300%. I recompressed the three 1994 samples using the later huffyuv (non-MT), then recompressed them again as working files using lossles Lagarith YUY2, which many use as a working compressor because it accepts RGB, YUY2, and YV12. I use huffyuv for capture because it's easier on a CPU during capture. On occasion you'll have to process files in YV12 because of certain filter requirements; in that case I save those working files as lossless Lagarith YV12 (Note that encoding to MPEG or h.264 produces a YV12 file, but more complex colorspaces like RGB and YUY2 are used to help maintain chroma resolution during intermediate processing). Here's a file size comparison after I recompressed the 1994 samples:

uncompressed huffyuv Lagarith Lagarith
File RGB YUY2 YUY2 YV12
---------- ------------ -------- -------- --------
1-1994.avi 613.3 MB 208.0 MB 182.4 MB 157.7 MB
2-1994.avi 268.9 MB 76.1 MB 67.1 MB 56.4 MB
3-1994.avi 131.4 MB 45.5 MB 37.3 MB 32.0 MB

The collection of four 1991 samples totaled 898MB when unzipped as uncompressed RGB. When recompressed to lossless HuffYUV YUY2 the total size of the collection was 264MB.

Converting to RGB before addressing levels, noise, and other glitches in the original YUV interferes with many cleanup operations, besides making it impossible to try clearing up some detail lost by clipping during YUV->RGB conversions. Many chroma and noise problems are best addressed in the original colorspace. In the experience of many users, colorspace conversions are more cleanly and safely handled in Avisynth than in most editors. Jumping back and forth in colorspaces isn't recommended due to quality loss after a series of math rounding and interpolation errors. Work in one colorspace, then go to the next if required, then go to another. Don't jump back and forth. Unfortunately with some operations, multiple conversions can't be helped -- thus Avisynth comes to the rescue with cleaner methods. It's also necessary to specify whether or not the source is interlaced when making the conversion.

While all this sounds rather exotic, it's been standard operating procedure for decades. All you have to do is look at some typical YouTube videos from careless users to see how a niut of sloppiness here ansd there adds up, permanently ruining output. Internet vids posted by informed users aren't nearly as ugly, despite the way YouTube techs often butcher input.

The samples in post #3 are in 2 groups. In the text of the post you describe 5 sample videos of concern, but 2 of the 5 are duplicates of 1994.mkv. The other download link in post #3 has a group of 6 samples, 5 of which are the same group of 5 that you describe as specific concerns. Some of these downloads have been re-encoded as h.264 mkv's, which if you don't mind I'll have to bypass in favor of samples that haven't been lossy encoded.

The sample 1-1993.avi appears three times in your posts. This is the video with audio noise. I agree with lordsmurf that retail audio software like Sound Forge is likely your best bet. You should audition a trial version for effect. Meanwhile your sample is too brief for a noise detection run that most such software would require. Visually, the sample has odd looking off-colors and skin tones due to mixed lighting sources. Overall there's a cyan imbalance from a light source off-camera to the left. You could reduce cyan (blue+green) or add red, but remember that because of lighting influences the left side of objects (as you face the video) will look cooler than objects on the right.

In the next post I'll try taking on some other samples and get into processing.

Last edited by sanlyn; 10-24-2017 at 11:00 PM.
Reply With Quote
The following users thank sanlyn for this useful post: enphenate (10-26-2017), lordsmurf (10-25-2017)
  #5  
10-24-2017, 10:56 PM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,227 Times in 968 Posts
I elected to address some of your samples from the groups in post #1, even though some are hampered by RGB conversion. I altered the names of the samples, such as changing "1 - 1991.avi" to "1-1991.avi" by eliminating blank spaces.

The first samples I encountered were the "Hunt" tv recordings. These look like slow-speed tapes. They're soft and blurry, with low acutance and what seems like enhanced edges but no "inner" detail. For example, you can see main facial edges but facial details and other fine textures are simply blurred. I would caution that JVC and JVC clones are poor choices for playback of slow-speed sources. JVC invented VHS but never fully supported recording speeds other than SP. Panasonic would be a better choice. But some improvement could be made by working with luminance levels. Looking at luminance histograms in all of your samples it would appear that in setting up your capture levels you're apparently including black borders and head-switching noise in your analysis. This throws off histograms, especially black levels, and in making compensating settings the tendency is to contract the histogram toward the middle, adversely affecting mid-levels.

Below, the top image shows a YUV histogram that includes the original borders, the head-switching noise, and some overlaid text (the latter is actually far more crisp than the image itself) and a readout of minimum and maximum YUV values. The image below that one has had the text, side borders, and switching noise removed to demonstrate how those elements affect a histogram during capture.



No borders, no switching noise, no text:


The histograms show some irregular spikes that indicate stretched luma values and gaps in the color response, likely partly due to the uncontrolled YUV-> RGB conversion. I used two dithering filters to "fill in the gaps" as it were, and to smooth color response, as well as to prevent block noise and hard edges in wall shadows in the background.

The AVisynth script I used joins "1-100 Hunt.avi" and "2-100 Hunt.avi" into "Hunt_1and2_reworked.mp4". Sharpening soft video is really touchy. It's rarely sucessful, producing hard edges and ugly edge halos as well as a cartoon look. The color work involved expanding the darks and midtones to give the image more snap. It's difficult to sharpen videos like this without being obvious. The sharpener used was one of the best and cleanest (Avisynth's LimitedSharpenFaster with special parameter settings to avoid edge halos). The VirtualDub color and noise filters were Camcorder Color Denoise, ColorMill, and gradation curves. The settings I used are attached in the file Hunt_1and2_VirtualDub.vcf. To load filters into Virtualdub using a .vcf file, start VDub and click "File" -> then "Load processing settings...". Locate the ,vcf file and click OPEN or OK. For the .vcf to work, you must have the named filters in your VDub plugins folder.

What picture mode was used on your JVC to play this video? Hopefully it wasn't Sharp (which overdoes edge enhancement) or Norm (which blurs detail and smears motion on noisy tapes). You could try playing this in Edit picture mode to see what you get. But as I say JVCs aren't so great with slow playback speeds.

For the Avisynth filters used I ran QTGMC to get a partially but lightly denoised progressive video, then reinterlaced afterwards. The Avisynth script I used likely won't make much sense at this point, but here it is:
Code:
v1=Avisource("E:\forum\faq\enphenate\Ahunt\1-100 Hunt.avi")
v2=Avisource("E:\forum\faq\enphenate\Ahunt\2-100 Hunt.avi")

### ---- Join v1 and v2 together --- ###
v1++v2
Crop(2,0,-14,-10).AddBorders(8,4,8,6)
ColorYUV(off_y=-8)
ConvertToYV12(interlaced=true)
SmoothTweak(contrast=1.15)
SmoothLevels(16,0.90,255,16,250,protect=6)
AssumeTFF()
QTGMC(preset="very fast",border=true,chromanoise=true,EZDenoise=2,denoiser="dfttest",sharpness=0.7)
smoothUV()
ChromaShift(C=2)
MergeChroma(aWarpSharp2(depth=30).aWarpSharp2(depth=20))
GradFun2DBmod(thr=1.8)
LimitedSharpenFaster(Strength=300,wide=true,soft=75,ss_y=1,ss_x=1,edgemode=2)
grainfactory3(g1str=1, g2str=1, g3str=1)
AddGrainC(1.5,2.0)

### -- reinterlace and prepare for VirtualDub RGB filters ---
SeparateFields().SelectEvery(4,0,3).Weave()
ConvertToRGB32(interlaced=true,matrix="Rec601")
return last
Now, onward and upward to another sample.....


Attached Images
File Type: jpg 1-100 Hunt YUV borders and text.jpg (76.1 KB, 229 downloads)
File Type: jpg 1-100 Hunt YUV no borders no text.jpg (72.3 KB, 225 downloads)
Attached Files
File Type: vcf Hunt_1and2_VirtualDub.vcf (3.6 KB, 12 downloads)
File Type: mp4 Hunt_1and2_rework.mp4 (6.28 MB, 10 downloads)
Reply With Quote
The following users thank sanlyn for this useful post: enphenate (10-26-2017), lordsmurf (10-25-2017)
  #6  
10-24-2017, 11:08 PM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,227 Times in 968 Posts
1-1994.avi: heavy blue color cast and color blotches. The YUV histogram for 1-1994.avi shows an odd hard spike at the left-hand side in the white band, indicating clipping of darks that was somehow raised to a rather high black level.



Color balance is always a personal issue. With 1-1994 I elected to correct for skin tones, black tires, and white tire whitewall. Many versions of "correct" color balance are possible here, but blue tires, blue whitewalls, grayish-blue trees, and purplish skin don't compute visually, IMO. The VDub filters used wre Camcorder Color Denoise, ColorMill, and two instances of gradation curves. The filter settings are attached as 1_1994_VirtualDub.vcf.



Denoising was with Avisynth's RemoveDirtMC() filter and a couple of others. The before-after image below is a 2X blowup of a thin but visible horizontal dropout (thin black line, see white arrows in top half). The dropout occupies 5 interlaced fields in frames 11, 12, and 13. There is another dropout in the left-hand trees in frame 21. There might be others but after running the script I didn't find any.



This is one of many consumer videos showing that camera users don't realize how frantically sweeping camera pans can severely tax digital devices and encoders. The motion here shows excessive combing on movement, partly a function of the camera's shutter type and the fact that such motion later requires very high encoding bitrates for smooth rendering by encoders and players. I also noticed that the very top 1/5 of frames seem to have a bit of noisy mistracking "sputter". Likely unnoticeable for most viewers. A quick run with Avisynth's QTGMC smoothed much of it.

As an experiment try playing "version2" of the 1-1994 mp4. It effectively drops alternate fields to get a progressive 29.97 fps video. Motion isn't as smooth, though.

The avisynth script for 1_1994_Rework.mp4:

Code:
AVisource("E:\forum\faq\enphenate\D1994\1-1994.avi")
Crop(2,0,-12,-6).AddBorders(6,2,8,4)
ConvertToYV12(interlaced=true)
AssumeTFF()
SeparateFields()
SmoothUV()
a=last
e=a.SelectEven().TurnRight().RemoveDirtMC(40,false).TUrnLeft()
o=a.SelectOdd().TurnRight().RemoveDirtMC(40,false).TurnLeft()
Interleave(e,o)
MergeChroma(aWarpSharp2(depth=20))
Weave()
### --- some motion smoothing ---- ###
QTGMC(preset="medium",border=true,sharpness=0.6)                                   )
vInverse()

### -- reinterlace and prepare for VirtualDub RGB filters ---
SeparateFields().SelectEvery(4,0,3).Weave()
ConvertToRGB32(interlaced=true,matrix="Rec601")
return last
The avisynth script for 1_1994_Rework_Version2.mp4:

Code:
AVisource("E:\forum\faq\enphenate\D1994\1-1994.avi")
Crop(2,0,-12,-6).AddBorders(6,2,8,4)
ConvertToYV12(interlaced=true)
AssumeTFF()
SeparateFields()
SmoothUV()
a=last
e=a.SelectEven().TurnRight().RemoveDirtMC(40,false).TUrnLeft()
o=a.SelectOdd().TurnRight().RemoveDirtMC(40,false).TurnLeft()
Interleave(e,o)
MergeChroma(aWarpSharp2(depth=20))
Weave()
### --- some motion smoothing ---- ###
QTGMC(preset="medium",border=true,sharpness=0.6,FpsDivisor=2)                                   )

### -- prepare for VirtualDub RGB filters ---
ConvertToRGB32(interlaced=false,matrix="Rec601")
return last


Attached Images
File Type: jpg 1-1994 YUV with borders.jpg (106.9 KB, 222 downloads)
File Type: jpg 1-1994 after.jpg (109.0 KB, 224 downloads)
File Type: jpg 1-1994 horizontal dropout before-after.jpg (107.6 KB, 224 downloads)
Attached Files
File Type: vcf 1_1994_VirtualDub.vcf (6.3 KB, 7 downloads)
File Type: mp4 1_1994_rework.mp4 (13.58 MB, 9 downloads)
File Type: mp4 1_1994_rework_version2.mp4 (13.53 MB, 7 downloads)
Reply With Quote
The following users thank sanlyn for this useful post: enphenate (10-26-2017), lordsmurf (10-25-2017)
  #7  
10-24-2017, 11:12 PM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,227 Times in 968 Posts
2-1991.avi: Jerky camera motion like this makes even the best denoisers look fairelyuseless, and give encoders fits. This sort of thing didn't look too frantic on a CRT, which does a dance around whimpy LCD's when it comes to motion handling. But digital devices just see this sort of thing as so much jumpy noise.

Besides spastic motion the video has over-saturated reds and chroma shift. It's YUV histogram had a ragged color response like many of the others, but levels were in good shape. The color glitches are best addressed in the original YUV colorspace. What was available was the RGB-converted sample from post #1 that I reconverted to Lagarith YUY2. That's better than struggling with the lossy mkv encode in post #3.

To steady the video at least a little you could use an Avisynth plugin called Stab(), short for "stabilizer". It steadies a video perhaps 4 or so pixels in any direction (it's better than nothing) but it should be run pretty much by itself in a separate step, after which the borders require readjustment. For a more comprehensive balancing act you can use VirtualDUb's DeShaker, which is a two-step process and which unfortunately will cost some frame real estate with really jumpy images like this.

Combing on motion is a real problem with this jumpy video. That's mostly the camera shutter's fault. What I elected to do was denoise a bit witk QTGMC and use the trick of dropping alternate fields when deinterlacing. It's a shame to do this, but an uncontrolled camera with severe combing looks worse than the loss of some temporal resolution. The second denoiser was a mild RemoveDirtMC to calm the buzzing edges and red chroma noise. FixChromaBleeding, ChromaShift, aWarpSharp2, and SmoothUV repaired the color bleed and displacement. The final tweak was Camcorder Color Denoise in Virtualdub. The VirtualDub settings are attached as 1-1991_VirtualDub.vcf.

There's a bad frame in frame 59. Because there's no continuous video connecting the scene change here, you can just as well delete frame 59. There are several ways to do it, but the script below shows how to create an "a" file that consists of frames 0 to 58, and a "b" video that consists of frame 60 to the end. These "a" and "b" parts are then joined together.


When encoding, you'll need some hefty bitrate to render this rapid motion.

Code:
AVisource("E:\forum\faq\enphenate\B1991\2-1991.avi")
ConvertToYV12(interlaced=true)
AssumeTFF()
QTGMC(preset="faster",border=true,FpsDivisor=2)
vInverse()

### --- eliminate frame 59, including audio --- ###
source=last
a=source.Trim(0,58)
b=source.Trim(60,0)
### --- join a and b --- ###
a++b

FixChromaBleeding()
ChromaShift(C=-2,L=-2)
MergeChroma(aWarpSharp2(depth=30))
SmoothUV()
RemoveDirtMC(20,false)
Crop(12,0,-10,-6).AddBorders(10,2,12,4)

### --- prepare for VirtualDub filter ---
ConvertToRGB32(interlaced=false,matrix="Rec601")
return last


Attached Files
File Type: vcf 2-1991_VirtualDub.vcf (787 Bytes, 4 downloads)
File Type: mp4 2-1991_Rework.mp4 (3.76 MB, 4 downloads)
Reply With Quote
The following users thank sanlyn for this useful post: enphenate (10-26-2017), lordsmurf (10-25-2017)
  #8  
10-24-2017, 11:19 PM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,227 Times in 968 Posts
2-1996.avi: In this case I start with an RGB histogram. The histogram shown below is a Virtualdub ColorTools graph. Initially, a YUV histogram showed that levels were basically correct for this indoor scene -- more by luck than design, since a YUV histogram of the same scene with borders and bottom noise included just barely filled the y=16-235 spectrum. As one can see from the image below (borders and bottom noise removed), blacks are slightly elevated. If black borders were included they could be seen to hit RGB 8 at their darkest, which would show up as slightly gray on playback instead of black.



Be that as it may, the RGB histogram shows muted brights, a dominant red, suppressed greens, and even more suppressed blues whose darkest values are mildly crushed. It would seem easy enough to just boost blue a bit in YUV, but there's a problem: doing so just turns everything pink, which isn't what we want. Or one could pull back on YUV red, but that makes everything green with odd looking reddish whites. I wanted to work with each color separately and in specific value ranges, so I elected to color correct entirely in RGB.



The RGB corrections were fairly aggressive. I used a pixel value reader (similar to those in "Pro" software that people pay big bucks for and then ignore, unlike the pros who use them constantly) to determine the corrections needed to make red, green, and blue look white in objects that were supposed to be white, like the bottom of the doll's feet and the baby's clothes. Then to make grays look gray, then to make blacks look black. Once that was donme, the other colors fell into place. The main VDub tool was gradation curves, tweaked with ColorMill. Some of the chroma noise, especially the discolored shadows and skin tones, were cleaned with Camcorder Color Denoise. The VDub settings I used are attached as 2-1996_VirtualDub.vcf.

Before color work, I used Avisynmth to denoise with some commonly used plugins: two old standby's (RemoveDirtMC and TemporalSoften for general grunge cleaning) and a stock MDeGrain2 routine for the camera's grainy CMOS low-light noise. The MDegrain2 routine is copied pretty much verbatim from the documentation for Avisynth's MVtools plugin. There is st ill some tracking distortion in objects on the right-hand side. Looks like toe damage to me, and likely something that can't be fixed without a stronger line tbc such as a pass-thru unit. But even that might not be the solution.

The final VDub output was saved as YV12 for encoding. For most projecyts I would have used Avisynth's 16-bit dithering tools to make the RGB->YUV conversion, ans smooth the histogram gaps and some hard edges -- but that technique is a story for another day.

Perhaps I can get to another sample or two by tomorrow evening....

Code:
Avisource("E:\forum\faq\enphenate\E1996\2-1996.avi")
ConvertToYV12(interlaced=true)
AssumeTFF()
SeparateFields()
FixChromaBleeding()
SmoothUV()
RemoveDirt(20,false)
TemporalSoften(3,3,8,15,2)

source=last
  super = source.MSuper(pel=2, sharp=1)
  backward_vec2 = MAnalyse(super, isb = true, delta = 2, blksize=8, overlap=4, dct=0)
  backward_vec1 = MAnalyse(super, isb = true, delta = 1, blksize=8, overlap=4, dct=0)
  forward_vec1 = MAnalyse(super, isb = false, delta = 1, blksize=8, overlap=4, dct=0)
  forward_vec2 = MAnalyse(super, isb = false, delta = 2, blksize=8, overlap=4, dct=0)
  MDegrain2(source,super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400) 
weave()

ConvertToRGB32(interlaced=true,matrix="Rec601")
Crop(10,2,-14,-10).AddBorders(12,6,12,6)
return last


Attached Images
File Type: jpg 2-1996 RGB.jpg (98.5 KB, 225 downloads)
File Type: jpg 2-1996 RGB after.jpg (112.7 KB, 227 downloads)
Attached Files
File Type: vcf 2-1996-VirtualDub.vcf (3.7 KB, 5 downloads)
File Type: mp4 2-1996_Rework.mp4 (1.79 MB, 10 downloads)
Reply With Quote
The following users thank sanlyn for this useful post: enphenate (10-26-2017), lordsmurf (10-25-2017)
  #9  
10-25-2017, 05:33 AM
enphenate enphenate is offline
Free Member
 
Join Date: Dec 2012
Posts: 21
Thanked 3 Times in 3 Posts
Wow, thank you so much for the in depth posts Sanlyn. I've already read through them once and have gained valuable knowledge in regards to editing. Will definitely go through the posts multiple times until I really gain a good grasp on the techniques

Before I begin trying to make any of the suggested edits, do you suggest I recapture all of the videos with the recommended version of huffYUV while also making sure the VCR is set to edit mode? I believe calibration was also enabled on the VCR. I made sure to crop each video before capture and to adjust the levels while viewing the histogram so that the red bleed is minimal on each side.

I had no idea that the videos were in uncompressed RGB format. The original files in post #1 are the files that were created directly from the VirtualDub capture. I thought it was saving them directly from the capture to YUY2 format. Perhaps I misconfigured a setting. Will check my settings again.

Thanks again, one step closer to a clean capture and restore
Reply With Quote
The following users thank enphenate for this useful post: lordsmurf (10-25-2017)
  #10  
10-25-2017, 06:32 AM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 10,320
Thanked 1,778 Times in 1,545 Posts
No need to re-capture HuffyuvMT to Huffyuv. At worst, just re-encode. Both are lossless, so it should have zero impact on quality.

I don't think RGB had any effect on quality. I've not read this now-long thread, but I'm not sure how he would even capture RGB. By default, Huffy is YUV. Anyway, it's just typical home-shot video quality, with the usual terrible white balance, gamma, and levels. My own home videos look similar.

I'd never set a JVC VCR to EDIT mode. That disengages the noise filters, which is a main benefit of the JVC lines. It's rare that I put it into EDIT. I know sanlyn likes it, but I'm fully opposed to it. More manual NR work will be needed in VirtualDub and/or Avisynth, and it usually corrects with the same minor drawbacks (or even sometimes worse). I'm all for quality, but take advantage of convenience when available.

@sanlyn, I think some of your white balance corrections are too aggressive here. The cyan tank top (false color) was made hotter by your fix (looking at the screencap, not attached clip), and color is still false. Same for the 1996 couch. Remember that video appears somewhat darker on a computer monitor (even calibrated) than TVs. When watched, it'll wash illegal. I think a conversation hue/wb adjustment, without touching IRE/gamma/brightness correction, would do far better.

Don't cook colors. Correct, but don't over-correct.

- Did my advice help you? Then become a Premium Member and support this site.
- Find television shows, cartoons, DVDs and Blu-ray releases at the TVPast forums.
Reply With Quote
The following users thank lordsmurf for this useful post: enphenate (10-26-2017)
  #11  
10-25-2017, 06:55 PM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,227 Times in 968 Posts
Sometimes I rally do wish it might be possible to edit older posts. A table of comparison values from post #4 (Suggestions for improving my home videos? (Avisynth, VirtualDub)) in this thread appears as unreadable because of my idiot typing. The original post reads as follows:

Quote:
Originally Posted by sanlyn View Post
Here's a file size comparison after I recompressed the 1994 samples:

uncompressed huffyuv Lagarith Lagarith
File RGB YUY2 YUY2 YV12
---------- ------------ -------- -------- --------
1-1994.avi 613.3 MB 208.0 MB 182.4 MB 157.7 MB
2-1994.avi 268.9 MB 76.1 MB 67.1 MB 56.4 MB
3-1994.avi 131.4 MB 45.5 MB 37.3 MB 32.0 MB
The table of values should look like this:

Code:
           uncompressed   huffyuv  Lagarith  Lagarith
File            RGB        YUY2      YUY2      YV12
---------- ------------  --------  --------  --------
1994.avi     613.3 MB    208.0 MB  182.4 MB  157.7 MB
1994.avi     268.9 MB     76.1 MB   67.1 MB   56.4 MB
1994.avi     131.4 MB     45.5 MB   37.3 MB   32.0 MB
Reply With Quote
The following users thank sanlyn for this useful post: lordsmurf (10-25-2017)
  #12  
10-25-2017, 07:06 PM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 10,320
Thanked 1,778 Times in 1,545 Posts
Quote:
Originally Posted by sanlyn View Post
The table of values should look like this:
Code:
           uncompressed   huffyuv  Lagarith  Lagarith
File            RGB        YUY2      YUY2      YV12
---------- ------------  --------  --------  --------
1994.avi     613.3 MB    208.0 MB  182.4 MB  157.7 MB
1994.avi     268.9 MB     76.1 MB   67.1 MB   56.4 MB
1994.avi     131.4 MB     45.5 MB   37.3 MB   32.0 MB
Or this:

FileuncompressedhuffyuvLagarithLagarith
-RGBYUY2YUY2YV12
1994.avi613.3 MB208.0 MB182.4 MB157.7 MB
1994.avi268.9 MB76.1 MB 67.1 MB56.4 MB
1994.avi131.4 MB45.5 MB37.3 MB32.0 MB

Yes, we have tables here!

Uncompressed YUY2 is also possible.
Some also think uncompressed means 4:4:4, which isn't true.
The main takeaway here is "uncompressed" isn't necessarily locked into a spec, like codecs are, or even typical spec (ie 4:2:0 MPEG typical, 4:2:2 MPEG possible, all YV12).

- Did my advice help you? Then become a Premium Member and support this site.
- Find television shows, cartoons, DVDs and Blu-ray releases at the TVPast forums.
Reply With Quote
  #13  
10-26-2017, 06:02 PM
enphenate enphenate is offline
Free Member
 
Join Date: Dec 2012
Posts: 21
Thanked 3 Times in 3 Posts
Finally have some spare time tonight to begin making some edits as well as going over all of the information in more depth

Few questions, Lordsmurf, you suggested that instead of recapturing the videos with correct version of Huffyuv that I should just re-encode them from RGB to YUY2. What application do you suggest I use to re-encode the files?

Also, where can I find the settings that delegates if my captures are going to be RGB or YUY2? Like I mentioned previously, I had no idea that my files were being captured in RGB and not YUY2. Maybe it was due to HuffyuvMT. I am removing HuffyuvMT tonight and replacing it with Huffyuv 2.1 for my future captures.

Thanks again!
Reply With Quote
  #14  
10-26-2017, 07:20 PM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,227 Times in 968 Posts
Quote:
Originally Posted by enphenate View Post
you suggested that instead of recapturing the videos with correct version of Huffyuv that I should just re-encode them from RGB to YUY2.
You don't "re-encode". You recompress.

Quote:
Originally Posted by enphenate View Post
What application do you suggest I use to re-encode the files?
VirtualDub. Set "color depth" menu to YUY2, set compression to the either HuffyuvMT or the newer huffyuv (Frankly, I'd use Lagarith for a smaller file. You're going to need Lagarith anyway unless you want to spend 1/3 of your processing time doing acrobatics between YUY2, RGB, and YV12). Then use "Normal Recompress" or "fast recompress" mode before saving the AVI.

Quote:
Originally Posted by enphenate View Post
Also, where can I find the settings that delegates if my captures are going to be RGB or YUY2? Like I mentioned previously, I had no idea that my files were being captured in RGB and not YUY2. Maybe it was due to HuffyuvMT.
I'd first ask, why are some of your samples in YUY2 and others aren't? Codecs don't change colorspace on a whim. At one time you must have set YUY2 in VirtualDub for capture (the default is RGB). If you did capture in YUY2 and then saved your edited samples in VirtualDub using "full processing mode", the default colorspace for saving the sample in that processing mode would be uncompressed RGB. To save a sample in its original colorspace, open the file directly in VirtualDub, make your edit, then choose "direct stream copy" mode before saving the sample.

The capture colorspace can be set in VirtualDuib capture in more than one place. Look at section 3 of the advanced capturing guide at Capturing with VirtualDub [Settings Guide], and scroll down to the image of the dialog window for the "Capture Pin" dialog. The Capture Pin dialog is under the main menu's "Video" group.

The other place you can set the intended colorspace is with the top menu's "Video" -> "Custom format..." dialog, which is pictured at the bottom of post #4 in that same settings guide. Just above that dialog box description in the same post are sample settings for Huffyuv (non-MT) and Lagarith compressors.

Quote:
Originally Posted by enphenate View Post
I am removing HuffyuvMT tonight and replacing it with Huffyuv 2.1 for my future captures.
If you remove MT, you won 't be able to play or read your earlier captures. MT and the newer huffyuv can exist together without conflict. In setting up a compressor, the two versions don't have identical titles in the compressor lists.
Reply With Quote
  #15  
10-26-2017, 10:26 PM
enphenate enphenate is offline
Free Member
 
Join Date: Dec 2012
Posts: 21
Thanked 3 Times in 3 Posts
Quote:
Originally Posted by sanlyn View Post
I'd first ask, why are some of your samples in YUY2 and others aren't? Codecs don't change colorspace on a whim. At one time you must have set YUY2 in VirtualDub for capture (the default is RGB). If you did capture in YUY2 and then saved your edited samples in VirtualDub using "full processing mode", the default colorspace for saving the sample in that processing mode would be uncompressed RGB. To save a sample in its original colorspace, open the file directly in VirtualDub, make your edit, then choose "direct stream copy" mode before saving the sample.
Ahhhhhh At some point while I was creating samples, I switched the setting from full processing mode to direct stream copy, hence the inconsistencies. My capture settings were correct, so the original capture files are YUY2 via HuffyuvMT, but the uploaded samples were different formats. Glad we figured that out and good to know that full processing mode does that.

It's time to begin my first attempt at editing these videos
Reply With Quote
  #16  
10-27-2017, 12:59 AM
enphenate enphenate is offline
Free Member
 
Join Date: Dec 2012
Posts: 21
Thanked 3 Times in 3 Posts
After adding some missing plugins, I managed to get the Avisynth and Virtualdub scripts up and running. I first ran the Avisynth script, then opened the virtualdub script. When I try to save the file as AVI, the process is painfully slow. Is this normal? It was running at 1.75 fps

*EDIT* Seems like only the 100hunt video is slow. I tried saving the 1993 video as AVI after running the scripts and it was running at 8fps, still not that fast, but definitely better than 1.75fps.

Heres a clip after running both scripts
100 Hunt - Restored

virtualdub.JPG
You must be logged in to view this content; either login or register for the forum. The attached screen shots, before/after images, photos and graphics are created/posted for the benefit of site members. And you are invited to join our digital media community.



Last edited by enphenate; 10-27-2017 at 01:21 AM.
Reply With Quote
  #17  
10-27-2017, 09:48 PM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,227 Times in 968 Posts
Good work on the scripts !

Some jobs will use different plugins and run slower or faster than others. Speed also depends on how much is running in the system altogether, and it's all very system dependent. Some video problems need industrial-strength plugins like MCTemporalDenoise or TemporalDegrain, which pretty much allow you to go out and do a little shopping while the process runs.

One space and time saver: Usually when I run a script and additional VirtualDub filters are planned, I load the VBDub filters when the avs script is opened. This applies the VDub filters to the output of the script and runs both filtering tasks at the same time. When I try testing the effects of the VDUB filters on a script, I temporarily disable some of the script's lines to speed up testing (place a "#" character as the first character in a script's line to make it a comment instead of a running statement). The whole thing runs in "full processing mode", but the output is set up for YV12 color and lossless Lagarith -- after all, if the next step is final-output MPEG or h.264 encoding the result will be YV12 anyway, and VirtualDub is okay with that output method.

Another way to speed up a script is to make it end early by placing a "return last" statement where you want to exit and look at results. "Return last" means to "stop here and return the results of the last thing you did.". But don't forget to later delete that line or make it a comment with a "#" as the first character -- that's what I forgot once, and ran a script for nearly an hour before I realized I was executing only a third of the script!


Another quick way to get test runs going for various filters is to make a change in a script and hit F2 in VirtualDub (which is the same as clicking "Reopen video file"). Give the script a few seconds to re-run internally and it will re-open into the same frame you stopped at. Of course if you re-open often enough you'll run short of memory and will have to restart the script from scratch with "Open video file....".

Another time saver is keeping a text file full of boilerplate script lines. For example, the re-interlace statement "SeparateFields().SelectEvery{4,0,3).Weave()" are tedious to type (and I almost always make a typo). But a text file full of stock statements like that offers copy-and-paste in just seconds.
Reply With Quote
  #18  
11-02-2017, 09:40 PM
enphenate enphenate is offline
Free Member
 
Join Date: Dec 2012
Posts: 21
Thanked 3 Times in 3 Posts
Slowly making progress on the captures. I found the remote for my JVC VCRs and noticed that their settings were probably not the most optimal for capturing.

So far all of my captures have been done with Huffyuv MT and these JVC HR-S7800U settings:
Video Calibration: ON
Picture Control: Edit
Digital R3: On

I think that I will recapture my important VHS tapes using the proper version of Huffyuv as well as the following settings:
Video Calibration: Off
Picture Control: Normal
Digital R3: Off

These are the video levels used in Virtualdub. They are all the default levels other than the brightness/contrast which I very slightly adjust in order to be within the histogram limits.
settings.JPG

Any thoughts?


Thanks



Last edited by enphenate; 11-02-2017 at 09:50 PM.
Reply With Quote
  #19  
11-03-2017, 06:39 AM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,227 Times in 968 Posts
Looks OK, but remember that every tape is different. Settings differ according to tape, often different segments of tape. Sequences shot in backlight, frontlight, interiors, etc., will require different level settings. Home tapes vary far more than retail, which themselves aren't all that consistent.

NORM and EDIT output differently as well. NORM is softer, where you might see motion smearing from temporal filtering. Each tape will look different, too, with each mode.
Reply With Quote
  #20  
12-13-2017, 10:32 AM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 10,320
Thanked 1,778 Times in 1,545 Posts
@sanlyn: What's the difference between re-encode and recompress? I don't think their is one.

@enphenate: I use VirtualDub for all lossless>lossless encoding.

- Did my advice help you? Then become a Premium Member and support this site.
- Find television shows, cartoons, DVDs and Blu-ray releases at the TVPast forums.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Improving Q. of old VHS capture (animation video) Avisynth! TheCage Restore, Filter, Improve Quality 3 06-23-2016 02:43 PM
Avisynth for improving resolution? merchantord Restore, Filter, Improve Quality 8 11-28-2013 06:24 AM
Improving quality of videos taken with surveillance cameras? StefanCP Restore, Filter, Improve Quality 3 12-20-2012 09:25 AM
Clean-up of old VHS home videos? Asesinato Capture, Record, Transfer 4 04-02-2012 06:59 AM
Advice/suggestions regarding capture,cleanup of mid 80's home VHS rms8 Capture, Record, Transfer 20 03-25-2010 04:50 PM

Thread Tools



 
All times are GMT -5. The time now is 06:42 PM