#61  
07-24-2022, 08:07 AM
DG1965 DG1965 is offline
Free Member
 
Join Date: Mar 2019
Location: Coventry England
Posts: 72
Thanked 4 Times in 4 Posts
Thanks lollo2. I will remove that line. I will let you know how I get on. Thanks.
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #62  
07-24-2022, 08:27 AM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 13,631
Thanked 2,458 Times in 2,090 Posts
Quote:
Originally Posted by lollo2 View Post
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.

You have skills, too. Just different than mine.

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,

- Did my advice help you? Then become a Premium Member and support this site.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
Reply With Quote
  #63  
07-24-2022, 09:35 AM
lollo2 lollo2 is offline
Free Member
 
Join Date: Mar 2013
Location: Italy
Posts: 673
Thanked 189 Times in 163 Posts
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
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
QTGMC error message, no function called? cbehr91 Restore, Filter, Improve Quality 4 09-27-2019 09:06 PM
VirtualDub CCD plugin error? stevevid Restore, Filter, Improve Quality 2 12-11-2018 10:46 PM
Fix 404 not found error message? M Berson Web Development, Design 4 08-02-2016 07:36 AM
JVC DR-M10S 'Disc Error' message? merchantord Video Hardware Repair 9 04-22-2016 11:01 PM
Constant error message pop-ups in Firefox? gracem General Discussion 5 02-11-2012 01:03 PM

Thread Tools



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