Selur's Little Message Board

Full Version: How to run a simple script for Avisynth or Vapursynth?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Good afternoon, I have a simple script for removing noise in the frame with my parameters, how can I run it in the program, tell me please?
Code:
# Load the video clip
clip = AVISource("path/to/video.avi")

# Remove black and white dots
clip = RemoveDots(clip, thresh=3, chroma=false)

# Remove large white or black scratches
clip = Flicker(clip, 2, 0, thresh=100)

# Remove white or black flakes of damaged film
clip = Repair(clip, mode="spatial", chroma=false)

# Return the processed clip
return clip

There is also a script for Vapursynth.
Code:
# Load the video clip
clip = core.imwri.Read("path/to/video.avi")

# Convert the clip to a cartoon
clip = core.stf.Toon(clip)

# Remove black and white dots
clip = core.dfttest.DFTTest(clip, sigma=3, chroma=false)

# Remove large white or black scratches
clip = core.fl.Flicker(clip, 2, 0, thresh=100)

# Remove white or black flakes of damaged film
clip = core.repair.Repair(clip, mode="spatial", chroma=false)

# Return the processed clip
return clip

Thanks!
a. Hybrid comes with their own Avisynth and Vapoursynth versions.
b. Hybrid loads plugins directly and does not use autoloading.

You would need to adjust your script to explicitly load any needed dependencies.
Also with Vapoursynth mixing system-wide installed Vapoursynth and Hybrids Vapoursynth probably will cause issues. (since Vapoursynth has no option to disable autoloading; I requested this numerous times, but devs don't care about it)

Out of curiosity: got links for stf.Toon and fl.Flicker? First time I hear of these and vsdb.top doesn't list them either.

Cu Selur

Ps.: you can also use the Custom section in the Avisynth/Vapoursynth part of the GUI to add script addition to load&use your filters.
I tried to create a script via gpt3 chat. Apparently it came up with some modules that don't exist Smile 
Now it remains to make requests. so that it writes these modules. Smile In general, it works, but not always accurately and correctly.
In any case, he periodically gives good advice on optimizing scripts or code.
I'll try to adjust the Custom section script through this and look at the results.

Thanks!
Quote:I tried to create a script via gpt3 chat. Apparently it came up with some modules that don't exist Smile 
okay,...

Quote:In any case, he periodically gives good advice on optimizing scripts or code.
Got an example?

Cu Selur
This most often works for php, js, python. And maybe other common programming languages. Now long requests take off with an error. I can only attach an example for python.
I tried a custom script today, I don’t have time to finish and an error occurs. Apparently due to the heavy load, the answer was shortened.
It happens with several attempts it gives a different result, a lot depends on the request, how the task is formulated.
Interesting, thanks for the info.

Cu Selur