digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Restore, Filter, Improve Quality (https://www.digitalfaq.com/forum/video-restore/)
-   -   Avisynth plugin VirtualDub error message? (https://www.digitalfaq.com/forum/video-restore/12856-avisynth-plugin-virtualdub.html)

DG1965 07-24-2022 08:07 AM

Thanks lollo2. I will remove that line. I will let you know how I get on. Thanks.

lordsmurf 07-24-2022 08:27 AM

Quote:

Originally Posted by lollo2 (Post 86102)
I understand and accept that you are not an expert of AviSynth in general and AviSynth scripts in particular

That's not really accurate. The issue is as I stated: it's somewhat backwards. Sometimes even the call/run is before the variable declare, which is much further down the script, but the encapsulated "whole run" nature of the script, vs. a line-by-line, allows it. It can be hard to follow along. I had to get help with trying to un-octopus johnmeyer's excellent script (which was based on videofred's), because it wasn't in logical order of operations, and jumped all over the place. I almost got the impression that john himself didn't know how to un-octopus it, and somebody else helped me with that.

Quote:

but that style is direct and easy to understand and to follow.
Not really. It probably takes lots of practice writing in that style to understand it. Other languages are really no different, such as CSS. There is a logical order flow method, and a non-order method (that follows other logics). It's often preference, but sometimes due to need. So I understand why it's done, I just hate it for basic scripts. It's hard not just for newbies, but even those of us with experience.

Quote:

and it's strange that you dislike the specific DLLs loading approach, because you experienced the probems it causes when a generic
autoload is performed: https://forum.videohelp.com/threads/...ns#post2595004.
That's not what I wrote. Read it again. That was a roundabout case of conflicts with no clear solution. It wasn't a mere DLL loading scenario. Part of the problem was the documentation sucked, so Google and guessing was needed. And the dev of a filter was an a-hole, no surprise there either. As I wrote, excellent video tool, maybe the best, but the loose open-source nature has warts.

Quote:

Better to follow jagabo and johnmeyer suggestions!
In general, definitely. I'm good, they're better. No issue admitting that. :2cents:

You have skills, too. Just different than mine. :salute:

DG1965 here is mostly just copying and pasting scripts, and I doubt he's going to pick up the coding easily, to be somewhat self reliant. Perhaps we, you and I, or even just you, should write a guide here, showing both methods. Simple stuff like crop, etc. Then it's help cut-and-paste newbies actually lean the scripting fundamentals. Most documentation is chronological, not encapsulated with variables,

lollo2 07-24-2022 09:35 AM

Quote:

I had to get help with trying to un-octopus johnmeyer's excellent script (which was based on videofred's), because it wasn't in logical order of operations,
johnmeyer did only cosmetic changes to videofred script, which was and is confusing, bringing some improvement, but nox fixing everything in term of readability.
If you look to the scripts suggested to DG1965 as starting point, they are straightforward, from A to B in seguence, every step at the right place in time, generating a dedicated "output"

Quote:

Not really. It probably takes lots of practice writing in that style to understand it.
It only adds an "output" at each step. For example, the filter sequence
Code:

### 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()

### convert to YV12
denoised_yv12=denoised.convertToYV12()

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

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

### add borders
video_restored=sharpened.addborders(crop_left,crop_top,crop_right,crop_bottom)

return(video_restored)

can be replaced by
Code:

AssumeTFF()

QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, tr1=2, tr2=1, NoiseTR=2, sharpness=0.1)

convertToYV16()

TemporalDegrain2(degrainTR=3)

convertToYUY2()

denoised=last

convertToYV12()

LSFmod(defaults="slow")

MergeChroma(denoised)

addborders(crop_left,crop_top,crop_right,crop_bottom)

where an intermediate output must be created for MergeChroma operation. In this specific case is easy, but when you need to filter using several previous intermediate results can be difficult and source of errors, in particular when dealing with mask generations and operations like Overlay()

Quote:

That's not what I wrote. Read it again. That was a roundabout case of conflicts with no clear solution. It wasn't a mere DLL loading scenario.
Yes, it was. If you load the DLLs with their dependency in each script without any "autoload" feature your problem is fixed:
My project needs FilterX, which I've never used.
But FilterX needs DLL1 to be updated
Updating DLL1 breaks FilterY, so FilterY needs update.
But FilterZ has no update, and to use it, must store old DLL1 (henceforth DLL2) elsewhere, call it separate.
To use both Y+Z together in same script, even more scripting-fu skills are needed to juggle DLL1+DLL2.


Quote:

Part of the problem was the documentation sucked, so Google and guessing was needed. And the dev of a filter was an a-hole, no surprise there either. As I wrote, excellent video tool, maybe the best, but the loose open-source nature has warts.
We all agree on that ;)

Quote:

Perhaps we, you and I, or even just you, should write a guide here, showing both methods. Simple stuff like crop, etc. Then it's help cut-and-paste newbies actually lean the scripting fundamentals.
An example is just above. Writing a complete guide for AviSynth is a big task, and in this forum there are several posts from sanlyn very helpful to start. I will try to write one more small guide based on DG1965's video in the near future


All times are GMT -5. The time now is 12:48 AM

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