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 > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th January 2018, 20:29   #21  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 369
new syntax is: core.avsw.Eval

All posts by Stephen R. Savage are deleted?

//Edit
Deleted some of my posts too so that I don't look like I'm talking to myself all the time
__________________
Search and denoise

Last edited by ChaosKing; 18th January 2018 at 22:14.
ChaosKing is online now   Reply With Quote
Old 18th January 2018, 21:33   #22  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,379
Thanks, missed that one
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 18th January 2018, 22:05   #23  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,035
Quote:
Originally Posted by ChaosKing View Post
new syntax is: core.avsw.Eval

All posts by Stephen R. Savage are deleted?
You need to quote him when he posts because he deletes his own posts after a while for whatever paranoid reason.
TheFluff is offline   Reply With Quote
Old 31st January 2018, 06:52   #24  |  Link
monohouse
Registered User
 
Join Date: Jul 2007
Posts: 94
I like this idee, I am looking to use vaporsynth for nnedi3 but I need didee' daa3, is it possible to combine vaporsynth functions with avisynth functions ?
this is the daa3 code that I am using:
Code:
    #controllable Anti-aliasing with contra-sharpening by Didée
    FUNCTION daa3(clip c, int "nthreads", int "nsharp", int "neurons", int "q", int "size" ) {
	nthreads    = default(nthreads, 8)
	nsharp      = default(nsharp, 25)
	neurons		= default(neurons, 4)
	q			= default(q, 5)
	size		= default(size, 3)
	Assert((nthreads>=1)        	 ? true : false, chr(10) + "'nthreads' must be at least 1" + chr(10))
	Assert((nsharp>=-1&&nsharp<=25)  ? true : false, chr(10) + "'nsharp' must be between -1 and 25" + chr(10))
	Assert((q>=0&&q<=5)      	     ? true : false, chr(10) + "'q' must be between 0 and 5" + chr(10))
	Assert((neurons>=0&&neurons<=4)  ? true : false, chr(10) + "'neurons' must be between 0 and 4" + chr(10))
	Assert((size>=1&&size<=6)        ? true : false, chr(10) + "'size' must be between 1 and 6" + chr(10))
	nn = (q == 0)  ? c.nnedi3(field=-2,nsize=size,nns=neurons,qual=1,pscrn=2,fapprox=0,threads=nthreads) :
	\	(q == 1)  ? c.nnedi3(field=-2,nsize=size,nns=neurons,qual=1,pscrn=1,fapprox=0,threads=nthreads) :
	\	(q == 2)  ? c.nnedi3(field=-2,nsize=size,nns=neurons,qual=1,pscrn=0,fapprox=0,threads=nthreads) :
	\	(q == 3)  ? c.nnedi3(field=-2,nsize=size,nns=neurons,qual=2,pscrn=2,fapprox=0,threads=nthreads) :
	\	(q == 4)  ? c.nnedi3(field=-2,nsize=size,nns=neurons,qual=2,pscrn=1,fapprox=0,threads=nthreads) :
	\   c.nnedi3(field=-2,nsize=size,nns=neurons,qual=2,pscrn=0,fapprox=0,threads=nthreads)
    dbl     = mt_average(selecteven(nn),selectodd(nn),U=3,V=3)
    dblD    = mt_makediff(c,dbl,U=3,V=3)
	shrpD   = nsharp==25 ? mt_makediff(dbl,dbl,U=3,V=3) : mt_makediff(dbl,dbl.removegrain(nsharp),U=3,V=3)
    DD      = shrpD.repair(dblD,13)
    return dbl.mt_adddiff(DD,U=3,V=3) }
the goal is to run the nnedi3 portion using vaporsynth (with openCL version for speed)
while making sure the function that uses nnedi3 inside daa3 will function:
Code:
    dbl     = mt_average(selecteven(nn),selectodd(nn),U=3,V=3)
is sutch a thing is possible ?
monohouse is offline   Reply With Quote
Old 31st January 2018, 07:52   #25  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,460
The newest havsfunc r27 has a daa version with NNEDI3CL, but it looks to be slightly different from your avs version . But maybe you can use it as a starting point
poisondeathray is offline   Reply With Quote
Old 31st January 2018, 10:22   #26  |  Link
monohouse
Registered User
 
Join Date: Jul 2007
Posts: 94
yip the code is the same, it just the language that changed thank this HAVSfunc is the best, and he even created LSFmod too

I like the idee of vaporsynth, he just use python, whay make a new script language when there is already script language

Last edited by monohouse; 31st January 2018 at 10:32.
monohouse is offline   Reply With Quote
Old 1st March 2018, 02:33   #27  |  Link
FNSCAR
Registered User
 
Join Date: Mar 2014
Posts: 7
Thanks for your work!
I have not install avisynth so I use AddAutoLoadDir() in this environment but it doesn't work.
Code:
c = core.avsw.Eval('AddAutoLoadDir("F:\x86\plugins+") TFM()', clips=[src], clip_names=["last"],avisynth=r'F:\x86\AviSynth.dll')
Just get "Avisynth 32-bit proxy: command failed".
And avisynth built-in functions e.g. selecteven() work well.
What mistakes have I made?
FNSCAR is offline   Reply With Quote
Old 1st March 2018, 08:19   #28  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 369
One way to debug it is to try to run your avs script in virtual dub first (copy avisynth dll inside vdubs dir) to see the error message. Could be a missing runtime dll.

Edit:
Also use "slave_log" parameter to see what's going on.
__________________
Search and denoise

Last edited by ChaosKing; 1st March 2018 at 08:23.
ChaosKing is online now   Reply With Quote
Old 1st March 2018, 08:57   #29  |  Link
FNSCAR
Registered User
 
Join Date: Mar 2014
Posts: 7
The avs script can be previewed in avspmod and I have tried to feed the avs script to x264.exe and it start to encode normally.
Code:
[observe @ :376] load avisynth DLL from 'F:\x86\AviSynth.dll'
[send_async @ :465] async send command type 0: 4294967295
[recv_thread_func @ :295] received command type 6: 4294967295 => 1
[observe @ :457] set script var 'last'
[observe @ :466] remote clip 0: 640x360 1/1/1
[send_async @ :465] async send command type 0: 4294967295
[recv_thread_func @ :295] received command type 7: 4294967295 => 2
[observe @ :501] begin eval script
AddAutoLoadDir("F:†\plugins+") TFM()[observe @ :503] end eval script
[send_async @ :465] async send command type 1: 4294967295
[run_loop @ :135] class avs::AvisynthError_: Script error: There is no function named 'TFM'.
This is my slave_log.
FNSCAR is offline   Reply With Quote
Old 1st March 2018, 09:12   #30  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 369
Quote:
There is no function named 'TFM'
- is it a 32bit dll?
- check for missing runtimes
- update to latest tivtc version https://github.com/pinterf/TIVTC/releases
__________________
Search and denoise
ChaosKing is online now   Reply With Quote
Old 1st March 2018, 09:38   #31  |  Link
FNSCAR
Registered User
 
Join Date: Mar 2014
Posts: 7
Thanks for your reply.
tivtc.dll is latest 32bit version from pinterf.
TIVTC is just an example.In fact I could not load any plugins with function AddAutoLoadDir() or LoadPlugin() if I used a portable avisynth.dll in avsproxy.
But if I installed avisynth,everything would be fine.

Last edited by FNSCAR; 1st March 2018 at 09:49.
FNSCAR is offline   Reply With Quote
Old 1st March 2018, 12:30   #32  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 369
As far as I remember the avisynth.dll also looks for DevIL.dll first and maybe for some other bundled dlls. Just copy all bundled dlls into the same folder and see if it helps
__________________
Search and denoise
ChaosKing is online now   Reply With Quote
Old 23rd March 2018, 09:49   #33  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 369
Does someone get a crash in vsedit preview with a simple 'info()'? Only this avs function crashes vsedit and only in preview. No error msg is shown. I'm using the latest avs+

Code:
[send_async @ :465] async send command type 0: 4294967295
[recv_thread_func @ :295] received command type 6: 4294967295 => 1
[observe @ :457] set script var 'last'
[observe @ :466] remote clip 0: 720x480 1/1/1
[send_async @ :465] async send command type 0: 4294967295
[recv_thread_func @ :295] received command type 7: 4294967295 => 2
[observe @ :501] begin eval script
info()[observe @ :503] end eval script
[send_avsvalue @ :575] local clip 0: 720x480 -1610612728
[send_async @ :465] async send command type 6: 4294967295
[recv_thread_func @ :295] received command type 8: 4294967295 => 3
[observe @ :517] GetFrame clip 0 frame 29827
[GetFrame @ :288] clip 0 frame 29827 not prefetched
[send_sync @ :492] sync send command type: 8
[send_async @ :465] async send command type 8: 0
[recv_thread_func @ :326] exit receiver thread after exception
[stop @ :363] stop IPC receiver thread
[stop @ :380] rethrow exception from receiver thread
[wmain @ :168] IPC error: remote process terminated unexpectedly
__________________
Search and denoise
ChaosKing is online now   Reply With Quote
Old 24th March 2018, 02:51   #34  |  Link
Stephen R. Savage
Registered User
 
Stephen R. Savage's Avatar
 
Join Date: Nov 2009
Posts: 336
Quote:
Originally Posted by ChaosKing View Post
Does someone get a crash in vsedit preview with a simple 'info()'? Only this avs function crashes vsedit and only in preview. No error msg is shown. I'm using the latest avs+
Works for me. Try without any plugins.

Code:
c = core.std.BlankClip(width=720, height=480, format=vs.YUV420P8)
c = core.avsw.Eval('Info()', clips=[c], clip_names=['last'], avisynth=AVISYNTH, slave=SLAVE)
c.set_output()
AviSynth+ r2580
VapourSynth r34
VapourSynth Editor r18
Stephen R. Savage is offline   Reply With Quote
Old 25th March 2018, 09:36   #35  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 369
I haven't change anything, but now it just works again. Must be something in my system :/
I only updated masktools ... but I doubt it had anything to do with it.
__________________
Search and denoise
ChaosKing is online now   Reply With Quote
Old 21st May 2018, 00:28   #36  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,130
Quote:
Originally Posted by Stephen R. Savage View Post
You can load 64-bit plugins directly.
AFAIK loading through AviSource doesn't allow passing clips and thus can only be used at the beginning of a script, while your script can be used anywhere in the script, so that's a big difference.
MysteryX is offline   Reply With Quote
Old 21st May 2018, 18:05   #37  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,460
Quote:
Originally Posted by MysteryX View Post
AFAIK loading through AviSource doesn't allow passing clips and thus can only be used at the beginning of a script, while your script can be used anywhere in the script, so that's a big difference.
Is that what you meant to say ?

Actually, AVISource only allows passing clips (including avs scripts), and you can call the clip anywhere in the script


Plugins are loaded either through this avsproxy plugin, or through avs.LoadPlugin through the compatibility wrapper
http://www.vapoursynth.com/doc/funct...pluginavs.html
poisondeathray is offline   Reply With Quote
Old 23rd May 2018, 18:27   #38  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,130
Quote:
Originally Posted by poisondeathray View Post
Is that what you meant to say ?

Actually, AVISource only allows passing clips (including avs scripts), and you can call the clip anywhere in the script.

Plugins are loaded either through this avsproxy plugin, or through avs.LoadPlugin through the compatibility wrapper
http://www.vapoursynth.com/doc/funct...pluginavs.html
http://www.vapoursynth.com/doc/plugins/avisource.html

I mean AviSource cannot be inserted in the middle of a VapourSynth task because it cannot take any clip to feed into the Avisynth script.

If I want to run Denoise in VapourSynth, Deshaker in Avisynth, and frame interpolation in VapourSynth, this can only be done using this avsproxy, not AviSource.

Quote:
Note that if you are really insane you can load Avisynth’s VirtualDub plugin loader and use VirtualDub plugins as well.
Saw this in the documentation. Was considering switching to VapourSynth and using the compatibility wrapper for Deshaker which is for VirtualDub. Does this work fine? I'm not crazy; on good days.

Last edited by MysteryX; 23rd May 2018 at 18:30.
MysteryX is offline   Reply With Quote
Old 24th May 2018, 03:19   #39  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,356
Quote:
Originally Posted by MysteryX View Post
http://www.vapoursynth.com/doc/plugins/avisource.html

I mean AviSource cannot be inserted in the middle of a VapourSynth task because it cannot take any clip to feed into the Avisynth script.

If I want to run Denoise in VapourSynth, Deshaker in Avisynth, and frame interpolation in VapourSynth, this can only be done using this avsproxy, not AviSource.


Saw this in the documentation. Was considering switching to VapourSynth and using the compatibility wrapper for Deshaker which is for VirtualDub. Does this work fine? I'm not crazy; on good days.
If you have AVS+ you'll already have a copy of VDubFilter.dll, loading that would be the way to go. The code isn't terribly difficult, I'd imagine I could convert it to pure VS in an evening if I had some time.
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order. ~ Ed Howdershelt
foxyshadis 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 16:52.


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