This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[HELP] How to run a simple script for Avisynth or Vapursynth?
#1
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?
# 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.
# 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!
Reply
#2
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.
Reply
#3
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!
Reply
#4
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
Reply
#5
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.


Attached Files
.pdf   python.pdf (Size: 793,11 KB / Downloads: 14)
Reply
#6
Interesting, thanks for the info.

Cu Selur
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)