digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Restore, Filter, Improve Quality (https://www.digitalfaq.com/forum/video-restore/)
-   -   Perfect my Avisynth script? (https://www.digitalfaq.com/forum/video-restore/11084-perfect-avisynth-script.html)

geordie10 10-14-2020 06:45 AM

Perfect my Avisynth script?
 
3 Attachment(s)
Hi all

Long time follower, first time poster. I have learnt a lot from the editing wizards on here but I'd would kindly like some advice in perfecting my Avisynth script.

a. What I'm doing - Digitalising VHS tapes that had very limited release.

b. What I want to achieve - To restore those films in digital format in the highest quality possible whilst retaining as much detail as possible. These will be viewed on a computer.

c. My workflow - Sony HR-S5700AM SVHS Player >>SVIDEO>> Panasonic DMR-ES10 >>SVIDEO>> Diamond VC500 >> VirtualDub >> Lossless Avi (HuffYUV) >> Avisynth+ >> ffMpeg (x264)

d. What I'd like from DigitalFAQ Guru's - Please rejig my script and offer other filters etc to achieve my desired outcome.

The script I'm using is as follows.(I'm new to the Avisynth game so I appreciate it may be bad).
Code:

SetFilterMTMode("QTGMC", 2)
FFmpegSource2("sample.avi", atrack=1)
ConverttoYV12()
AssumeTFF()
QTGMC(Preset="Slower", Edithreads=15)
Crop(8, 0, -8, -8)
Sharpen(0.5)
TemporalDegrain2(2)
RemoveGrain(2)
Spline64Resize(720,540)
ColorYUV(gain_y=35, off_y=-35, cont_u=30, cont_v=120)
Normalize(1.00)
Trim(1150,196090)
Prefetch(threads=15)

Please see attached Raw file and Edited file.

Thank you greatly for any advice.

lordsmurf 10-19-2020 06:24 AM

The video isn't bad. But it does need work.

Right now, "edited" is a tad dark, halo from bad sharpening, and too smooth/plastic (no grain, no reality, more like a toon that real life). It's mostly a matter of easing back on the filters. Novice users tend to be heavy handed.

This isn't helping:
Code:

Sharpen(0.5)
There are other/better to sharpen. For example, LSFmod at a low value.

Do not use Slower. It softens. Use Faster. If still too many jaggy/alias, then do Medium. No more.
Code:

QTGMC(Preset="Slower", Edithreads=15)
Code:

TemporalDegrain2(2)
RemoveGrain(2)

Why both? Be careful, low values, otherwise it's plastic people and objects.

The video is too dark, crushed blacks. The raw/pre-"edited" wasn't crushed.

Much of what you did was the right idea. Just ease back a bit, try again, post again. :)

geordie10 10-20-2020 05:23 AM

1 Attachment(s)
Lordsmurf, thank you for the reply. It's great to have someone of your experience comment so thank you.

I've gone ahead and made some of the changes as suggested and as you see from the script below. However, I have retained 'slower' in QTGMC as changing it somehow messed with the frames and some bad frames I removed showed up again. I also completely removed the grain/noise removal filters. I agree that it takes the details away and turned it more into a Picasso painting.

Is there a level of grain removal you recommend for this video?

This video was an amateur production so the colours naturally are a bit off. Particularly trying to get a nice solid black and not making the video overly dark.

I have attached another sample. Any further advice is greatly appreciated. Thank you.

lordsmurf 10-20-2020 05:51 AM

Busy, but glad to quickly help. :)

What exactly was "messed with" with non-Slower? Examples needed.

Some NR is good, but never be heavy handed. It's not binary, all or none.

Still a lot of ringing, oversharpening. If not script, must be VCR? Check settings,
Or capture card? Check settings.

You attached MKV. MediaInfo shows H264. I think that sample is maybe skewed from lossless. Lot of smushing of color, detail -- bitrate low? Maybe color cooking, 4:2:0 defaults, and not 4:2:2. I'm also getting corruption on decode, what are the encode settings? Long GOP?

This attempt does seem better, maybe. Hard to tell, not identical footage to last upload sample.

This isn't bad video. But it can be tweaked better. For any pro usage, documentary or otherwise, it needs work. For home use, share with friends/family on Youtube, it's a really good attempt. Far better than average. (Sadly, it can even shame some slipshod pro work.)

FFMPEGSource() aka ffms2() can cause load errors, weirdness in frames. That could also be it. I generally prefer to just extract clips out to lossless in VirtualDub2. Then AVISource() those.

You're on the right path. And probably close to calling it good. Just a few more tweaks.
- Halos/ringing is bad.
- Detail loss shouldn't be that harsh still. (preset=Slower) NR may be to blame, it's just too aggressive.
- Colors are still over-contrasty (hot highlights, dark darks, fake rich colors).

Still a bit heavy handed on filtering. Maybe not in Avisynth anymore, but ffmpeg encode or hardware (or both).

geordie10 10-23-2020 06:05 AM

Lordsmurf, thanks again for your reply and insight. I'll take what you have said on board. Good to hear I am on the right track however.

I think the ringing and oversharpening may be the VCR. Finding a quality SVHS player where I live is rare or very expensive. Probably costs more than my small project requires.

Thanks for the insight!

lordsmurf 10-23-2020 06:09 AM

Remember:
- there are deringing/dehalo filters in Avisynth
- QTGMC preset=slower has NR, and some of the NR can affect ringing/halos (make worse)

hodgey 10-23-2020 07:46 AM

I presume it's a JVC HR-S5700AM, not Sony? The newer JVCs are like the least sharpening VCRs out there, the higher-end models like 7700 etc have TBC/DNR, but otherwise share the same video ICs so I wouldn't think the VCR would be causing any extra sharpening unless you were to use the sharp picture mode. It is a decent VCR. If it's an edited video, the haloing may just be part of what's on the tape from dubbing etc. Some haloing/ringing is an inherent limitation of VHS being low bandwidth as well, but other things can make it more excessive.

The VC500 has a sharpness setting if you are using newer drivers, I don't think it's set very high by default, but you could try to turn it down to 0 and see if it helps. I think 0 is the "neutral" setting rather than blurring.

S1RIUS 10-23-2020 10:31 AM

Both Fast / Slower have NR.

But Both dont apply additionnal Noise process like dfttest or fft3dfilter (because NoiseProcess is 0 by default)

The only thing that change is TR2 value.

After testing I feel that using "Fast" and play with TR2 value is better, less blurry but still doing a bit of NR (and faster obviously)


All times are GMT -5. The time now is 04:10 AM

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