digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Restore, Filter, Improve Quality (https://www.digitalfaq.com/forum/video-restore/)
-   -   AvsPmod first script? (https://www.digitalfaq.com/forum/video-restore/12913-avspmod-first-script.html)

DG1965 08-06-2022 08:04 AM

AvsPmod first script?
 
4 Attachment(s)
I've just done my first script with Avspmod and hope I'm on the right path. Any advice would be welcome. I've tried to list everything I did.
My first screen shot shows my script in Avspmod. The post filtered clip looks de-interlaced? so I'm guessing I've done something incorrect in my script.
Eventually I will watch the videos on a television so I think my final output should be interlaced?

I loaded the script into virtualdub and changed color depth to 4:2:2 YCbCr (YUY2)
Compression Huffyuv v.2.1.1
with Full processing mode.
I then added the CCD 1.7 filter and then save as AVI

I didn't sharpen in Avisynth as I wasn't sure if this was done better in VirtualDub?
I reduced the length of the post filtered opening presents 1 to get below the 99MB threshold. The opening presents 1 original was 86mb and the post filtered was 149mb
Thank you in advance.

Hushpower 08-06-2022 10:38 PM

That video looks fine to me, but I will defer to the experts re the quality.

Your processed clip is deinterlaced because QTGMC is a deinterlacer, most would say the best. That's it's primary job. It is also a noise reducer, as you can see comparing the before and after clips.

Re playing files on your TV, if they are interlaced, the TV will deinterlace them nicely as it plays them (provided it can decode them; my TV won't decode the normal analogue AVI codecs such as HUFF and Lagarith). If they are already deinterlaced ie progressive, the TV will play them with no issues as well. I don't think there's a benefit in playing interlaced computer files on a TV. Lord Smurf I think says "don't deinterlace unless you have to", but virtually every application these days, You Tube, Vimeo, Facebook, playing on the computer, sending MP4s to friends all either require deinterlaced files or will deinterlace the file when it is played, so it would seem to me that you may as well do it yourself with QTGMC.

DG1965 08-07-2022 02:32 AM

Thanks Hushpower. Yes I thought the quality is much improved. I knew the QTGMC deinterlaced but I wrongly thought the command ConvertToRGB32 (Interlaced=true) would re-interlace. Yes I've also read about newbies wanting to deinterlace straight away, it's that instant quality improvement that you get on a computer monitor. But I'm just not sure if it's better in the long run?
I tried to keep my script simple, hopefully I haven't duplicated any commands. I didn't sharpen as I wasn't sure if I should at this stage and which method is best.
I listed the before & after file sizes as I thought it might have reduced the file size once I did the Huffyuv compression? Any advice would be welcome. Thanks.

Hushpower 08-07-2022 02:56 AM

I dare not go too far into AVISynth, as it is still voodoo to me, but your frame rate has gone from 25 to 50, which will account for the file size.

QTGMC does have a setting for doubling the framerate when deinterlacing. Here are my notes:

Code:

QTGMC(Preset="Fast", FPSDivisor=2) #FPSDivisor default is 1 which gives double framerate; 2 gives orig FR
#SelectEven()

The FPSDivisor and SelectEven affect the framerate. Best look at SelectEven on the AVISynth wiki.

Also, both files are in HUFF anyway so that in itself probably won't result in any reduction. Use Mediainfo to analyse your files. Use Tree or Text view. It's very handy, revealing all sorts of good stuff about your files.

On the ConverttoRGB32, I'll defer to the experts.

That's all I'll (can) say! :D

DG1965 08-07-2022 03:56 AM

Thanks Hushpower, I will read up on SelectEven and framerate in general. I've still got a long way to go! Thanks.

lordsmurf 08-07-2022 02:17 PM

Quote:

Originally Posted by DG1965 (Post 86303)
I've also read about newbies wanting to deinterlace straight away, it's that instant quality improvement that you get on a computer monitor. But I'm just not sure if it's better in the long run?.

No, not better. Keep archives interlaced. Encode out a compressed deinterlaced copy for watching. It will change again someday. Future proof yourself, don't ruin it to the standards of the moment.

Some things, like Youtube, now forced you to upscale for "quality". But the more you needlessly mess with video, the worse it gets. Do what is needed to appease devices (or stupid), but keep those masters interlaced, SD, low or no/lossless compression.

DG1965 08-07-2022 02:37 PM

Thanks Lordsmurf. Interlaced it is! Should I now remove QTGMC from my script and replace it with MCTemporalDenoise? or Will the CCD do the same function in VirtualDub. I wasn't sure if my script even needs the ConvertToRGB32(Interlaced true) line. Thanks.

lollo2 08-08-2022 03:04 AM

Quote:

I've just done my first script with Avspmod and hope I'm on the right path. Any advice would be welcome.
Excellent. I never use AvsPmod, but it is a wonderful and helpful GUI for AviSynth.

Quote:

The post filtered clip looks de-interlaced? so I'm guessing I've done something incorrect in my script.
As said by HushPower the clip is deinterlaced by QTGMC in your script.
In your script you could use ConvertToYV16() rather then ConvertToYV12(interlaced=true) to keep original 4:2:2 color format.
It is ok to convertToRGB32 because you be opening the script in VirtualDub and using CCD plugin, but you shold check first that the levels are in the range 16-235 prior to the conversion. In any case interlaced=true (which has an effect only on YV12 to YUY2 or YV12 to RGB conversions) is wrong here, because the video after QTGMC is not interlaced.

Quote:

I didn't sharpen in Avisynth as I wasn't sure if this was done better in VirtualDub?
Not really. Several sharpeners exist in AViSynth, choose your favourite http://avisynth.nl/index.php/Externa...ers#Sharpeners. Mine are LSFmod and CAS.

Quote:

Should I now remove QTGMC from my script and replace it with MCTemporalDenoise
They have two different functions. The first is a deinterlacer, the second is a denoiser.

Quote:

Will the CCD do the same function in VirtualDub.
CCD has a third function, it is a removal of chroma noise, designed for specific video issues.

DG1965 08-08-2022 11:37 AM

Thanks lollo2. Yes Avspmod been really helpful I was getting myself in a right mess! I will set a script up with your settings and the changes that you suggested.
Would you normally use both MCTemporalDenoiser and CCD on the same video clip or is it a case of one or the other? I will sharpen with the LSFmod you sent through to me. Thanks.

themaster1 08-08-2022 03:49 PM

Tip from an old user: When you work on a video on AVSPmod always open it twice (2 separate tabs), one with no filters (or just the minimum) the other with all the filters, thus you can work on your script, experiment by switching tabs, you can zoom in compare before/after. Only for that i love avspmod

For your video you can try this, feel free to adapt, i haven't checked everything

Code:

LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\PlanarTools-0.3.0\PlanarTools.dll")

AVISource("opening presents 1.avi")
assumetff()

#  To remove the GREEN EDGE at the right
U = UtoY() # separate U channel
V = VtoY() # separate V channel
V = Crop(V,0,0,-16,-0) #remove discoloured portion and black border
extra=Crop(V,342,0,2,-0).PointResize(12,V.height)
V=StackHorizontal(V,extra).AddBorders(0,0,4,0,$808080) # add the extra, pad to 720 with grey
YtoUV(U, V, last) # mix the separate U and V with the original Y
###########

## deinterlace
qtgmc("fast",edithreads=4)
selecteven()

# Degraining / Sharpening :
McDegrainSharp(1)
mergeluma(FineSharp(),0.6)


DG1965 08-08-2022 04:05 PM

Thanks themaster1. That makes sense to use 2 tabs. I will try your script also.

lollo2 08-09-2022 02:12 AM

Quote:

Would you normally use both MCTemporalDenoiser and CCD on the same video clip or is it a case of one or the other?
I would start with MCTemporalDenoise acting on luma only, MCTemporalDenoise(chroma=false), and then CCD to reduce the chroma smear if you have that problem.

But you can also experiment different combinations :wink2:

Be careful that MCTemporalDenoise includes sharpening post-processing through LSFmod, so either you disable it or you do not sharpen later.

DG1965 08-09-2022 01:52 PM

Thanks lollo2. I've read up regarding YV16 I understand now why you mentioned it, thank you. I will keep it 4:2:2 throughout the filtering process. Reading the LSFmod page it's color format is YV12, before I add it to my script I just wanted to check that it normally works with YV16? I'm hoping to play with your script and themaster1 scripts tomorrow.Thanks.

DG1965 08-14-2022 08:08 AM

4 Attachment(s)
I've had a play with the scripts everyone sent through. I've attached 3 scripts screenshots of the histogram levels and colorYUV analyse. Also a screenshot of when I adjusted the levels, I'm not sure if I got the adjustment levels correct? When I capture more than these samples I will adjust the settings on my capture card.
Script 3 is the simple script I used. I kept it interlaced. I know I didn't need a script for just a crop however, I need to learn how to crop in virtualdub.
I added the CCD 1.7 in virtualdub at the default setting of 30 and I unchecked the multithreading box?
Any feedback would be appreciated. Thanks.

Hushpower 08-14-2022 09:37 AM

On-the-fly Proc Amp adjustments if you can't do it through Virtual Dub when running the tape:

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

You can use the VDub histogram to set the levels.

DG1965 08-14-2022 10:17 AM

Thanks Hushpower. I'm using a pinnacle 710 but I can't remember if I adjusted it whilst running the tape when I was practicing how to capture. I do remember adjusting it as per sanlyn's capture guide. Since then Avisynth has fuddled my head!

themaster1 08-14-2022 12:40 PM

Ccd or vdub filters work rather badly in Mt mode at least on my comp'. I always use 1 thread for them. On cdd default is too strong (i've tested extensively over the year. For retail tapes 5-15 is a safe bet

DG1965 08-14-2022 02:48 PM

Thanks. My tapes are video8 would you still use the 5-15 range? On the configure settings pop-up, threads 4 seems to be fixed at 4. Thanks.

themaster1 08-14-2022 04:01 PM

3 Attachment(s)
each tape is different but you can check with that piece of code at the end of your script:
Code:

U = UtoY()
V = VtoY()
StackVertical(U,V)
Histogram(mode="luma") #

below original vs ccd=10, vs ccd=30 (over processed)

lollo2 08-15-2022 04:07 AM

Quote:

Originally Posted by DG1965 (Post 86381)
I've had a play with the scripts everyone sent through. I've attached 3 scripts screenshots of the histogram levels and colorYUV analyse.

In addition to what others said, "script 1 no level ajustment" is bad because:

1- you crop the black borders with crop(8,6,-20,-10) and add them back with addborders(14,8,14,8); when executing later Histogram("Levels") and ColorYUV(Analyze=true) commands you are measuring the levels of the whole picture including the black borders

2- you should not execute at the same time the Histogram("Levels") analysis and ColorYUV(Analyze=true) analysis, because they interfere each other.
Do it in 2 separate scripts.

Inside "script 2 with ajusted levels" the parameters in the command levels(input_low, gamma, input_high, output_low, output_high) should be:

- input_low: the lowest significant level you measure with ColorYUV(Analyze=true). The low range of your Pinnacle 710 capture card is limited to 16, so generally it should be be 16. In the output of ColorYUV(Analyze=true) you read "0" for minimun Y level because the error in point 1-.

- input_high: the highest significant level you measure with ColorYUV(Analyze=true). It is 255 in the output of ColorYUV(Analyze=true) but no card can capture that high, so it is probably a false number because the error in point 2-. Generally this value is between 250/252 for your card.


All times are GMT -5. The time now is 02:41 AM

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