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: 1,795
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
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database

Last edited by ChaosKing; 18th January 2018 at 22:14.
ChaosKing is offline   Reply With Quote
Old 18th January 2018, 21:33   #22  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
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,100
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: 106
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: 5,346
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: 106
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: 10
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: 1,795
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.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database

Last edited by ChaosKing; 1st March 2018 at 08:23.
ChaosKing is offline   Reply With Quote
Old 1st March 2018, 08:57   #29  |  Link
FNSCAR
Registered User
 
Join Date: Mar 2014
Posts: 10
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: 1,795
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
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 1st March 2018, 09:38   #31  |  Link
FNSCAR
Registered User
 
Join Date: Mar 2014
Posts: 10
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: 1,795
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
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 23rd March 2018, 09:49   #33  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
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
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 25th March 2018, 09:36   #34  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
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.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 21st May 2018, 00:28   #35  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
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   #36  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
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   #37  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
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   #38  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
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.
foxyshadis is offline   Reply With Quote
Old 2nd December 2019, 14:58   #39  |  Link
vkusnyashka
Registered User
 
Join Date: Nov 2017
Posts: 12
del. Sorry, my problem is not related to this topic...

Last edited by vkusnyashka; 4th December 2019 at 16:47. Reason: my problem is not related to this topic
vkusnyashka is offline   Reply With Quote
Old 4th December 2019, 00:55   #40  |  Link
_Al_
Registered User
 
Join Date: May 2011
Posts: 321
I cannot confirm that, using this script:
Code:
import vapoursynth as vs
from vapoursynth import core
clip = core.std.BlankClip(width=200, height=200, color=[220, 0, 20])
matrix = core.resize.Bicubic(clip, format=vs.YUV420P8, matrix_s="470bg")
avs = core.avsw.Eval("trim(0,0)", clips=[matrix], clip_names=["last"])
I have same values for any pixel for both clip matrix and clip avs: YUV420P8 y:74 u:104 v:223 preview: r:219 g:0 b:19 (with obvious tiny errors because of YUV to RGB conversion for preview)

Last edited by _Al_; 4th December 2019 at 01:00.
_Al_ 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 22:13.


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