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

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd June 2016, 08:41   #1781  |  Link
ultim
AVS+ Dev
 
ultim's Avatar
 
Join Date: Aug 2013
Posts: 359
Quote:
Originally Posted by Wilbert View Post
@Ultim, i talked with Ianb about that issue (size_t) more than a year ago, but he has a different opinion and won't revert those changes back. So that leaves us at a shitty situation with that many 64 bit plugins out there nowadays.
Thank you for talking to him. Knowing he won't revert takes at least one variable out of the equation.

Quote:
Originally Posted by MysteryX
Ultim is back; why is there so much aggressiveness in the air?
That's kind of a side-effect of my exchange with TheFluff, for which I am sorry, we both didn't mean it this way. And about me being back, please don't give me too much credit, I've told earlier that while I may help out now, others will have to start to take over my place.

Quote:
Originally Posted by Reel.Deel
You on the other hand, it seems you have some sort of personal vendetta against AviSynth. If you really care about VS so much than why is it that I've yet to see anything productive from you? Not a single bug report, or a plugin, or any help with the development, nothing, all you do is talk.
TheFluff doesn't have any vendetta, I think he'd just like to see people not resurrecting Avisynth again and again, but to put our efforts into VapourSynth instead of Avisynth. Also, as for his contributions, I think he is the maintainer of one of the most important source filters, FFMSSource and the associated library ffms2. Correct me if I'm wrong.
__________________
AviSynth+

Last edited by ultim; 22nd June 2016 at 08:44.
ultim is offline   Reply With Quote
Old 22nd June 2016, 09:40   #1782  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,173
Quote:
Originally Posted by ultim View Post
I think he'd just like to see people not resurrecting Avisynth again and again, but to put our efforts into VapourSynth instead of Avisynth.
AviSynth was never dead. It will live for as long as it serves its purpose.

I use it for
- SVP live video conversion to 60fps
- Auto-attune video playback from 440hz to 432hz
- Video/audio processing and encoding

Out of all this, so far, VapourSynth can only do video processing and encoding. And that has nothing to do with the limited set of plugins available in it. That's just my personal situation -- AviSynth can't be replaced at this point.
MysteryX is offline   Reply With Quote
Old 22nd June 2016, 12:51   #1783  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,234
I prefer Avisynth myself, I guess I'm not used to Vapoursynth.

There's a consideration for Avisynth in that legacy support should be offloaded, and have Avisynth primarily 'clean'. Basically to use a plugin requiring legacy support, you call the plugin for legacy support plugin commands, like:
legacyplugin(dooflakey(str=2.5))

Ideally thought the legacy plugins should be updated, not Avisynth. It's coming up to 2017, really should only be using 64-bit anyway . That would probably make things a lot easier if only the 64-bit side of things were developed, and have the corresponding plugins updated.
burfadel is offline   Reply With Quote
Old 22nd June 2016, 14:01   #1784  |  Link
ryrynz
Registered User
 
ryrynz's Avatar
 
Join Date: Mar 2009
Posts: 3,228
Wouldn't it be pretty straight forward to just fork it, have a legacy branch that receives whatever updates Avisynth gets, plus any easily portable updates and one branch where everything goes it's own way.

Last edited by ryrynz; 22nd June 2016 at 22:58.
ryrynz is offline   Reply With Quote
Old 22nd June 2016, 14:56   #1785  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 1,034
Image corruption with AviSynth+

As pinterf is now an active contributor, I feel it is time to submit again an old problem I introduced months ago.

Here is the original sample from BD.

When I apply the following script, using AviSynth 2.6 MT, I have good encodings.

13HoursAV26.dgi

PHP Code:
SetMTMode(3)
SetMemoryMax(2048)
LoadPlugin("D:\eseguibili\media\DGDecIM\dgdecodeim.dll")
DGSourceIM("E:\in\2_24 13 hours — The secret soldiers of Benghazi\13HoursAV26.dgi"silent=true)
ChangeFPS(last,last,true)
SetMTMode(2)
crop(01400, -140)
SMDegrain (tr=4,PreFilter=4,thSAD=400,contrasharp=false,refinemotion=false,plane=4,chroma=true,lsb=true,mode=6
Result.

When I use AviSynth+, I have image corruption.

13HoursAVS+.dgi

PHP Code:
SetMemoryMax(8000)
SetFilterMTMode("DEFAULT_MT_MODE"2)
SetFilterMTMode("ChangeFPS"3)
SetFilterMTMode("DGSource"3)
LoadPlugin("D:\eseguibili\media\DGDecNV\x64\DGDecodeNV.dll")
DGSource("E:\in\2_24 13 hours — The secret soldiers of Benghazi\13HoursAVS+.dgi")
#SetFilterMTMode("DGSourceIM", 3)
#LoadPlugin("D:\eseguibili\media\DGDecIM\x64\dgdecodeim.dll")
#DGSourceIM("E:\in\2_24 13 hours — The secret soldiers of Benghazi\13HoursCUT.dgi", silent=true)
ChangeFPS(last,last,true)
#Crop(0, 140, 0, -140)
SMDegrain (tr=4,PreFilter=4,thSAD=400,contrasharp=false,refinemotion=false,plane=4,chroma=true,lsb=true,mode=6)
Prefetch(8
prefilter=1 OK
prefilter=2 OK
prefilter=3 OK
prefilter=4 CORRUPTION

Memento:

PHP Code:
prefilter

[int"-1"01234] or [clip: - ]

-
off (Default)
light controlled gauss blur
mild median/gauss blur
strong median/gauss blur
dfttest (spatial)
KNLmeansCL (spatio-temporal GPU filter)
variable prefiltered clip input variable 
I have tried to use x86 version of AviSynth+, even DGIndexIM.

Results does not change.

The plugin versions I use are the following for both AviSynth and AviSynth+.

PHP Code:
[Avisynth CPP 2.6 plugins]
D:\Programmi\media\AviSynth+\plugins64\KNLMeansCL-0.7.6.dll  (n/a)
D:\Programmi\media\AviSynth+\plugins64\MaskTools-2.1b1-tp7.dll  (2.1.0.0)
D:\Programmi\media\AviSynth+\plugins64\MedianBlur2-0.94-tp7.dll  (n/a)
D:\Programmi\media\AviSynth+\plugins64\MVTools-2.7.0.22-pfmod.dll  (2.7.0.22)
D:\Programmi\media\AviSynth+\plugins64\RgTools-0.92.1-tp7.dll  (n/a)

[
Avisynth CPP 2.5 plugins]
D:\Programmi\media\AviSynth+\plugins64\DFTTest-1.9.4.dll  (1.9.4.0)
D:\Programmi\media\AviSynth+\plugins64\Dither-1.27.2.dll  (n/a
I can provide other movie examples too.

Ideas? Fixes?

P.S.: Previous post is here.
__________________
@turment on Telegram

Last edited by tormento; 23rd June 2016 at 13:56.
tormento is offline   Reply With Quote
Old 22nd June 2016, 15:06   #1786  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,117
Quote:
Originally Posted by ultim View Post
TheFluff doesn't have any vendetta, I think he'd just like to see people not resurrecting Avisynth again and again, but to put our efforts into VapourSynth instead of Avisynth. Also, as for his contributions, I think he is the maintainer of one of the most important source filters, FFMSSource and the associated library ffms2. Correct me if I'm wrong.
It certainly seems that way (here and in other threads in the past year). He has helped maintained FFMS2, but not in recent times nor anything to do with VS: https://github.com/FFMS/ffms2/graphs/contributors

Anyways, lets get back on topic.
Reel.Deel is offline   Reply With Quote
Old 22nd June 2016, 17:33   #1787  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,073
I haven't contributed to any open source projects in many years now. In fact I don't even code for a living anymore, I've switched careers. I don't use Avisynth or Vapoursynth myself either since I don't encode any video anymore and haven't done so for at least four or five years. For some reason though I still hang around with people who do work with these things and for some reason I still care. You are of course always free to disregard my opinions on any grounds you prefer.

To be clear, when I'm talking about pinterf's insane things, I'm referring to the recent problems with eval() having to be treated as a MT_NICE_FILTER. This is of course patently insane, eval() isn't a filter and should be seen as a component of the script parser, but nope, this is what you get for trying to tack on multithreading to a hobbyist project from the 90's. The amount of "cleverness" (to put it nicely) required to keep it working in all cases just keeps growing until you have a completely unmaintainable mess.

What the Avisynth community definitely needs the least these days is more fragmentation. It's been pretty bad for many years with all the different MT versions and official versions and Avxsynth and god knows what else, but at least they had compatible plugins and script interpreters. When pinterf showed up I thought it was going to take yet another alarming turn for the worst with another fork and new version but fortunately that didn't happen. Instead, though, we now have, what, five different MVTools versions? Jeez, people, consolidate! I really don't think the plugin interface thing is such a huge deal either, it should be fairly easy to write wrappers to let you load other/older plugin interface versions in Avs+. Just ignore the "official" version IMO - you have the userbase on your side, the people who are still using the official version today are the kind of people who are still using Windows XP and are likely never going to upgrade either Avisynth or their plugins or their computers, even if a new version actually was released. 2.5.0 was released in 2003, 2.5.8 in 2008 and 2.6 last year, so at this rate, if you want a "final" 2.6 in the style of 2.5.8, expect to wait until 2020, and for "2.7" you're going to have to wait at least until 2027 or so. There's no point in trying to have a half-hearted fork that doesn't even attempt to supplant the parent project, either. Aim for the stars.

Last edited by TheFluff; 22nd June 2016 at 17:41.
TheFluff is offline   Reply With Quote
Old 22nd June 2016, 17:38   #1788  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,073
Quote:
Originally Posted by MysteryX View Post
If VapourSynth was to include audio support and support all the plugins I'm using, I would consider switching over.
Out of curiosity, what plugins are you missing in VS? Also, are you aware it can load Avisynth plugins? I'm not trying to sell you a bridge or anything, I just believe you have a mistaken view of the state of VS.
TheFluff is offline   Reply With Quote
Old 22nd June 2016, 18:13   #1789  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,173
Quote:
Originally Posted by TheFluff View Post
Out of curiosity, what plugins are you missing in VS? Also, are you aware it can load Avisynth plugins? I'm not trying to sell you a bridge or anything, I just believe you have a mistaken view of the state of VS.
This is one of the scripts I use for live playback at 432hz. This can't be done in VapourSynth.
Code:
P="Encoder\"
LoadPlugin(P+"LSMASHSource.dll")
LoadPlugin(P+"TimeStretch.dll")
file="INNA\In Your Eyes.mkv"
LWLibavVideoSource(file, cache=False)
AudioDub(LWLibavAudioSource(file, cache=False))
Preroll(int(FrameRate*3))
ResampleAudio(48000)
TimeStretchPlugin(pitch = 100.0 * 0.98181819915771484)
I haven't looked into what filters are or are not available in VapourSynth. RoboCrop to detect cropping isn't x64 compatible so I don't think that's in VapourSynth unless there's a replacement. If I crop the video and change the speed, I need to process the audio in the same way and I then call WriteToWAV and process the audio file separately.


As for "MT not working", I just realized something. There are two types of plugins out there. There are stand-alone plugins that just require a DLL to work, and there are "throw it all on the wall"-type plugins that depend on a chain of plugins that each depend on another chain of plugins. The first type is generally very stable with MT. The second type is not.

I was experimenting with SMDegrain and was surprised by the results, especially when combined with KNLMeans.

This did a great job on my SD videos and worked with MT.
Code:
SMDegrain(thsad=2000, contrasharp=true, lsb_in=true, lsb_out=true)
With HD content, it failed miserably. In fact I still can't get ContraSharp to run at all. With contrasharp=false, I can get it to work as long as MT is off, as MT causes deadlocks.

That's not an issue with AviSynth+ MT; but these plugins that depend on a whole chain of other plugins tend to be very unstable.
MysteryX is offline   Reply With Quote
Old 22nd June 2016, 18:21   #1790  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 1,293
Quote:
Originally Posted by MysteryX View Post
This is one of the scripts I use for live playback at 432hz. This can't be done in VapourSynth.
Code:
P="Encoder\"
LoadPlugin(P+"LSMASHSource.dll")
LoadPlugin(P+"TimeStretch.dll")
file="INNA\In Your Eyes.mkv"
LWLibavVideoSource(file, cache=False)
AudioDub(LWLibavAudioSource(file, cache=False))
Preroll(int(FrameRate*3))
ResampleAudio(48000)
TimeStretchPlugin(pitch = 100.0 * 0.98181819915771484)
I haven't looked into what filters are or are not available in VapourSynth. RoboCrop to detect cropping isn't x64 compatible so I don't think that's in VapourSynth unless there's a replacement. If I crop the video and change the speed, I need to process the audio in the same way and I then call WriteToWAV and process the audio file separately.


As for "MT not working", I just realized something. There are two types of plugins out there. There are stand-alone plugins that just require a DLL to work, and there are "throw it all on the wall"-type plugins that depend on a chain of plugins that each depend on another chain of plugins. The first type is generally very stable with MT. The second type is not.

I was experimenting with SMDegrain and was surprised by the results, especially when combined with KNLMeans.

This did a great job on my SD videos and worked with MT.
Code:
SMDegrain(thsad=2000, contrasharp=true, lsb_in=true, lsb_out=true)
With HD content, it failed miserably. In fact I still can't get ContraSharp to run at all. With contrasharp=false, I can get it to work as long as MT is off, as MT causes deadlocks.

That's not an issue with AviSynth+ MT; but these plugins that depend on a whole chain of other plugins tend to be very unstable.
try this http://pastebin.com/6Czuj5s0
__________________
My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 22nd June 2016, 21:42   #1791  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,035
The binary compatibility stuff is really the smallest problem. You can always write a shitty wrapper. See the VapourSynth compatibility code on how to wrap things to something not completely identical.

Btw, the size_t thing is also possibly the smallest problem ever. I just realized that I'd implemented my own x64 compatility with the plain 2.6 header. Guess what? IT WROKSKSKSSS!!!!!!!1111 So just recompile everything with a 2.6 header and you're good.

Btw, TheFluff is the chief VS evangelist so you have to respond to all his trolling. No excuses.


And in regards to VS and plugins. I believe all popular unported plugins should work using the avisynth compatibility. If you find one that doesn't just post about it and I'll take a look.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 22nd June 2016, 22:55   #1792  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,266
Quote:
TheFluff is the chief VS evangelist
What, you mean he does a lot of shouting, we all knew that !
__________________
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   Reply With Quote
Old 22nd June 2016, 23:06   #1793  |  Link
ryrynz
Registered User
 
ryrynz's Avatar
 
Join Date: Mar 2009
Posts: 3,228
Quote:
Originally Posted by TheFluff View Post
Just ignore the "official" version IMO - you have the userbase on your side, the people who are still using the official version today are the kind of people who are still using Windows XP and are likely never going to upgrade either Avisynth or their plugins or their computers, even if a new version actually was released. 2.5.0 was released in 2003, 2.5.8 in 2008 and 2.6 last year, so at this rate, if you want a "final" 2.6 in the style of 2.5.8, expect to wait until 2020, and for "2.7" you're going to have to wait at least until 2027 or so.
Yup, that's what I said too. It's going nowhere fast. Wrap away.
ryrynz is offline   Reply With Quote
Old 23rd June 2016, 00:31   #1794  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,084
Quote:
Originally Posted by ryrynz View Post
Wouldn't it be pretty straight forward to just fork it, have a legacy branch that receives whatever updates Avisynth gets, plus any easily portable updates and one branch where everything goes it's own way.
Simpler than that, actually; the AviSynthPlus repo on Github was itself forked from jeeb's, which (on a good day) was/is up-to-date with the CVS*. Cherry-pick and adapt whatever patches are relevant into an integration branch, and open a pull request to merge the integration branch into AviSynth+ HEAD. This is exactly how the RC1 and still-yet-unmerged RC2 integration was done, and how I'm currently slogging through the remainder of the 2.6a1/CVS stuff up to the beginning of June.

*and when it hadn't been updated with cvsimport in a while, I went ahead and pushed up a classic_avisynth branch into my personal avsplus repo that exists alongside MT and co.

Last edited by qyot27; 23rd June 2016 at 00:38.
qyot27 is offline   Reply With Quote
Old 23rd June 2016, 00:59   #1795  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,266
I find myself asking why IanB would not want to sit back and relax, if others are prepared to take what has been achieved and carry it forward, great,
Ian deserves a rest and to watch whilst others add to his baby, no way should it be perceeived as anything less than total success, because that is what it is.
For myself I could not desert the current official state, and would I think not do so, but I do recognise the vigour of the new pretenders.
I dont know why Ian has chosen to isolate himself from the world, I at one time had my suspicions as to why, but rightly or wrongly, it is the path he has chosen to take,
however isolation cannot be good for anyone here. One cannot oversee or steer from afar something akin to Avisynth, perhaps Ian should forgo his ownership
of avs and let the new lads have a go.

Above was so very hard for me to say.
__________________
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   Reply With Quote
Old 23rd June 2016, 02:21   #1796  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,173
Quote:
Originally Posted by real.finder View Post
That's the version I have.

I'm discussing that issue in this thread

Last edited by MysteryX; 23rd June 2016 at 03:39.
MysteryX is offline   Reply With Quote
Old 23rd June 2016, 10:48   #1797  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,256
Quote:
Originally Posted by Myrsloik View Post
Btw, the size_t thing is also possibly the smallest problem ever. I just realized that I'd implemented my own x64 compatility with the plain 2.6 header. Guess what? IT WROKSKSKSSS!!!!!!!1111
For historical reasons my mvtools2 mod is also using that size_t version of the classic avs 2.6 header, and encountered no problem.
Why? Because these fields are accessed through methods instead of direct reference? I suppose it would break in a plugin running under avs+ x64 if we used avs 2.6 header and access pitch instead of calling GetPitch()?

Code:
	int GetPitch(int plane = 0) const AVS_BakedCode(return AVS_LinkCall(GetPitch)(plane))
Classic
Code:
class VideoFrame {
public:
	volatile long refcount;
	VideoFrameBuffer* const vfb;
	const size_t offset;
	const int pitch, row_size, height;
	const size_t offsetU, offsetV;  // U&V offsets are from top of picture.
	const int pitchUV, row_sizeUV, heightUV;
avs+
Code:
class VideoFrame {

  volatile long refcount;
  VideoFrameBuffer* vfb;

  // Due to technical reasons these members are not const, but should be treated as such.
  // That means do not modify them once the class has been constructed.
  int offset, pitch, row_size, height, offsetU, offsetV, pitchUV;  // U&V offsets are from top of picture.
  int row_sizeUV, heightUV;
pinterf is offline   Reply With Quote
Old 23rd June 2016, 12:07   #1798  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 1,034
Nobody went into my same issue? Nobody wants to investigate?

__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 23rd June 2016, 12:19   #1799  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,256
Quote:
Originally Posted by tormento View Post
Nobody went into my same issue? Nobody wants to investigate?
Can you upload your exact source somewhere (the dgi one, not the .264 - I was stuck how to convert it)
Then it would be much help if you stripped down the script until the corruption disappear. (Change parameters, uncomment SMDegrain internals). This is how I would start.
Does it happen when you convert your source and not using dgi?
pinterf is offline   Reply With Quote
Old 23rd June 2016, 12:27   #1800  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 1,034
Quote:
Originally Posted by pinterf View Post
Can you upload your exact source somewhere (the dgi one, not the .264 - I was stuck how to convert it)
Then it would be much help if you stripped down the script until the corruption disappear. (Change parameters, uncomment SMDegrain internals). This is how I would start.
Does it happen when you convert your source and not using dgi?
Post edited and DGIs inserted.

Please look original thread and see all the trials I did.

Will try to strip down things. As far as I remember, I could even use prefilter 2 instead of 4 or x86 vs x64 and nothing changed.
__________________
@turment on Telegram
tormento 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 04:22.


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