digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Capture, Record, Transfer (https://www.digitalfaq.com/forum/video-capture/)
-   -   Captured VHS to AVI HuffYUV, next steps? (https://www.digitalfaq.com/forum/video-capture/12761-captured-vhs-avi.html)

Major17Wood 05-07-2022 08:16 PM

Captured VHS to AVI HuffYUV, next steps?
 
I set up VirtualDub using the settings guide on this site.
I've managed to capture my graduation tape, 1 hour 20 minutes long, with no frame drops or inserts :D

Now I need to crop the borders, resize to 4:3 aspect ratio (since it looks horizontally stretched capturing at 720x480), and deinterlace..and maybe anti-alias to get rid of jaggies?

What's the preferred way (and order) to go about these tasks?

Sample in reply below

Major17Wood 05-07-2022 09:06 PM

sample
 
2 Attachment(s)
sample video created with VLC's record function
screenshot attached of VirtualDub info

latreche34 05-07-2022 10:51 PM

3 Attachment(s)
Here is your sample de-interlaced, cropped and resized named GraduationDCR shortened to fit the 99MB file size limit followed by another file encoded to h.264 named GraduationE.

I used Avspmod for the first file using the following script sequence:
Code:

AviSource("C:\Users\User\Desktop\graduation.avi")
AssumeTFF()
QTGMC(Preset="Fast")
Crop(10, 0, -10, -6)
LanczosResize(1440, 1080)

and ffmpeg for the encoding using the following script:
Code:

ffmpeg -i GraduationDCR.avi -vf setsar=sar=1/1 -c:v libx264 -crf 18 -x264opts colorprim=bt709:transfer=bt709:colormatrix=bt709:force-cfr -c:a aac -b:a 192k -movflags +faststart GraduationE.mp4
Is that Chris Cuomo in the video?
http://www.digitalfaq.com/forum/atta...1&d=1651981857

traal 05-07-2022 11:01 PM

The blacks are crushed. Needs a new capture with levels set correctly for a good histogram.

Major17Wood 05-07-2022 11:05 PM

Holy crap dude, those look amazing! Nah that aint Cuomo...just some smart kid.

What's the difference between DCR and h.264? which one should I use?

Major17Wood 05-07-2022 11:06 PM

@traal, How can I do that? I used the default "Capture filter" settings. I didn't adjust anything in that menu.

autephex 05-07-2022 11:10 PM

Quote:

Originally Posted by Major17Wood (Post 84645)
Holy crap dude, those look amazing! Nah that aint Cuomo...just some smart kid.

What's the difference between DCR and h.264? which one should I use?

DCR appears to be lossless still. H264 is compressed. (Notice the difference in filesizes). I'm assuming DCR is short for deinterlaced, cropped, resized.

H264 would be your final output - the compressed video after all filtering is done. H264/x264 is the most commonly used for video compression currently. MeGUI can be used to convert to x264 with an avisynth script performing all the filtering prior to compression, or you can produce a lossless avi first and then compress to x264 using your software of choice (megui, handbrake, vidcoder or ffmpeg as shown in the previous reply example)

latreche34 05-07-2022 11:44 PM

Yes DCR is still in lossless state although de-interlacing is not a lossless process, From the DCR file you can either upload to youtube directly for sharing or encode for offline viewing/sharing. You would still have to keep the master files in case you want to go back and change something if storage space is not an object.

latreche34 05-08-2022 12:06 AM

Here is how it looks like if you would upload it to youtube, Don't worry it's an unlisted video and will be deleted later. Uploading from lossless could take hours for a full tape, It is better scheduled overnight.
How did you dub the audio track to the tape? Is this a second gen dub?

Major17Wood 05-08-2022 12:43 AM

Quote:

Originally Posted by latreche34 (Post 84650)
Here is how it looks like if you would upload it to youtube, Don't worry it's an unlisted video and will be deleted later. Uploading from lossless could take hours for a full tape, It is better scheduled overnight.
How did you dub the audio track to the tape? Is this a second gen dub?

Audio was captured uncompressed, as indicated in the "virtualdub settings" post

latreche34 05-08-2022 02:11 AM

That wasn't my question, How that song got into the tape, I don't hear the microphone's sound from the camcorder? Was it a second gen dub or the audio has been dubbed straight to tape, but from its quality this isn't a linear audio dub, it sounds HiFi, so it has to be a second gen dub, Consumer camcorders didn't have the option to feed the audio while shooting live.

Hushpower 05-08-2022 04:32 AM

Quote:

Uploading from lossless could take hours for a full tape, It is better scheduled overnight.
I wouldn't be uploading that to YT. 93mb for 2.6 seconds is far too big and not realistic given the tape is 1hr 20min long. I'd be encoding it down to MP4 before sending it to YT.

latreche34 05-08-2022 04:53 AM

It really depends on how much upload speed someone has, For me it would take the same amount of time the computer has to be on to encode at 5fps or just upload it to Youtube as is skipping an unnecessary encode. And if someone wants a copy he would just dump the encoded Youtube stream to his hard drive taking advantage of free iCloud, But I always keep the high quality lossless SD masters in case someone wants to do some editing later.

traal 05-08-2022 08:58 AM

Quote:

Originally Posted by Major17Wood (Post 84646)
@traal, How can I do that? I used the default "Capture filter" settings. I didn't adjust anything in that menu.

Temporarily crop out the edges, then play the tape and adjust brightness and contrast in your capture card's settings until the histogram is all blue.

msgohan 05-08-2022 11:34 AM

Quote:

Originally Posted by traal (Post 84657)

And if the histogram is always all-blue, the adjustment is instead "until there are no 'peaks' at the ends."

Major17Wood 05-08-2022 12:34 PM

Quote:

Originally Posted by latreche34 (Post 84652)
That wasn't my question, How that song got into the tape, I don't hear the microphone's sound from the camcorder? Was it a second gen dub or the audio has been dubbed straight to tape, but from its quality this isn't a linear audio dub, it sounds HiFi, so it has to be a second gen dub, Consumer camcorders didn't have the option to feed the audio while shooting live.

These tapes were created by a production company called American Multimedia Yearbooks and sold to kids who graduated.

Major17Wood 05-08-2022 01:14 PM

Quote:

Originally Posted by latreche34 (Post 84643)
Here is your sample de-interlaced, cropped and resized named GraduationDCR shortened to fit the 99MB file size limit followed by another file encoded to h.264 named GraduationE.

I used Avspmod for the first file using the following script sequence:
Code:

AviSource("C:\Users\User\Desktop\graduation.avi")
AssumeTFF()
QTGMC(Preset="Fast")
Crop(10, 0, -10, -6)
LanczosResize(1440, 1080)

and ffmpeg for the encoding using the following script:
Code:

ffmpeg -i GraduationDCR.avi -vf setsar=sar=1/1 -c:v libx264 -crf 18 -x264opts colorprim=bt709:transfer=bt709:colormatrix=bt709:force-cfr -c:a aac -b:a 192k -movflags +faststart GraduationE.mp4
Is that Chris Cuomo in the video?

Could you explain how to run the scripts? I'm totally new at this. I like the quality of the mp4 and would like to store it this way to upload to youtube and to view on pc.

lollo2 05-08-2022 04:16 PM

4 Attachment(s)
My contribution as well:

- the capture has crushed black, as reported by traal and msgohan:
Attachment 15161

- compared to (already excellent) latreche34 approach I added some denoise and light sharpening (and a different cropping approach to keep the same original proportions, but with a black border at the bottom):
Attachment 15162

image comparison: https://imgsli.com/MTA3MDc4

The used AviSynth script:
Code:

video_org=AviSource("vlc-record-2022-05-07-22h02m13s-graduation.avi-.avi")

# cropping
        crop_left=8        # | 720-(8+8)x576-(0+6)=704x474       
        crop_top=0       
        crop_right=8
        crop_bottom=6
video_org_crop=video_org.crop(crop_left,crop_top,-crop_right,-crop_bottom)

#video_hist=video_org_crop.ConvertToYV16().Histogram("Levels")

#return(video_hist)

# plugins directory
plugins_dir="<full path to AviSynth plugins directory>"

        # QTGMC
Import(plugins_dir + "QTGMC.avsi")
        # Zs_RF_Shared
Import(plugins_dir + "Zs_RF_Shared.avsi")

        # TemporalDegrain2
Import(plugins_dir + "TemporalDegrain-v2.2.1_modGMa.avsi")
        # RgTools
loadPlugin(plugins_dir + "RgTools-v1.0\x86\RgTools.dll")
        # MaskTools2
loadPlugin(plugins_dir + "masktools2-v2.2.23\x86\masktools2.dll")
        # MVTools
loadPlugin(plugins_dir + "mvtools-2.7.41-with-depans20200430\x86\mvtools2.dll")
        # FFT3DFilter
loadPlugin(plugins_dir + "FFT3dFilter-v2.6\x86\fft3dfilter.dll")
        # FFTW
loadPlugin(plugins_dir + "LoadDll\LoadDll.dll")
loadDll(plugins_dir + "fftw-3.3.5-dll32\libfftw3f-3.dll")

        # LSFmod
Import(plugins_dir + "LSFmod.v1.9.avsi")
        # RgTools
#loadPlugin(plugins_dir + "RgTools-v1.0\x86\RgTools.dll")
        # MaskTools2
#loadPlugin(plugins_dir + "masktools2-v2.2.23\x86\masktools2.dll")

        # ColorMatrix
LoadPlugin(plugins_dir + "ColorMatrix\ColorMatrix.dll")

        # Nnedi3
loadPlugin(plugins_dir + "NNEDI3_v0_9_4_55\x86\Release_W7\nnedi3.dll")

### de-interlacing
deinterlaced=video_org_crop.AssumeTFF().QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, tr1=2, tr2=1, NoiseTR=2, sharpness=0.1)

### convert to YV16
deinterlaced_yv16=deinterlaced.convertToYV16()

### denoising
denoised_yv16=deinterlaced_yv16.TemporalDegrain2(degrainTR=3)

### convert to YUY2
denoised=denoised_yv16.convertToYUY2()

### change color matrix
denoised_cm=denoised.Colormatrix("Rec.601->Rec.709")

### add borders
denoised_cm_borders=denoised_cm.addborders(crop_left,crop_top,crop_right,crop_bottom)

### upscale
upscaled=denoised_cm_borders.nnedi3_rpow2(rfactor=2, nns=4, qual=2, cshift="Spline36Resize", fwidth=1440, fheight=1080)

### convert to YV12
upscaled_yv12=upscaled.convertToYV12()

### sharpening
sharpened_yv12=upscaled_yv12.LSFmod(defaults="slow")

### convert to YUY2 with chroma from YUY2 color space
sharpened=sharpened_yv12.convertToYUY2().MergeChroma(upscaled)

return(sharpened)

Compressing to h264 with:
Code:

fmpeg.exe -i input.avs -c:v libx264 -crf 17 -preset slow -aspect 4:3 -c:a aac -b:a 128k output.mp4
gives this output: Attachment 15164

Edit: your original capture has halos, disable any sharpening in the player and in the capture card:
Attachment 15163

Major17Wood 05-08-2022 05:11 PM

In regards to crushed black, I read this post regarding the ATI 600 USB at https://forum.videohelp.com/threads/...needs-cleaning

"The ATI 600 USB clips blacks before the signal reaches VirtualDub. VDub's hook into the 600's proc amp won't fix it. You need an external proc amp to adjust black levels before they enter the 600. You can fix the highlights with the Levels() filter, much of the brights can be recovered. See the Levels() entries in the above scripts, which calm the highlights and contract output highs to y=235. It's too late for the blacks; they're crushed before the capture software sees them. It's a pain with the ATI 600 USB and the Hauppauge Live-2 USB."

Regarding the halos, ATI 600 defaults to 2 for sharpness. Dropping it to 0 I still see the halos. Must just be the tape.

latreche34 05-08-2022 05:19 PM

Quote:

Originally Posted by Major17Wood (Post 84660)
These tapes were created by a production company called American Multimedia Yearbooks and sold to kids who graduated.

I would imagine the original tape would look much better than the second gen dub. Anyway, you cannot post that video publicly on youtube you would get a copyright flag for audio, You can only share it privately or unlisted.


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

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.