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 Development

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 23rd July 2014, 20:20   #781  |  Link
VideoFanatic
Registered User
 
Join Date: Sep 2011
Posts: 241
Thanks, I understand now.
VideoFanatic is offline  
Old 23rd July 2014, 20:57   #782  |  Link
Xebika
Registered User
 
Join Date: May 2014
Location: Denmark
Posts: 50
Quote:
Originally Posted by holygamer View Post
I read them before I posted and I couldn't find anything via search. It doesn't explain what the "" part does. I'd like to know what the equivalent of the following is in Avisynth+:

Code:
setmtmode(5,9)
DGSource("E:\Video.dgi")
setmtmode(2)
Is the following script correct - everything is using mode 2?
You should use mode 2 unless mode 3 is required for the plugin to work? I want 9 threads so I entered Prefetch(9) at the end.

Code:
SetFilterMTMode("", 2)
SetFilterMTMode("DGSource", 2) 

DGSource("E:\Video.dgi")
AssumeTFF() 
DeGrainMedian(limitY=2, limitUV=3, mode=1, interlaced=true)
Yadif(mode=1, order=1)
Vinverse()
Lanczos4Resize(1280,720)
Prefetch(9)
What is the speed gain of your script with MT??
Xebika is offline  
Old 9th August 2014, 15:36   #783  |  Link
thescrapyard
Registered User
 
thescrapyard's Avatar
 
Join Date: Feb 2008
Posts: 59
Can anybody help in rewriting this dirt removal script that uses the original RemoveGrain plug-in and also mvtools2, so that it uses AviSynth+ RGTools instead and what looks like an improved clense function according to the RGTools wiki

Clense (clip, clip "previous", clip "next", bool "grey")



I really wouldn't know where to start, I've stared at the script but not knowing what functions to change


function RemoveDirt(clip input, int limit, bool _grey)
{
clensed=input.Clense(grey=_grey, cache=4)
alt=input.removegrain(2)
return RestoreMotionBlocks(clensed,input,alternative=alt,pthreshold=4,cthreshold=6, gmthreshold=60,dist=2,dmode=2,debug=false,noise=limit,noisy=12,grey=_grey)
}

function RemoveDirtMC(clip,int limit, bool "_grey")
{
_grey=default(_grey, false)
limit = default(limit,6)
bvec = clip.MVAnalyse(isb=false, blksize=8, delta=1, pel=2, sharp=1, truemotion=true, idx=4, overlap=0)
fvec = clip.MVAnalyse(isb=true, blksize=8, delta=1, pel=2, sharp=1, truemotion=true, idx=4, overlap=0)
backw = clip.MVFlow(bvec, idx=4)
forw = clip.MVFlow(fvec, idx=4)
clp=interleave(backw,clip,forw)
clp=clp.RemoveDirt(limit,_grey)
clp=clp.SelectEvery(3,1)
return clp
}

This may also help others that want to replace functions or plug-ins from the original AviSynth plug-ins or functions, especially when trying to use 32-bit and 64-bit AviSynth+

Last edited by thescrapyard; 9th August 2014 at 17:01.
thescrapyard is offline  
Old 9th August 2014, 15:56   #784  |  Link
innocenat
Registered User
 
innocenat's Avatar
 
Join Date: Dec 2011
Posts: 77
I don't know about other, but I don't think it is right topic to ask.

For RgTools, you can just replace removegrain[something].dll with just rgtools dll (don't forget to remove old dll), the new version will be use automatically as they provide same functions as old version. I don't know about mvtools2, but documentation suggest the you can just change MV*** to M*** and it will works.

Please also note that those changes aren't related to Avisynth+ in anyway, as all will also work with original avisynth 2.6alpha5. For 64-bit Avisynth+ just use 64bit version of the dll, the rest is the same.
__________________
AviSynth+
innocenat is offline  
Old 10th August 2014, 07:59   #785  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
here you go
function RemoveDirt(clip input, int "limit", bool "_grey")
{
clensed=input.Clense(grey=_grey)
alt=input.removegrain(2)
return RestoreMotionBlocks(clensed,input,alternative=alt,pthreshold=4,cthreshold=6, gmthreshold=60,dist=2,dmode=2,debug=false,noise=limit,noisy=12,grey=_grey)
}

function RemoveDirtMC(clip clip,int "limit", bool "_grey")
{
_grey=default(_grey, false)
limit = default(limit,6)
super = clip.msuper (sharp=1,pel=2)
bvec = super.MAnalyse(isb=false, blksize=8, delta=1, truemotion=true, overlap=4)
fvec = super.MAnalyse(isb=true, blksize=8, delta=1, truemotion=true, overlap=4)
backw = clip.MFlow(super, bvec)
forw = clip.MFlow(super, fvec)
clp=interleave(backw,clip,forw)
clp=clp.RemoveDirt(limit,_grey)
clp=clp.SelectEvery(3,1)
return clp
}
"RestoreMotionBlocks" function is from here http://www.removedirt.de.tf/

Last edited by feisty2; 10th August 2014 at 13:45.
feisty2 is offline  
Old 10th August 2014, 10:25   #786  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by feisty2 View Post
here you go
RgTools' Clense does not have the 'cache' parameter.
Reel.Deel is offline  
Old 10th August 2014, 13:38   #787  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
I already corrected it, thank you for tipping
feisty2 is offline  
Old 15th August 2014, 16:53   #788  |  Link
bennynihon
Registered User
 
Join Date: Oct 2001
Posts: 106
I have an 8 core i7 with 16GB of RAM running x64 Windows 8.1. For whatever reason feeding x264 my Avisynth+ MT script crashes with Prefetch > 4. Prefetch(4) mostly works, but here's the kicker. My script with one clip works just fine with Prefetch(4), while another source clip using the same exact script crashes with Prefetch(4). I need to use Prefetch(3) for that one. I notice that avisynth and x264 use comparatively very little memory. About 800MB each. I'm OK with leaving it at Prefetch(4) as the performance is satisfactory to me. But I'm concerned by the lack of consistency even with the same script. Are there any other tweaks or fine tuning I can do to possibly get better consistency or performance? Here's my script:

Code:
SetFilterMTMode("", 2)
SetFilterMTMode("FFVideoSource", 3)

# Video Source
FFVideoSource("video.mkv")

# Crop
Crop(0,20,0,-20) # 1920x1040 (1.85:1 AR)

# Masks
vLumaMask=mt_binarize(threshold=64, upper=true).grayscale().BilinearResize((width/32)*2, (height/32)*2).BilinearResize(width,height).mt_binarize(threshold=254)
vEdgeMask=mt_edge(mode="prewitt",thy1=0,thy2=16).grayscale().mt_binarize(threshold=16, upper=true).BilinearResize((width/32)*2, (height/32)*2).BilinearResize(width,height).mt_binarize(threshold=254)
vGrainMask=mt_logic(vLumaMask,vEdgeMask,mode="and")
vDegrainMask=vGrainMask.mt_invert()

# Degrain
bs = 16
super = MSuper(pel=2,sharp=1,hpad=bs,vpad=bs)
bvec2 = MAnalyse(super, isb=true, delta=2, blksize=bs, overlap=bs/2)
bvec1 = MAnalyse(super, isb=true, delta=1, blksize=bs, overlap=bs/2)
fvec1 = MAnalyse(super, isb=false, delta=1, blksize=bs, overlap=bs/2)
fvec2 = MAnalyse(super, isb=false, delta=2, blksize=bs, overlap=bs/2)
vClean=MDegrain2(super,bvec1,fvec1,bvec2,fvec2,thSAD=400)
mt_merge(vClean,vDegrainMask,u=2,v=2)

# Dither
Dither_convert_8_to_16()
vGrain=Dither_add_grain16(var=0.6,uvar=0,lsb_in=true)
Dither_merge16_8(vGrain,vGrainMask,u=2,v=2)

# Output
DitherPost(mode=3) # 8-bit output

# Multi-threaded
Prefetch(3)
bennynihon is offline  
Old 16th August 2014, 08:10   #789  |  Link
Dion
Registered User
 
Join Date: Oct 2004
Posts: 64
I cannot seem to get AvsPMod to display video with Avisynth+. It always locks up when I try to load a mkv into it. Does it from DSS2, FFVideoSource, DGSource. All of them.

I have the latest Avisynth+ Installed. I am using the AvsPMod recommended on the Avisynth+ Page. If I use the vanilla AvsPMod 2.5.1 I get an error at startup. And some plugin's don't work. But I am able to display video.

Does anyone know why?
Dion is offline  
Old 16th August 2014, 09:41   #790  |  Link
thescrapyard
Registered User
 
thescrapyard's Avatar
 
Join Date: Feb 2008
Posts: 59
Try this, I use avisynth+ with avspmod as well

http://www6.zippyshare.com/v/49944794/file.html


This link is from the avisynth+ site and specifies this version of avspmod that has been tested as ok with avisynth+

Also, try telling avisynth/avisynth+ where to find plugins and scripts. Its good at falling over with obscure errors if it can't find what its looking for. I've done it this way for years with no issues since it was suggested to me.... and use MKV as well

This is a couple of lines from scripts I use with avspmod


dss2("g:\ConvertXToDVD\dangermouse.mkv")
ConvertToYV12()

DLLPath="C:\Program Files (x86)\Applications\--Scripts\"

I just use the DLLPath variable as it then means i don't have a messy script and makes life easier, like this. If I miss out the ConverttoYV12 it fails with an error, so this just makes sure its ok


dss2("g:\ConvertXToDVD\dangermouse.mkv")
ConvertToYV12()
DLLPath="C:\Program Files (x86)\Applications\--Scripts\"

SetFilterMTMode("",2)

Loadplugin(DLLPath+"-denoiser\mvtools2.dll")
Loadplugin(DLLPath+"-denoiser\removedirt.dll")
Loadplugin(DLLPath+"-denoiser\removegrain.dll")
Loadplugin(DLLPath+"-denoiser\repair.dll")
Import(DLLPath+"-denoiser\removedirtmc.avs")

removedirtmc(75,false)

prefetch(3)

Last edited by thescrapyard; 16th August 2014 at 20:39.
thescrapyard is offline  
Old 16th August 2014, 23:58   #791  |  Link
Dion
Registered User
 
Join Date: Oct 2004
Posts: 64
Quote:
Originally Posted by thescrapyard View Post
Try this, I use avisynth+ with avspmod as well

http://www6.zippyshare.com/v/49944794/file.html
I already said I used it in my previous post.

Edit: I have found the problem nevermind.

Last edited by Dion; 17th August 2014 at 08:26.
Dion is offline  
Old 17th August 2014, 12:52   #792  |  Link
jmartinr
Registered User
 
jmartinr's Avatar
 
Join Date: Dec 2007
Location: Enschede, NL
Posts: 301
Quote:
Originally Posted by Dion View Post
I already said I used it in my previous post.

Edit: I have found the problem nevermind.
What was the problem/solution?
__________________
Roelofs Coaching
jmartinr is offline  
Old 17th August 2014, 22:57   #793  |  Link
Dion
Registered User
 
Join Date: Oct 2004
Posts: 64
Quote:
Originally Posted by jmartinr View Post
What was the problem/solution?
One of my plugin's doesn't like Avisynth+. Deleted it and it all worked fine. I msged the dev of the plugin to fix it. So hoping he does.
Dion is offline  
Old 17th August 2014, 23:04   #794  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
One of my plugin's
Is the name of the plugin a secret ?
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline  
Old 18th August 2014, 09:01   #795  |  Link
Octo-puss
Registered User
 
Join Date: Jan 2008
Posts: 571
Does this project have any chance of ever being resurrected? Right now it feels like so much wasted potential.
Octo-puss is offline  
Old 18th August 2014, 12:13   #796  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 478
Quote:
Originally Posted by Octo-puss View Post
Does this project have any chance of ever being resurrected? Right now it feels like so much wasted potential.
It's funny that Avisynth has so much history of promising projects being dropped. As I mentioned earlier in the thread, the history of Avisynth+ is uncannily like that of Avisynth x64. Both started out with great promise with the developer showing great enthusiasm and developing the project with great speed. Then they disappear suddenly

Don't get me wrong, I don't blame them or anything. They are giving their time away for free and for that I'm appreciative. I'm just curious what is it that cause them to disappear in that manner.
aegisofrime is offline  
Old 18th August 2014, 14:22   #797  |  Link
TurboPascal7
Registered User
 
TurboPascal7's Avatar
 
Join Date: Jan 2010
Posts: 270
Quote:
Originally Posted by Octo-puss View Post
Does this project have any chance of ever being resurrected? Right now it feels like so much wasted potential.
ultim is alive and might return to the project in the future. I wouldn't expect other people to join him though.

Quote:
Originally Posted by aegisofrime View Post
I'm just curious what is it that cause them to disappear in that manner.
Avisynth development is one of the least rewarding activities for a programmer and the whole idea of complicated and powerful frameservers is dying, imho. After a few months most of the "fun" wears off and all you left with is extremely boring maintenance, depressing codebase, tiny community and zero motivation to continue spending your time on it.

Something like that.
__________________
Me on GitHub | AviSynth+ - the (dead) future of AviSynth
TurboPascal7 is offline  
Old 18th August 2014, 15:58   #798  |  Link
macromizer
Guest
 
Posts: n/a
Quote:
Originally Posted by aegisofrime View Post
It's funny that Avisynth has so much history of promising projects being dropped. As I mentioned earlier in the thread, the history of Avisynth+ is uncannily like that of Avisynth x64. Both started out with great promise with the developer showing great enthusiasm and developing the project with great speed. Then they disappear suddenly

Don't get me wrong, I don't blame them or anything. They are giving their time away for free and for that I'm appreciative. I'm just curious what is it that cause them to disappear in that manner.
As said by TurboPascal, it's just a huge drudge trying to fixup and maintain a legacy codebase you had no hand in originally writing. Avisynth development before ultim came along also suffered a lot from the same perception of ffmpeg before the libav fork. That perception being that the maintainer(s) are slow to accept patches, if at all, and a resistance to a lot of changes necessary to bring in more contributors (in the case of Avisynth requiring maintaining compatibility with a 16-year-old version of Visual Studio). While ffmpeg became much quicker to accept patches and new features after being forked, Avisynth unfortunately just maintained the status quo.

And then the Avisynth 3 guys simply just bit off way more work than they could reasonably do with only a couple of people at most. And unfortunately if ultim is going to end up being the only driving force for Avisynth+ it's going to suffer the same fate.

Even in the worst scenario for Avisynth/Avisynth+, Vapoursynth development seems to be picking back up with more contributors than just Myrsloik and more filters being ported over.

I was looking into porting Avisynth+ over to OS X and possibly after that to iOS (simply for the challenge), but I got stalled and am even wondering if it's even something worthwhile considering that quite a bit of porting effort would be needed to get a decent amount of plugins in addition to the modernization that TP and others have already done and the fact that a number of useful yet closed-source plugins won't ever run natively. And if you've already got to port things, I might as well just go with Vapoursynth. I would be more than willing to look back into it if there was a genuine want for it, but being somewhat fatalistic it seems to be a futile effort for little gain over something already up and running.

Last edited by macromizer; 18th August 2014 at 16:40.
 
Old 18th August 2014, 18:56   #799  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
Yes, because a pause of 5 months (two months if you count the pull from June) is in any way comparable to a 5+ year, prolonged development hell. /sarcasm

Think about it for a second: within a time span of 6 months (September 2013-March 2014), there were enough unique commits to AviSynth+ to outpace the entire development cycle of AviSynth 2.6 up to that point, and even a chunk of 2.5's. It's not unreasonable, especially with the volume of different things that were getting done (64-bit support, intrinsics, MT & caching, etc.), to expect some level of burn-out or slow down. And even granted that, the 'level' that avsplus is currently at is not in any way lagging behind 2.6 - which hasn't had any commits since September 2013 when 2.6a5 was released.


Quote:
Originally Posted by macromizer
I was looking into porting Avisynth+ over to OS X and possibly after that to iOS (simply for the challenge), but I got stalled and am even wondering if it's even something worthwhile considering that quite a bit of porting effort would be needed to get a decent amount of plugins in addition to the modernization that TP and others have already done and the fact that a number of useful yet closed-source plugins won't ever run natively. And if you've already got to port things, I might as well just go with Vapoursynth. I would be more than willing to look back into it if there was a genuine want for it, but being somewhat fatalistic it seems to be a futile effort for little gain over something already up and running.
I actually saw this on Github back when it was pushed, and was looking to integrate the OSX changes and innocenat's Linux work together into a single branch. I certainly would be willing to assist on tedious work (I did transition the English documentation over to RST, even though the content needs updating). I started trying to do this in such a way to get it building on Linux with GCC, but I hit a snag in avisynth.cpp and I've been procrastinating on trying to look for solutions (or jumping on IRC to do the discussion in real time, since most of the time I use IRC under Windows but do any compilation tests and such under Linux). One particularly nasty issue, is that GCC's handling of intrinsics for CPU runtime detection is braindead and requires each instruction set's intrinsics to be segregated into separate files, because otherwise, you'll only ever be able to compile the project for the highest instruction set used, completely defeating the purpose. CMake is capable of handling this situation (x265 was set up this way for a while, before they moved [virtually?] everything to YASM), but it requires special-casing so that the necessary -m flags for the intrinsics are applied only on a per-file basis. This was most of what I was doing before I hit that roadblock, but I hadn't set up the stuff for CMake to deal with it yet.

IMO, the value of detethering it from Windows is in getting AvxSynth out of the way - that's what I'm really most concerned about right now. It also would help to expand the potential developer base, as every so often there's a new pull request or issue opened over on AvxSynth's repo that I can practically guarantee will come to nothing. The lasting effect AvxSynth had was to finally get libavformat's AviSynth demuxer rewritten properly, but AvxSynth itself is not a long-term solution (and it's at a major feature disadvantage, because it's based on 2.5 with a few various backports from 2.6, doesn't support the newer colorspaces from 2.6, and has all its assembly disabled). Having something that's properly up-to-date with the development HEAD should go a long way toward getting more use on non-Windows platforms, and then we might actually see more plugins ported over or new plugins getting written for it. I don't place a lot of emphasis on the state of the plugins to determine the value of getting the core working there, since even the core in a vacuum has features that are useful on their own (most of my DVD authoring workflow relies on scripts only using core functions, apart from using FFMS2 to load the stuff). There was also an offhanded comment by IanB on the AvxSynth thread that since most plugins are simply algorithm code, it might be possible to thunk them - which would at least be a band-aid until they're ported properly (this is basically what mplayer-svn does with w32codecs/w64codecs, right?).



Maybe if we go about it like, "okay, for this development cycle we're going to focus on this feature", and then lay out the actual steps - in public view on this thread - on how to achieve that, with technical details, it might help to motivate everyone (and actually give users more insight into what's going on so we don't have all the easily demotivating 'is it dead or not?' talk getting posted). That's one thing that I think is contributing to the drag, since many of the discussions about how to go about implementing new features would be relegated to IRC and this thread is basically for people to ask about how to use MT (lately, anyway). It would be one thing if the IRC logs were cached somewhere and downloadable/viewable online for reference, but as far as I know, they aren't. One thing for instance, is how to translate from MSVC-isms to something that all three of the common compilers (MSVC, GCC, and Clang) can digest, where the gotchas actually are, and in those cases that the dialect is unavoidable, what the equivalent is in the others so that the branching can be set up cleanly.

I haven't really seen any more big reports of MT failing in the months since it appeared (in terms of its actual stability), save for the bounds checking issue with the audio cache that I reported in here and on Github. If I'm correct about that assessment, perhaps it's time to just bite the bullet and merge it to master and bump the version number to 0.2. The psychological effect of just going ahead and releasing it might help too.
qyot27 is offline  
Old 18th August 2014, 19:41   #800  |  Link
Octo-puss
Registered User
 
Join Date: Jan 2008
Posts: 571
Quote:
Originally Posted by TurboPascal7 View Post
and the whole idea of complicated and powerful frameservers is dying, imho
Hm, but what else are we supposed to use instead of Avisynth if it's dying then?
Octo-puss is offline  
Closed Thread

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 00:50.


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