#1  
11-27-2018, 05:42 PM
Towncivilian Towncivilian is offline
Premium Member
 
Join Date: Feb 2015
Posts: 48
Thanked 4 Times in 3 Posts
Hello,

I see that the Guide to Understanding Video Sources, Part 2 Capturing Videotapes recommends 352x480 resolution for VHS tapes. I have been capturing at 720x480 (or 720x576 for PAL tapes) of VHS (not S-SVHS) tapes. Is this overkill, even for archival purposes?

I also captured an NTSC 8mm video tape at 640x480 - was this the incorrect resolution to capture it at? The result is available to stream or view screenshots of here, with capture lineage detailed as well: https://www.depechemode-live.com/wik...,_USA/Source_2

My most recent capture of a VHS tape looks kind of stretched horizontally. I captured using VirtualDub to HuffYUV 720x480 29.97FPS. I can provide some screenshots or a video clip if desired.

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  
11-27-2018, 07:36 PM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,276 Times in 978 Posts
Quote:
Originally Posted by Towncivilian View Post
I see that the Guide to Understanding Video Sources, Part 2 – Capturing Videotapes recommends 352x480 resolution for VHS tapes. I have been capturing at 720x480 (or 720x576 for PAL tapes) of VHS (not S-SVHS) tapes. Is this overkill, even for archival purposes?
I suggest that you take a look at the updated guide, which has several posts: http://www.digitalfaq.com/forum/vide...-settings.html.

720x480 isn't overkill. It's considered the more workable resolution for restoration, repair, color grading, and further encoding.

If you intend to create a DVD or standard definition BluRay or AVCHD, capture 720x480 using YUY2 color and lossless compression (Huffyuv, Lagarith, or UT VideoCodec). You can also use that frame size to deinterlace/inverse telecine and resize to square-pixel formats for internet posting.

If your primary purpose is internet posting or online streaming, capture at 640x480 or other square-pixel frame size using YUY2 and lossless compression (Huffyuv, Lagarith, or UT VideoCodec). For cleanup, posting, and encoding, use QTGMC for deinterlace or IVTC for inverse telecine. Resize (if necessary) and encode appropriately for web posting. From the 640x480 capture you can also resize to 720x480 to create a DVD or standard definition Bluray/AVCHD (SD BluRay must be encoded as interlaced or telecined). Upscaling for DVD/BluRay will have a quality cost if not done correctly. Downscaling is less of a problem.

720x480/720x576 looks "stretched" because they are anamorphic formats later encoded for a display aspect ratio of either 4:3 or 16:9.

The video to which you linked couldn't be viewed:



I didn't have 3 hours available for downloading an mp4.
Typically forum readers don't analyze lossy encoded and otherwise processed video using online players or downloads, but prefer to see short samples of unaltered captures. Web postings have artifacts from unknown processing applied for posting and streaming. Screenshots are not all that helpful (they don't reveal the effects of motion) and have been converted to RGB using unknown conversion processes. But it appears in some of the screenshots posted on the wiki link that vour video has some bad luminance and chroma clipping that could have been avoided during capture or at least partially corrected during post processing.


Attached Images
File Type: png Error msg.png (4.9 KB, 158 downloads)

Last edited by sanlyn; 11-27-2018 at 08:34 PM.
Reply With Quote
The following users thank sanlyn for this useful post: Towncivilian (03-27-2020)
  #3  
12-15-2018, 06:25 PM
Towncivilian Towncivilian is offline
Premium Member
 
Join Date: Feb 2015
Posts: 48
Thanked 4 Times in 3 Posts
Thanks for the thorough reply. The linked guide is very helpful, I will reconfigure VirtualDub on my capture machine and always check the luma histogram in the future.

Here is a short lossless excerpt from the VHS capture I am referring to in the first post.
I am also able to provide a short excerpt of the lossless capture of the 8mm video, if desired.

It's strange that you can't stream the video on the wiki in your browser, because it's encoded to H264 - my understanding was that most (all?) modern browsers can stream that codec.

Generally, I capture video, crop the overscan, tweak the audio if necessary, and encode to H264 using Handbrake for the website. The torrent version keeps lossless audio, the stream gets compessed audio.

Would it make the most sense to capture directly to 640x480 as you suggested, since the primary intent is for web consumption, or keep the 720x480 and resize during post-processing?


Attached Files
File Type: avi exciterepk-excerpt.avi (61.97 MB, 15 downloads)
Reply With Quote
  #4  
12-18-2018, 09:08 PM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,276 Times in 978 Posts
Thank you for making and posting the sample.

I was able to view the internet recording using a different browser. Unfortunately it's not the original and is a poorly managed capture and encode. There is no input level control, so that darks and brights are completely blown away for almost the entire length of the video. It's possible to remove some grain, but this would be a very small improvement. No one would want to work on the lossy web version. A chunk of the lossless original might be a different story.

Your exciterepk-excerpt.avi sample is posted as as RGB32 color. Hopefully you are capturing at YUY2 instead of RGB. To avoid unwanted colorspace changes when making samples from YUV captures, save the sample in VirtualDub using "direct stream copy" processing mode. Any file saved using "Full processing mode" in VirtualDub is automatically converted to RGB, even if no VirtualDub filters are used. As RGB your sample file size was 63.4MB. As losslessly compressed YUY2 the file size would have been 29MB, and you wouldn't add interpolation errors with unnecessary colorspace conversions.

We have seen far worse tape dubbing in the past, but that doesn't mean the sample is without damage. Previous processing at some point resulted in bad cliipping of darks as well as brights. Clipping involves data destruction. At the bright end there is highlight detail destruction along one bright edge of the yellow furniture. At the dark end there is sharp black clipping indicated by lack of eye color (the irises are black blobs), the lack of detail in the far right background (and discoloration noise in parts of it), total loss of detail in the dark sweater, the "shag carpet" look in the blond hair, and by the characteristic "black mouth" effect. There are also pasty clay-face effects due to overall detail loss.

Lost detail can't be re-created. Clipped blacks can be brightened but they simply look like dense dark grays without color, and over-brightening simply exposes clipped areas as nothing but random noise. There are over-sharpening effects; a bright left-edge halo remains, and there is some faint right-edge noise that looks as if it has been filtered or softened at an earlier stage. Sharpening won't help here -- it would make many defects look worse.

The top image below is a reduced copy of an original frame from the sample, with side borders removed to prevent affecting the histograms. Below the image, the graphs are of a YUV signal level histogram (left) and a chroma-level YUV vectorscope (right).





Above, look at the left-hand graph of horizontal colored bands. Notice the sharp "spike" at the leftmost edge of the topmost white band. That spike indicates black clipping of all data below y=16. The horizontal band for the blue-yellow "U" channel shows some yellow chroma data but little or no blue. The bottom red-green "V" channel shows red data but barely a smattering of green. In the right-hand graph, the vectorscope for saturation levels shows some yellowish-red and orange data, but little or no data for pure red, and a deficit for magenta, blue, cyan, and pure green colors. These graphs explain why there is an obvious red-yellow color cast in the video.

The image below is a VirtualDub RGB vectorscope of the same frame as above. The placement of colors is different, but it confirms the color problems seen in the YUV histogram and vectorscope.



Below, the pictures are a comparison between the borders in an original frame (left) and a filtered and corrected version (right):



Below, an RGB vectorscope showing at least a partial and visible color correction by reducing red-yellow saturation and stretching the very small amount of bluish and green pixels that are available:



In the comparison frames above, note that the original image dimensions are the same in both versions of the frame. In the new frame, the thin side borders are removed and replaced with new black pixels. The thick bottom border of head-switching noise is removed and is replaced by top and bottom pixels that center the image vertically. The method that you described of cropping and then resizing the image alters the original aspect ratio and stretches (distorts) the image vertically. The Avisynth crop and replace method shown in the script below doesn't distort the aspect ratio.

I denoised and resized your original exciterepk-excerptL.avi sample using an Avisynth script. The color correction was done by applying a VirtualDub ColorMill filter to the output of the Avisynth script in Virtualdub. The ColorMill settings that I used were recorded in a VirtualDub .vcf file (the .vcf is attached). If you want to use those setings, download and save the .vcf file. To load the Color Mill filter with the same settings I used, in VirtualDub click "File...", then -> "load processing settings", then locate and select the .vcf file. The same ColorMill .vdf filter must be in your VirtualDub plugins, or the .vcf won't work. ColorMill can be downloaded at http://www.digitalfaq.com/forum/atta...colormill21zip.

Below is the Avisynth script I applied to get a 59.94fps progressive version of your source (change the path statements to match file locations in your system):

Code:
Import("D:\Avisynth 2.5\plugins\RemoveDirtMC.avs")

AviSource("D:\forum\faq\Towncivilian\exciterepk-excerpt.avi")
AssumeFPS(30000,1001)
AssumeTFF()
ConvertToYUY2(interlaced=true)
SeparateFields()
FixVHSOversharp(20,16,12)
FixVHSOversharpL(20,12,8)
Weave()
Levels(10, 1.0, 255, 16, 255, dither=true, coring=false) 

ConvertToYV12(interlaced=true)
QTGMC(preset="medium",EZDenoise=4,denoiser="dfttest",ChromaMotion=true,\
  border=true,ChromaNoise=true,DenoiseMC=true,sharpness=0.7)
RemoveDirtMC(30,false)
TemporalSoften(4,4,8,15,2)
ChromaShift(C=2)

Dither_convert_8_to_16 ()
GradFun3(thr=0.8,mask=0,lsb_in=true,lsb=false,smode=1)

MergeChroma(aWarpSharp2(depth=20).aWarpSharp2(depth=10))
AddGrainC(1.25, 1.25)
Crop(0,0,-6,-18).AddBorders(4,8,2,10)
Spline36resize(640,480)
ConvertToRGB32(interlaced=false)
return last
The output is 59.94fps video and 44KHz audio for web mounting. Some websites don't allow double frame rates, so I also prepared a 29.97fps version that discards alternate fields, a method often used on the internet. This method, however, discards 50% of the original temporal resolution. It would not be obvious in many videos, but motion wouldn't look as smoopth with lots of baction or camera pans. You can tell QTGMC to discard alternate fields by changing this line of code:

Code:
QTGMC(preset="medium",EZDenoise=4,denoiser="dfttest",ChromaMotion=true,\
  border=true,ChromaNoise=true,DenoiseMC=true,sharpness=0.7)
to this:

Code:
QTGMC(preset="medium",EZDenoise=4,denoiser="dfttest",ChromaMotion=true,\
  border=true,ChromaNoise=true,DenoiseMC=true,sharpness=0.7,FPSDivisor=2)
The 59.94 version is attached as excerpt_59.94p.mp4. The 29.97fps version is attached as excerpt_29.97p.mp4.

The script begins by importing the complete text of code in the RemoveDirtMC.avs plugin. Your avi sample is then opened and decoded with the AviSource() function. During processing, on final output the frame rate was slightly off, which means that the input frame rate was also slightly off by a few decimal points, so AssumeFPS(30000,1001) corrects that problem. AsssumeTFF() tells Avisynth that the field priority of the interlaced input file is Top Field First.

Because your avi source was in RGB color, ConvertToYUY2(interlaced=true) converts the colorspace for the first filter used. SeparateFields() separates each interlaced frame into two half-height images. FixVHSOversharp has right-edge and left-edge versions for reducing the over-sharpening edge noise and left-edge halo (you can see this on the edges of the sweater). It also slightly softens the over-sharpened source. Then the Weave() function reweaves the stream of half-height fields into their original interlaced state. Then the Levels() function very slightly brightens the darkest luminance values to help calm the gritty look of dark objects, although the original black clipping can't be corrected at this point.

ConvertToYV12(interlaced=true) prepares the colorspace for the filters that follow. QTGMC is used here for both deinterlace and for smoothing and denoising that are more thorough than QTGMC's preset defaults. ChromaShift(C=2) corrects for slight chroma displacement by moving chroma 2 pixels to the right. RemoveDirtMC and TemporalSoften help to calm the noise seen in the facial contours when the speaker's head moves. The worst noise is persistent flutter and flicker in the gray background. It's made up of typical simmering VHS schmutz (https://www.merriam-webster.com/dictionary/schmutz). It required a strong cleaner that won't destroy every detail in sight. The schmutz cleaner I used is GradFun3, a function in the dither tools package (http://avisynth.nl/index.php/Dither_tools).

MergeChroma(aWarpSharp2(depth=20).aWarpSharp2(dept h=10)) is used to tidy up color around edges, and then AddGrainC(1.25, 1.25) adds a small amount of film-like grain to mask some noise in face tones and the large smooth background area. Crop(0,0,-6,-18) removes dirty and uneven border pixels. Then AddBorders(4,8,2,10) replaces old pixels with new ones, centers the image, and restores the original frame dimensions. Spline36resize(640,480) resizes to square-pixel 4x3 dimensions.

Note that if you capture at 720x480 and you want DVD from your source, your source will already have the correct size and interlace structure for DVD or standartd definition BluRay. but must remain deinterlaced and needs resizing for web mounting. If you capture at 640x480, the video needs deinterlacing and cleanup for web mounting, and you will still need to remove bad borders and replace them with new ones to maintain the 4x3 aspect ratio. For DVD or standard def Bluray, the 640x480 original must be deinterlaced, cleaned, cropped and re-bordered, resized to DVD/BluRay spec, and reinterlaced. Thus 720x480 still offers the most flexibility and the best quality for both output formats. 640x480 works for web mounting, but will have poorer quality for optical disc formats.

ConvertToRGB32(interlaced=false) prepares the output for VirtualDub's filters, which work in RGB, and Avisynth's RGB conversion is more precise than with other apps. Return last outputs the results of the "Last" step performed, which was the conversion to RGB. Note that the interlace state must be specified for all color conversions. At this point in the script the video is not interlaced.


Attached Images
File Type: jpg A original - borders removed.jpg (14.2 KB, 126 downloads)
File Type: png B original YUV Levels and Vectorscope.png (29.4 KB, 128 downloads)
File Type: png C original - RGB vectorscope.png (27.4 KB, 125 downloads)
File Type: jpg D 4x3 original vs new borders.jpg (26.6 KB, 130 downloads)
File Type: png E filtered - RGB vectorscope.png (27.3 KB, 128 downloads)
Attached Files
File Type: vcf VirtualDub settings.vcf (869 Bytes, 0 downloads)
File Type: mp4 excerpt_59.94p.mp4 (2.83 MB, 5 downloads)
File Type: mp4 excerpt_29.97p.mp4 (2.83 MB, 4 downloads)
Reply With Quote
The following users thank sanlyn for this useful post: captainvic (12-19-2018), edumarrom (04-20-2022), Robinthehood (12-29-2018), Towncivilian (03-27-2020)
  #5  
03-27-2020, 09:42 AM
Towncivilian Towncivilian is offline
Premium Member
 
Join Date: Feb 2015
Posts: 48
Thanked 4 Times in 3 Posts
Thanks for the detailed information sanlyn. I apologize for the insanely late reply. I have captured this VHS again keeping in mind the input level control and affixed a new sample here.

I do capture to HuffYUV YUY2 and 16/48 PCM audio. With the earlier sample, I had not selected "direct stream copy" so VDub had re-encoded to RGB. This new sample is 43.1MB - not quite 29MB as you had anticipated, not sure what accounts for that difference.

Please let me know if this new sample is a better result - to my untrained eye it does look better than the previous version, in that the white background is no longer an off-gray sort of color, and the video is brighter in general, without being overly bright.

I'd appreciate your feedback, if you have the time. The script you used looks like it made an enormous difference even with the worse capture. I'd love to improve this capture in a similar manner before making this available on my website and better understand how to attain those results on my own. The explanation of your script is excellent, but with the new capture I'm sure not necessarily all of those steps will apply still, correct?


Attached Files
File Type: avi ExciterEPK-excerpt-new.avi (43.18 MB, 3 downloads)
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Horizontal adjust? mikeG Capture, Record, Transfer 5 07-02-2019 02:44 PM
ATI AIW VE capture resolution? Feedbucket Capture, Record, Transfer 2 01-28-2019 02:59 AM
What is going on with this tape? Horizontal jitter at top waloshin Capture, Record, Transfer 5 11-28-2018 04:33 PM
Horizontal lines/scanlines in captures? (ATI 600 USB) Turok81 Capture, Record, Transfer 8 11-27-2016 08:25 PM
AIW MMC resolution 384x288? (ATI All In Wonder) lookouts Capture, Record, Transfer 21 03-15-2006 10:57 AM

Thread Tools



 
All times are GMT -5. The time now is 06:36 AM