Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th September 2009, 10:42   #21  |  Link
leon1789
Registered User
 
leon1789's Avatar
 
Join Date: Sep 2009
Location: Poitiers (Fr)
Posts: 77
Quote:
Originally Posted by Gavino View Post
Taking another look at this, I can suggest a couple of minor coding changes (optional, the existing code 'works'):
Code:
function Diff(clip vid, clip v1, clip v2, string color)
...
  b = Eval("BlankClip(vid, color=" + color + ")")
Why not make color an int, and call BlankClip directly, without Eval?
You can pass $0000FF, etc, directly to the function as valid int literals.
Absolutely, you're right! (changed in next version 6.8 )

Quote:
Originally Posted by Gavino View Post
Code:
  Masq = Video.ScriptClip(""" WriteFile("EstimSoftSharpen.txt", \
                          Round(13+Net/6).string, append=false) """)
You don't need to put WriteFile inside ScriptClip, as it is itself already a 'run-time' filter. You could just write:
Code:
  Masq = Video.WriteFile("EstimSoftSharpen.txt", \
                         "Round(13+Net/6)", append=false)
That's true, but with your small code, "append=false" writes in the txt file like "append=true" (? I don't understand why!)

Thank you for your tenders

Last edited by leon1789; 15th September 2009 at 10:45.
leon1789 is offline   Reply With Quote
Old 15th September 2009, 10:51   #22  |  Link
buzzqw
HDConvertToX author
 
Join Date: Nov 2003
Location: Cesena,Italy
Posts: 6,552
Quote:
Originally Posted by leon1789 View Post
No problem: include the filter

For preset, I suggest SoftSharpen(preset="film") and SoftSharpen(preset="light"),
because spatial denoising is strong with SoftSharpen().
thanks a lot

i am now testing your filter with some very clean but fast scene (from quantum of solace)

from my first test seems that shotsharpen() , without preset will rise the bitrate by a little (2%(

i will test light and film too, and then with very noise source (first alien movie)

BHH
__________________
HDConvertToX: your tool for BD backup
MultiX264: The quick gui for x264
AutoMen: The Mencoder GUI
AutoWebM: supporting WebM/VP8
buzzqw is offline   Reply With Quote
Old 15th September 2009, 13:23   #23  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by leon1789 View Post
That's true, but with your small code, "append=false" writes in the txt file like "append=true" (? I don't understand why!)
Yes, you're right. The reason is quite subtle.

WriteFile(..., append=false) overwrites any existing file, but data is written for each rendered frame. Normally, that is what one wants.

With ScriptClip("""WriteFile(..., append=false)"""), a separate instance of WriteFile is created for every frame, each one overwriting the data written by previous one. Normally, that would be undesirable, but in your case, you only want to see the final value, so it works.
Gavino is offline   Reply With Quote
Old 15th September 2009, 17:39   #24  |  Link
leon1789
Registered User
 
leon1789's Avatar
 
Join Date: Sep 2009
Location: Poitiers (Fr)
Posts: 77
@Gavino
Ok. What a pity
leon1789 is offline   Reply With Quote
Old 15th September 2009, 18:45   #25  |  Link
BigDid
Actually in reserve
 
Join Date: Oct 2004
Posts: 1,605
Quote:
Originally Posted by buzzqw View Post
...
from my first test seems that softsharpen() , without preset will rise the bitrate by a little (2%(
Hi buzz,

You can rise blur up to 24 (more blurring) and/or lower mouv to 30 (more motion detected) to rise overall compressability.
Quote:
i will test light and film too, and then with very noise source (first alien movie)
BHH
That was kind of a joke (post above) but in fact I retried to use partially softsharpen on startrek5 with a Mdegrain2 and a thsad=800 in the script before using softsharpen for sharping, depan and dering. Not finalized atm...

For Startrek1, beside the awful colors, I had good results with a MCTemporalDenoise(settings="low")

Did

Edit: the params for softsharpen() without presets are given in a previous post: http://forum.doom9.org/showthread.ph...91#post1323291
For "film" it is blur=15 sharp=18 derin=4 move=41 denois=5 denoisT=8
For "light it is blur=12 sharp=13 derin=3 move=35 denois=2 denoisT=5
We exchanged a lot Leon and I to tune the preset light aimed for a xvid encode with Vaq, sharp resize and sharp matrix.
__________________
Having a problem with AutoGK? Read & use the FAQ & MORE FAQ first
Want to exchange on AutoGK? try doom10.org
In reserve (inactive) for an undefined period of time.

Last edited by BigDid; 15th September 2009 at 21:02.
BigDid is offline   Reply With Quote
Old 15th September 2009, 19:44   #26  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by leon1789 View Post
What a pity
Ah, the joys of Avisynth's run-time filters...
They can often lead to surprising results, which is why I developed GRunT.

But here I think it is reasonable that WriteFile(append=false) still writes data for all frames, overwriting the original file contents. Otherwise there is no way to do that, and that is what is normally wanted.

You have discovered a useful 'trick' to get the effect you want, which is much less commonly needed.
Gavino is offline   Reply With Quote
Old 17th September 2009, 08:56   #27  |  Link
leon1789
Registered User
 
leon1789's Avatar
 
Join Date: Sep 2009
Location: Poitiers (Fr)
Posts: 77
Version 6.8.

Faster debanding
Less constraint on the resolution: (before) version 6.7 needs mod16, (now) version 6.8 needs mod4
Optimised sharpening process
Some other corrections : better code (see Gavino) for instance.

Last edited by leon1789; 17th September 2009 at 08:58.
leon1789 is offline   Reply With Quote
Old 19th September 2009, 14:05   #28  |  Link
leon1789
Registered User
 
leon1789's Avatar
 
Join Date: Sep 2009
Location: Poitiers (Fr)
Posts: 77
version 6.9

-- Fixed a bug when "Sharp=0" in version 6.8

-- Experimental antialiasing ("AA" parameter), not perfect at all, but very fast :
Source http://img17.imageshack.us/i/sourcep.png/
Source.SoftSharpen(preset="anim",net=40) http://img17.imageshack.us/i/softsharpen1.png/
Source.SoftSharpen(preset="anim",net=40,AA=12) http://img21.imageshack.us/i/softsharpen2.png/

Antialiasing (AA=12 for instance) can be activated only when Sharpening is active (Sharp>0).

Last edited by leon1789; 19th September 2009 at 17:26.
leon1789 is offline   Reply With Quote
Old 21st September 2009, 17:34   #29  |  Link
leon1789
Registered User
 
leon1789's Avatar
 
Join Date: Sep 2009
Location: Poitiers (Fr)
Posts: 77
version 7.0

New option "Overlap" for a better compatibility with MDegrain[1,2,3] and AviSynth MT.

Thanks to BigDid for many tests!
leon1789 is offline   Reply With Quote
Old 21st September 2009, 17:53   #30  |  Link
BigDid
Actually in reserve
 
Join Date: Oct 2004
Posts: 1,605
Lol,

Thanks to Leon for his patience. I imagine it is kind of hard to tune a script for MT and not having a multicore



Did
__________________
Having a problem with AutoGK? Read & use the FAQ & MORE FAQ first
Want to exchange on AutoGK? try doom10.org
In reserve (inactive) for an undefined period of time.
BigDid is offline   Reply With Quote
Old 27th September 2009, 18:39   #31  |  Link
leon1789
Registered User
 
leon1789's Avatar
 
Join Date: Sep 2009
Location: Poitiers (Fr)
Posts: 77
version 7.2
The type of DebrT has changed (float now): see http://forum.doom9.org/showthread.ph...46#post1329046

Last edited by leon1789; 27th September 2009 at 20:08.
leon1789 is offline   Reply With Quote
Old 30th September 2009, 08:36   #32  |  Link
leon1789
Registered User
 
leon1789's Avatar
 
Join Date: Sep 2009
Location: Poitiers (Fr)
Posts: 77
version 7.3
Optimization of the preset "light" (denoising & speed)
leon1789 is offline   Reply With Quote
Old 1st October 2009, 08:14   #33  |  Link
Comatose
Registered User
 
Join Date: Dec 2007
Posts: 639
The blur effect is kinda ugly in my opinion, because it's not uniform across large areas. Also, it looks a little bit like what you'd get if you Blur()'d and then sharpened. Wouldn't it be better to just Blur() instead of use a denoiser?

Although in my opinion, you don't want to blur at all. You just want to protect the areas with motion blur from being sharpened, because that doesn't do anything good, and at times it can be very ugly.
Comatose is offline   Reply With Quote
Old 1st October 2009, 20:26   #34  |  Link
BigDid
Actually in reserve
 
Join Date: Oct 2004
Posts: 1,605
Quote:
Originally Posted by Comatose View Post
...
Although in my opinion, you don't want to blur at all. You just want to protect the areas with motion blur from being sharpened, because that doesn't do anything good, and at times it can be very ugly.
Hi,

No blur?, no problem use blur=0

If you re-read the first post (or my post n°5), you will see that sharpening is done only on static areas, blur on motion area and denoising (temporal) on noisy blocks detected. Blur is handy for increasing compressability (usually motion is not seen at normal speed).

You can use show=true to get a visual representation of these 3 effects: green for sharp, red for denoise and blue for blur; explanations in post 4.

Did
__________________
Having a problem with AutoGK? Read & use the FAQ & MORE FAQ first
Want to exchange on AutoGK? try doom10.org
In reserve (inactive) for an undefined period of time.

Last edited by BigDid; 1st October 2009 at 20:29.
BigDid is offline   Reply With Quote
Old 2nd October 2009, 08:43   #35  |  Link
leon1789
Registered User
 
leon1789's Avatar
 
Join Date: Sep 2009
Location: Poitiers (Fr)
Posts: 77
That's it BigDid

Quote:
Originally Posted by Comatose View Post
The blur effect is kinda ugly in my opinion, because it's not uniform across large areas. Also, it looks a little bit like what you'd get if you Blur()'d and then sharpened.
The blur of the frame in post 4th is very strong (it is just an example). It's not like that in latest versions.

Quote:
Originally Posted by Comatose View Post
Wouldn't it be better to just Blur() instead of use a denoiser?
Blurring and denoising are two different process: the first can't replace the second.
leon1789 is offline   Reply With Quote
Old 11th October 2009, 11:32   #36  |  Link
Comatose
Registered User
 
Join Date: Dec 2007
Posts: 639
Quote:
Originally Posted by leon1789 View Post
Blurring and denoising are two different process: the first can't replace the second.
But if you blur enough, you also achieve denoising. Strong denoising is effectively blurring. Denoising is generally used to remove noise while preventing blurring as much as possible, but you're trying to achieve blurring, so just blur()...

Well, I guess this is no longer relevant since you don't do things this way anymore.
Comatose is offline   Reply With Quote
Old 17th October 2009, 18:31   #37  |  Link
leon1789
Registered User
 
leon1789's Avatar
 
Join Date: Sep 2009
Location: Poitiers (Fr)
Posts: 77
version 7.6
Optimised sharpening process.
leon1789 is offline   Reply With Quote
Old 20th October 2009, 05:12   #38  |  Link
awolfoutwest69
Registered User
 
Join Date: Jul 2005
Posts: 7
Can't run SoftSharpen

Not sure what I'm doing wrong. I have a YUY2 capture, and I am trying to apply this script as follows:

Code:
Import("c:\Program Files\avisynth 2.5\plugins\SoftSharpen.avsi")

AVISource("gd1991-04_27_s1.avi")
converttoYV12(interlaced=true)
SoftSharpen(blur=0)
When I open the above in VirtualDub, I get the following error:

Avisynth read error:
CAVIStreamSynth: System exception - Integer Divide by Zero at 0x10140d87

I put all the listed filters in my avisynth 2.58 plugins directory, and believe I have the most current versions. They are as follows:

asharp.dll - asharp 0.95
Deen.dll - deen_25_dll_20050705
DGDecode.dll - 1.5.5
gradfun2db.dll - gradfun2db_25_dll_20060315
MSharpen.dll - msharpen_25_dll_20030408
mt_masktools-25.dll - MaskTools2 2.0a36
mvtools2.dll - mvtools-v2.5.5
RemoveGrain.dll - 1.0b (tried 0.9 also same result)
awolfoutwest69 is offline   Reply With Quote
Old 20th October 2009, 17:14   #39  |  Link
BigDid
Actually in reserve
 
Join Date: Oct 2004
Posts: 1,605
Quote:
Originally Posted by awolfoutwest69 View Post
...
Code:
...
converttoYV12(interlaced=true)
SoftSharpen(blur=0)
...
Avisynth read error:
CAVIStreamSynth: System exception - Integer Divide by Zero at 0x10140d87

I put all the listed filters in my avisynth 2.58 plugins directory, and believe I have the most current versions. They are as follows:

asharp.dll - asharp 0.95
Deen.dll - deen_25_dll_20050705
DGDecode.dll - 1.5.5
gradfun2db.dll - gradfun2db_25_dll_20060315
MSharpen.dll - msharpen_25_dll_20030408
mt_masktools-25.dll - MaskTools2 2.0a36
mvtools2.dll - mvtools-v2.5.5
RemoveGrain.dll - 1.0b (tried 0.9 also same result)
Hi,

I tested your SS script (in the past there has been errors for value=0) OK.

I believe you may have prerequisite versions different from what is used for SS, maybe mvtools2 (I use the 2.4.7.0 version).

Recommended dll pack can be downloaded here:
http://www.unite-video.com/phpbb/download.php?id=2225

Did

Edit: never tried it on interlaced input though...
__________________
Having a problem with AutoGK? Read & use the FAQ & MORE FAQ first
Want to exchange on AutoGK? try doom10.org
In reserve (inactive) for an undefined period of time.

Last edited by BigDid; 20th October 2009 at 17:21.
BigDid is offline   Reply With Quote
Old 20th October 2009, 18:16   #40  |  Link
leon1789
Registered User
 
leon1789's Avatar
 
Join Date: Sep 2009
Location: Poitiers (Fr)
Posts: 77
Quote:
Originally Posted by awolfoutwest69 View Post
Not sure what I'm doing wrong. I have a YUY2 capture, and I am trying to apply this script as follows:

Code:
Import("c:\Program Files\avisynth 2.5\plugins\SoftSharpen.avsi")

AVISource("gd1991-04_27_s1.avi")
converttoYV12(interlaced=true)
SoftSharpen(blur=0)
SoftSharpen (like many others scripts and filters) should not be used with interlaced input.

Quote:
Originally Posted by awolfoutwest69 View Post
When I open the above in VirtualDub, I get the following error:

Avisynth read error:
CAVIStreamSynth: System exception - Integer Divide by Zero at 0x10140d87

I put all the listed filters in my avisynth 2.58 plugins directory, and believe I have the most current versions. They are as follows:

asharp.dll - asharp 0.95 ok
Deen.dll - deen_25_dll_20050705 use the version 20030814 for denois > 8
DGDecode.dll - 1.5.5 ok
gradfun2db.dll - gradfun2db_25_dll_20060315 ok
MSharpen.dll - msharpen_25_dll_20030408 ok
mt_masktools-25.dll - MaskTools2 2.0a36 ok
mvtools2.dll - mvtools-v2.5.5 perhaps use v2.5.8 ? http://avisynth.org.ru/mvtools/mvtools2.html
RemoveGrain.dll - 1.0b (tried 0.9 also same result) perhaps use v1.0 pre-release, the latest edition with SSE3 fix. http://avisynth.org/mediawiki/Removegrain
Anyway, I don't understand your division by 0. Do you have the latest version of SoftSharpen ? (I think so, but... )

Quote:
Originally Posted by BigDid View Post
I tested your SS script (in the past there has been errors for value=0) OK.
That's true, but the bug Sharp=0 has been fixed.

Last edited by leon1789; 20th October 2009 at 19:54.
leon1789 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 13:55.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.