Log in

View Full Version : Creating an AviSynth Video Enhancement Script


Pages : 1 2 [3] 4 5

ingoldie
4th February 2024, 14:44
strength=Default(strength) radius=Default(radius) threshold=Default(threshold) Chroma=default(Chroma,false)

By the way, I've been looking for a software that produce visually enhanced video result, on the other hand, I am trying to create it for years.

I can't understand why this is so difficult. I'm not expecting a miracle anyway.

What is the most realistic/natural visually enhanced video result produced by a software you have ever seen?

Can you provide a before/after example?

StainlessS
4th February 2024, 23:27
Default has to have a default value, eg "SomeArguementName = Default(SomeArguementName,Default_Value)"
http://avisynth.nl/index.php/Internal_functions#Default

Default

Default(x, d)
Returns x if Defined(x) is true, d otherwise. x must either be a function's argument or an already declared script variable (ie a variable which has been assigned a value) else an error will occur.

Examples:

function myfunc(clip c, ..., int "strength") {
...
strength = Default(strength, 4) # if not supplied make it 4
...
}

ingoldie
5th February 2024, 12:06
I don't think my problem is related to this.

When I use AviSynthPlus-MT-r2772-with-vc_redist I'm NOT getting "invalid arguments to function 'Default'" error with the filter I use.

I did what you said but it didn't work anyway.

StainlessS
5th February 2024, 16:03
When I use AviSynthPlus-MT-r2772-with-vc_redist and AvsPmod_205 I'm getting "unexpected charecter "["" error with TemporalDegrain-v2.6.7

When I use AviSynthPlus_3.7.3_20230715_vcredist and AvsPmod_v2.7.6.2_.Windows_x86-32 I'm getting "invalid arguments to function 'Default'" error with a filter I use.


When I use AviSynthPlus-MT-r2772-with-vc_redist I'm NOT getting "invalid arguments to function 'Default'" error with the filter I use.
No, but you are getting "unexpected charecter "["" error with TemporalDegrain-v2.6.7
TemporalDegrain-v2.6.7 must use arrays, cannot be used with AviSynthPlus-MT-r2772, as already stated, you should use AviSynthPlus_3.7.3.

When I use AviSynthPlus-MT-r2772-with-vc_redist I'm NOT getting "invalid arguments to function 'Default'" error with the filter I use.
Thats because (I presume) you are still getting the error, "unexpected charecter "["" error with TemporalDegrain-v2.6.7
Avisynth will halt on the first error it encounters, only when you switch to the required AviSynthPlus_3.7.3, will you get the "invalid arguments to function 'Default'" error.

ingoldie
5th February 2024, 16:07
I'm getting the same error on AviSynthPlus_3.7.3_20230715_vcredist when I don't use TemporalDegrain-v2.6.7
This situation is not related to TemporalDegrain-v2.6.7.

kedautinh12
5th February 2024, 16:09
I'm getting the same error when I don't use TemporalDegrain-v2.6.7

Cause recently ver need avs+ 0.7.3 to work and your error from you don't use avs+ 0.7.3 ver

ingoldie
5th February 2024, 16:36
@StainlessS I can't send message to you. Can you clear some space?

StainlessS
5th February 2024, 16:57
No, post in forum, thats what its for. [EDIT: I've told you before multiple times that I dont like you harassing me by PM]

EDIT: Post the script function containing the Default problems. [The entire script function, or at least the first 6 or so lines.].

EDIT: strength=Default(strength) radius=Default(radius) threshold=Default(threshold) Chroma=default(Chroma,false)

strength=Default(strength) # No default value for strength, ie maybe something like, "strength=Default(strength,1)"
radius=Default(radius) # No default value for radius, ie maybe something like, "radius=Default(radius,1)"
threshold=Default(threshold) # No default value for threshold, ie maybe something like, "threshold=Default(threshold,1)"
Chroma=default(Chroma,false) # OK, default value false is supplied

I dont know what default values or types (ie int or float) you want, its your script, so 1's are just example int defaults.

StainlessS
6th February 2024, 17:20
Function Fn1(clip c,int "strength",int "radius",int "threshold",Bool "chroma") { # with 3 optional int args and 1 optional bool arg
/*
ALL optional args MUST be defaulted SOMEWHERE.
Below example calls some other function that also has arg Y, ie Fn2(Y) # Y of whatever type, whatever optional/non optional.
For each Optional argument X of Fn1("X"),
If (
(X used in calculations within this function) ||
(X used as argument to Fn2(Y) where Y is not optional) ||
(X used as argument to Fn2(Y) where Y is optional BUT you want a different default other than Fn2(Y) default)
)
THEN
X Must be defaulted within this function as eg "strength=Default(strength,1)"
ELSE
Can just not bother with Default(X,???) at all, and just call Fn2(X), where optional Fn2(Y) will be defaulted within Fn2().
ENDIF
*/
strength=Default(strength,1)
radius=Default(radius,2)
# threshold=Default(threshold,3) # DUMMY TEST DONT SET OUR DEFAULT, use Fn2 default
Chroma=default(Chroma,false)
return Fn2(c,strength,radius,threshold,chroma) # threshold is Undefined [ie not defaulted in Fn1()], will be defaulted as Fn2(arg3) default
}

Function Fn2(clip c, int "arg1", int "arg2", int "arg3", Bool "arg4") { # test func supplying its own defaults for optional args
c # not really used
# Set args to your defaults if not suppied by calling function
arg1=Default(arg1,10)
arg2=Default(arg2,20)
arg3=Default(arg3,30)
arg4=default(arg4,true)
return (arg1 + arg2 + arg3) + ((arg4) ? 1000 : 0) # daft dummy function, just demo
}


BlankClip

Z = Fn1() # All default, SOMEWHERE. Strength default 1, Radius Default 2, Fn2(arg3) defaults 30

Subtitle(String(Z)) # Shows 33

ingoldie
8th February 2024, 12:32
EDIT:

strength=Default(strength) # No default value for strength, ie maybe something like, "strength=Default(strength,1)"
radius=Default(radius) # No default value for radius, ie maybe something like, "radius=Default(radius,1)"
threshold=Default(threshold) # No default value for threshold, ie maybe something like, "threshold=Default(threshold,1)"
Chroma=default(Chroma,false) # OK, default value false is supplied

I dont know what default values or types (ie int or float) you want, its your script, so 1's are just example int defaults.

Not working. I'm getting the following error.

https://i.ibb.co/k9PtT9Q/A.png (https://ibb.co/BrY9Jrq)

I can't understand why filter I use is working with AviSynthPlus-MT-r2772-with-vc_redist but NOT working with AviSynthPlus_3.7.3_20230715_vcredist

kedautinh12
8th February 2024, 13:07
Your error from 3.7.3_20230715 was fixed by Pinterf from beta buide, why you don't use beta build from Pinterf, only use 3.7.3_20230715 and report error constant
https://forum.doom9.org/showthread.php?p=1996799#post1996799

gispos
8th February 2024, 18:43
@ingoldie, the forum and Avisynth lives through the users and developers who share their work and thoughts with others.

StainlessS tried to help you and asked for your script or at least a part of it.
You are using AvsPmod, which is freely available to you including source code.

And you are making a fuss about your script which is most probably just the result of other thinkers who wrote all these functions you are using.

Do you know the proverbs:
It is more blessed to give than to receive. One hand washes the other.

But all you want to do is take. I'm surprised that anyone is still willing to help you.
Give this some thought...

And to your question about visual quality improvement.
With Topaz Video AI in combination with Avisynth filters you can sometimes achieve very good results. Don't ask for an example, do it yourself.

Selur
8th February 2024, 21:17
Here are the original parts of the full progressive video.

Sample

https://www.mediafire.com/file/4n4hfa32m3f2x5h/Sample.avi/file

Sample 2

https://www.mediafire.com/file/lj4ga7pja7vkqd4/Sample_2.avi/file
https://www.mediafire.com/file/o1iwanc4duxstrn/Sample.mp4/file
https://www.mediafire.com/file/tkkcc05rznskb0x/Sample_2.mp4/file

johnmeyer
8th February 2024, 21:43
@ingoldie, the forum and Avisynth lives through the users and developers who share their work and thoughts with others.

StainlessS tried to help you and asked for your script or at least a part of it.
You are using AvsPmod, which is freely available to you including source code.

And you are making a fuss about your script which is most probably just the result of other thinkers who wrote all these functions you are using.

Do you know the proverbs:
It is more blessed to give than to receive. One hand washes the other.

But all you want to do is take. I'm surprised that anyone is still willing to help you.
Give this some thought...

And to your question about visual quality improvement.
With Topaz Video AI in combination with Avisynth filters you can sometimes achieve very good results. Don't ask for an example, do it yourself.This has been going on since July 2017. It is the same question; it is the same clip; it is the same refusal to provide the script.

I agree with everything you said: this is, and always has been, a waste of our collective time.

ingoldie
10th February 2024, 11:40
With Topaz Video AI in combination with Avisynth filters you can sometimes achieve very good results.

Can you provide a source clip and upscaled Topaz Video AI result to prove your claim?

To see negative comments about Topaz Video AI

https://forum.doom9.org/showthread.php?p=1949626#post1949626

https://forum.videohelp.com/threads/399360-so-where-s-all-the-Topaz-Video-Enhance-AI-discussion#post2599749

https://www.mediafire.com/file/o1iwanc4duxstrn/Sample.mp4/file
https://www.mediafire.com/file/tkkcc05rznskb0x/Sample_2.mp4/file

Results don't look natural/realistic, look soooooooooo artificial.

ingoldie
10th February 2024, 12:30
Originals/Final Results

Original(512x384)
https://mediafire.com/file/ldfiyrscrrv85gz/Original1.avi/file

Result(1024x768)
https://mediafire.com/file/o8py80dvmvefe50/Result20.avi/file

Original2(512x384)
https://mediafire.com/file/24uvlc89yzx6atx/Original2.avi/file

Result2(1024x768)
https://mediafire.com/file/kj713jqysd9tm6i/Result21.avi/file



By the way, I still don't know exactly what you think about the results of my AviSynth script.

For example, if I give you the script, will you use it to enhance your videos? Do you think it is worth to use?

How would you rate the results of my AviSynth script?


Also how can I not see good results about video enhancement from AviSynth experts like you all? I'm really disappointed.

https://www.mediafire.com/file/o1iwanc4duxstrn/Sample.mp4/file
https://www.mediafire.com/file/tkkcc05rznskb0x/Sample_2.mp4/file

Results don't look natural/realistic, look soooooooooo artificial.

Selur
10th February 2024, 13:53
Results don't look natural/realistic, look soooooooooo artificial.
Didn't expext them to look natural/realistic. Thats something one would use in a filter chain with masking etc.
(just light sharpen + deblock: https://www.mediafire.com/file/4wi5nirf7mvjk0f/sharpen_deblock.mp4/file)
Also how can I not see good results about video enhancement from AviSynth experts like you all? I'm really disappointed.
nobody cares enought to spend time on it.
Also it's not really clear:
a. what you are aiming for
b. what you have tried
c. what your level of understanding Avisynth is
if you want folks to spend time on this and you are not willing to give proper feedback etc. folks stop caring

To do this seriously, you would segement the images and apply filters maskes.
Problem: that requires work :) Looking at the results and effort you have shown so far, you should have better spend some money on Neat Video or similar.

Cu Selur

ingoldie
10th February 2024, 14:40
(just light sharpen + deblock: https://www.mediafire.com/file/4wi5nirf7mvjk0f/sharpen_deblock.mp4/file)

There is a loss of detail but it's still not bad. Can you provide what you used?

ingoldie
10th February 2024, 15:55
As you can see from the link below, the only obvious problem with my results is noising.

https://forum.doom9.org/showthread.php?p=1989500#post1989500

I use DegrainDenoiseSharpen created by me about denoising but I have a problem with its potency (mentioned in the description)

https://forum.doom9.org/showthread.php?p=1991080#post1991080

If I can fix this problem I can get a very good result about denoising.

But I need help.

Selur
10th February 2024, 17:51
The parameters have been explained. Have you tried MCDegrainSharp (https://forum.doom9.org/showthread.php?p=1926403#post1926403) instead?
Also lowering the strength and applying the filter multiple times might also help to lessen the denoising.
(https://imgsli.com/MjM5MTQy, https://imgsli.com/MjM5MTQ2/0/3)

ingoldie
11th February 2024, 10:43
Doesn't look natural/realistic, again it looks soooo artificial.

Selur
11th February 2024, 19:11
then lower the sharpening,... (also you did realize that there are multiple upscaled versions in the second link right? I don't think NNEDI3s upscale looks artifical,..)

ingoldie
12th February 2024, 13:59
then lower the sharpening,... (also you did realize that there are multiple upscaled versions in the second link right? I don't think NNEDI3s upscale looks artifical,..)

Artificiality does not come from sharpening. It comes from denoising. NNEDI3s upscale also looks absolutely artificial.

Selur
12th February 2024, 15:30
Okay, if it's just the upscaling, then simply use the upscaler you like and which for you does not look artifical.

ingoldie
30th April 2024, 14:18
The problems with the code I wrote are not ending.

When I use AviSynthPlus-MT-r2772-with-vc_redist and AvsPmod_205 I'm getting "unexpected charecter "["" error with TemporalDegrain-v2.6.7

When I use AviSynthPlus_3.7.3_20230715_vcredist and AvsPmod_v2.7.6.2_.Windows_x86-32 I'm getting "invalid arguments to function 'Default'" error with a filter I use.

Can you please help?

None of the replies worked. Please a solution!

COMPLETELY

When I use AviSynthPlus_3.7.3_20230715_vcredist and AvsPmod_v2.7.6.2_.Windows_x86-32 I'm NOT getting "unexpected charecter "["" error with TemporalDegrain-v2.6.7

and when I use AviSynthPlus-MT-r2772-with-vc_redist I'm NOT getting "invalid arguments to function 'Default'" error with a filter I use.


But when I use AviSynthPlus-MT-r2772-with-vc_redist and AvsPmod_205 I'm getting "unexpected charecter "["" error with TemporalDegrain-v2.6.7

and when I use AviSynthPlus_3.7.3_20230715_vcredist and AvsPmod_v2.7.6.2_.Windows_x86-32 I'm getting "invalid arguments to function 'Default'" error with a filter I use.

An AviSynthPlus version that can eliminate both problems?

DTL
30th April 2024, 17:11
Better try with latest AVS+ 3.7.3 builds and also post the question to the thread of this script - https://forum.doom9.org/showthread.php?t=175798&page=16

I do not see empty arguments in Default() calls but it uses Select () ? and may be something is broken in latest AVS+ builds and it is subject to report to developers. Post error message about line of script where error with Default() raised.

ingoldie
19th June 2025, 15:07
Originals/Final Results

Results are now better about not loosing detail and causing deformaties.
I'm also getting much better results about denoising on other videos but i can't get it on these videos.
I don't know why?

By the way, i have changed only denoising part of my AviSynth script.

I don't think the results are good enough but better.

Original(512x384)

https://www.mediafire.com/file/pnwl9qpq32b4pqz/Original_Sample.avi/file

Result(1024x768)

https://www.mediafire.com/file/1c7rlj3wofmztgm/Result23.avi/file


Original2(512x384)

https://www.mediafire.com/file/4as22g8dfb6z973/Original_Sample_2.avi/file

Result2(1024x768)

https://www.mediafire.com/file/k7ek074ca8p6q6d/Result24.avi/file


Original3(512x384)

https://www.mediafire.com/file/t04qr21vnfufkg6/Original_Sample_3.avi/file

Result3(1024x768)

https://www.mediafire.com/file/g2otk13lj6digke/Result25.avi/file


Previous Results

https://forum.doom9.org/showthread.php?p=1989500#post1989500

ingoldie
19th June 2025, 17:29
I don't think the results are good enough but better.

Can you send your own efforts about sharpening,denoising and upscaling to see a better result that i need? Especially about denoising.

ingoldie
20th June 2025, 15:58
Results are now better about not loosing detail and causing deformaties.
I'm also getting much better results about denoising on other videos but i can't get it on these videos.
I don't know why?

Denosing is also better now.

Original(512x384)

https://www.mediafire.com/file/pnwl9qpq32b4pqz/Original_Sample.avi/file

Result(1024x768)

https://www.mediafire.com/file/zay6ctt9twklq2j/Result26.avi/file

Original2(512x384)

https://www.mediafire.com/file/4as22g8dfb6z973/Original_Sample_2.avi/file

Result2(1024x768)

https://www.mediafire.com/file/ei9fcvs4wxo0wg3/Result27.avi/file

Original3(512x384)

https://www.mediafire.com/file/t04qr21vnfufkg6/Original_Sample_3.avi/file

Result3(1024x768)

https://www.mediafire.com/file/gsio6gytrd26kuo/Result28.avi/file

Selur
20th June 2025, 19:53
Since in this thread it's just about posting clips without explanation: DetailBooster (https://www.mediafire.com/file/n49zsug7lmyk37q/Detailbooster.mp4/file)

wonkey_monkey
20th June 2025, 22:10
Wait... where are you getting "originals" that are 512x384?

Are these clips all from Moonlighting?

ingoldie
21st June 2025, 11:03
Wait... where are you getting "originals" that are 512x384?

Are these clips all from Moonlighting?

Yeah.

ingoldie
21st June 2025, 14:25
Another Sample

I have found the following clip on forum.doom9 but i don't remember the page.

What do you think about the result?

Original(640x480)

https://www.mediafire.com/file/sagqbubunzf6x24/huffyuv.avi/file


Result(1280x960)

https://www.mediafire.com/file/v8amwqtqn6sru0k/Result29.avi/file

VoodooFX
22nd June 2025, 11:01
Since in this thread it's just about posting clips without explanation: DetailBooster (https://www.mediafire.com/file/n49zsug7lmyk37q/Detailbooster.mp4/file)

You need to talk to yourself AKA quote some of your own old post, so, your post is invalid. :)

Selur
22nd June 2025, 12:19
¯\_(ヅ)_/¯
I just end up in this thread, every few months, since the title sounds like an actual script gets developed and shared.

VideoMilk78
22nd June 2025, 20:40
Also how can I not see good results about video enhancement from AviSynth experts like you all? I'm really disappointed.

I don't even have anything to contribute but the ignorance/disrespect ingoldie displays in this thread is insufferable...

wonkey_monkey
22nd June 2025, 20:48
Yeah.

And where did you get theese 512x384 "originals"?

ingoldie
26th June 2025, 11:54
And where did you get theese 512x384 "originals"?

It was many years ago. Now the link is broken.

real.finder
26th June 2025, 11:58
And where did you get theese 512x384 "originals"?

It was many years ago. Now the link is broken.

rule 6 (https://forum.doom9.org/forum-rules.htm)?

wonkey_monkey
26th June 2025, 14:40
rule 6 (https://forum.doom9.org/forum-rules.htm)?

Sounds like it to me.

Should just buy the DVDs anyway and start from 720x480.

ingoldie
26th June 2025, 16:49
I don't even have anything to contribute but the ignorance/disrespect ingoldie displays in this thread is insufferable...

I have not said there aren't good results about video enhancement. I have said I can not see good results about video enhancement.

Can you please show me a sample of good result about video enhancement?

ingoldie
9th July 2025, 14:40
Better denoising and dehaloing

Original(512x384)

https://www.mediafire.com/file/pnwl9qpq32b4pqz/Original_Sample.avi/file

Result(1024x768)

https://www.mediafire.com/file/ndl7ga8iqmktvhr/Result30.avi/file


Original2(512x384)

https://www.mediafire.com/file/4as22g8dfb6z973/Original_Sample_2.avi/file

Result2(1024x768)

https://www.mediafire.com/file/3l2hc7qvscwpugs/Result31.avi/file


Original3(512x384)

https://www.mediafire.com/file/t04qr21vnfufkg6/Original_Sample_3.avi/file

Result3(1024x768)

https://www.mediafire.com/file/9nj5vkpcosav3ph/Result32.avi/file

johnmeyer
9th July 2025, 16:36
OMG, this is the same video you've been posting for almost seven years.

The Result30 definitely looks better than the original.

ingoldie
23rd July 2025, 16:51
I can give the scripts but I need financial support.
This way we can make the scripts better.
Please help!

tebasuna51
24th July 2025, 08:58
Is there any AviSynth equivalent of the Super-Resolution technique in Adobe Photoshop shown in the video below? ...

Since 2017, as far as I can recall, he has been requesting technical and monetary assistance, refusing to share the scripts he uses for his testing.

His posts have been repeatedly reported for violating rule 6 and attempting to obtain monetary benefit by using our forum without providing anything in return.

I remind users that the vice of asking is countered by the virtue of not giving, both for the help he requests, at least sincerely, and for the scripts he uses.

I'm not closing this thread for the moment, but I recommend that users not help him in the hope that he will one day share his methods.

ingoldie
24th July 2025, 15:39
I will definitely share the scripts in return for financial support, but I don't know how to prove it.
Why I want financial support? Because I want to devote all my time to this job instead of working in another job.
To achieve a better result.
By the way, an invention that makes money for its inventor is more respected.

Selur
24th July 2025, 18:11
So not looking for a bit, but quite a lot of money you are looking for,... good luck

johnmeyer
24th July 2025, 18:19
Gee, I didn't know I could get money for all the scripts I've posted. What a great idea! Please send money to:

John Meyer Retirement Fund
123 Main St.
USA

videoFred
25th July 2025, 15:38
Haha good idea John! ;)

johnmeyer
25th July 2025, 16:28
Haha good idea John! ;)You, my friend, would make a fortune!!