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.

Major17Wood 05-08-2022 05:31 PM

1 Attachment(s)
Quote:

Originally Posted by latreche34 (Post 84664)
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.

I already posted my first garbage capture to youtube https://www.youtube.com/watch?v=t-FuXjgxG_k

The video is indeed Public, but it cant be monetized
Attachment 15165

latreche34 05-08-2022 06:20 PM

Don't upload the SD version, Youtube algorithm will hit you with harsh compression, They don't want any content below 1080p on their platform or else it will be shrunk to death to save bandwidth for other high quality contents.

Major17Wood 05-08-2022 06:27 PM

Thanks. I'm watching videos on how to set up Avisynth and avspmod but man is it complicated. Is this a good video to watch? https://www.youtube.com/watch?v=C4PyyQoz6eo

The script you created seems relatively simple, i like the results and would like to use it for my video, i just dont understand the workflow.

latreche34 05-08-2022 07:15 PM

The hard part of scripting is getting all the dependencies in your computer and get them to work, after that it's a matter of few clicks. Open up a new thread, there are members here or at videohelp.com who can help get you setup.

Major17Wood 05-08-2022 10:42 PM

1 Attachment(s)
I followed the setup video I posted earlier and set up everything exactly as described, but I cant seem to preview the script. I get an error about missing a decompressor. Google yields absolutely no results on "fourcc UYFH"

Attachment 15166

Very odd considering I'm using the same sample file posted earlier.



EDIT: I got past this by installing the 64 bit huffyuv dll. the video im following is strictly using 64 bit software

Major17Wood 05-08-2022 11:49 PM

2 Attachment(s)
Got Avisynth up and running! Even got the second very long script running which had a ton of dependencies. Pretty happy with myself right now lol

currently testing both scripts given to me by you kind gentlemen
Attachment 15167

The only part I couldn't figure out is how to load those ffmpeg scripts you guys provided. Am I missing an ffmpeg plugin that allows custom command lines? Just for testing I'm using the x264 8 bit plugin

Attachment 15168

latreche34 05-09-2022 01:40 AM

ffmpeg encoder runs on a command line level, It could also run using some of the GUI utilities, I can't help you further on this as OS platforms are very different and takes a computer wiz to sort them out but I'm pretty sure there are members who can help on this.

lollo2 05-09-2022 04:52 AM

Quote:

to set up Avisynth and avspmod but man is it complicated
Not really, you did it in a couple of hours, it is much easier than what people suspect. If you are able ro execute my script, you can run whatever ;)

AvsPmod is just a text editor for AviSynth. I never used. But for beginners it can be very helpful to play with the parameters of the different basic functions with a slider, if you build the script in the appropriate way (unfortunately it does not work with the complex plugin/functions).

About ffmpeg it is better to do not use any GUI, in order to have full control of its parameters. Run it through a command line in a "command prompt" shell. If you prefere a GUI there are several avalable (MeGUI, clever FFmpeg-GUI, ...)

Major17Wood 05-09-2022 01:22 PM

Quote:

Originally Posted by lollo2 (Post 84672)
About ffmpeg it is better to do not use any GUI, in order to have full control of its parameters. Run it through a command line in a "command prompt" shell. If you prefere a GUI there are several avalable (MeGUI, clever FFmpeg-GUI, ...)

So basically I need to process my original AVI (crop, deinterlace, resize) and output it as an uncompressed AVI, and when thats done run the ffmpeg command on the resulting AVI?

lollo2 05-09-2022 03:06 PM

Quote:

and output it as an uncompressed AVI,
There is no need to create any ouput avi (btw, not uncompressed anyhow). If you check the proposed ffmpeg commands, you understand that you feed fmpeg with the AviSynth script.

Major17Wood 05-09-2022 06:18 PM

So even though you guys split your scripts into two code boxes for the examples, theyre really all entered in the same window at the same time?

latreche34 05-09-2022 07:50 PM

The reason I do de-interlace-crop-resize in one step and encode in a separate step is because I don't need to encode all the time. It can be done though but not in avspmod as far as I know.

Major17Wood 05-10-2022 07:31 PM

Final product using your script, latreche34

https://www.youtube.com/watch?v=5TMySwwzi_M

I think it looks great!

latreche34 05-11-2022 04:22 PM

Looks pretty good, you haven't addressed the black level issue but it gives it some dynamic look, Not a lot of people will notice it anyway.

Major17Wood 05-11-2022 06:36 PM

I wasn't sure what to do with what you guys said was crushed blacks. Apparently the ATI 600 USB crushes them internally, and there's no way to stop it without introducing a piece of hardware between the VCR and the 600. I'm not really up for buying more equipment at the moment. I've tried using the capture filter controls (which I read was futile anyway) in conjunction with the histogram, but not having a live histogram in virtualdub while trying to adjust levels makes it nearly impossible to fine tune a result. If there's an easier way to go about doing that, I'm all ears.

Hushpower 05-11-2022 07:05 PM

Quote:

but not having a live histogram in virtualdub while trying to adjust levels makes it nearly impossible to fine tune a result. If there's an easier way to go about doing that, I'm all ears.
My live histogram guide:

https://drive.google.com/file/d/1Tk9...ew?usp=sharing


All times are GMT -5. The time now is 08:13 AM

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