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. |
27th December 2017, 23:07 | #1 | Link | |
Registered User
Join Date: Nov 2009
Posts: 327
|
How to run Avisynth scripts within VapourSynth
README:
Quote:
Code:
import vapoursynth as vs core = vs.get_core() red = core.std.BlankClip(color=[255, 0, 0]) green = core.std.BlankClip(color=[0, 255, 0]) # Before executing the Avisynth script, "r" and "g" are set to the bound clips. c = core.avsw.Eval("Merge(r, g)", clips=[red, green], clip_names=["r", "g"]) c.set_output() Last edited by Stephen R. Savage; 13th January 2018 at 18:48. |
|
28th December 2017, 01:53 | #2 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,804
|
NICE!!
Code:
c = core.std.BlankClip(color=[255, 0, 0]) c = core.avsw.eval('AddAutoloadDir("D:\\AvisynthRepository\\SCRIPTS") mpeg2source("D:\\01.d2v") AnimeIVTC(mode=1)', clips=[c], clip_names=["last"]) clip=c This avs script crashed via Avisource and with avfs.exe, but avsproxy is stable. Two questions: - Is it possible to use avisynth x64 with this filter? - Would be a "portable" avisynth possible as long as avisynth.dll is in the same folder? (or via path parameter in avsw)
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database Last edited by ChaosKing; 28th December 2017 at 01:56. |
28th December 2017, 02:15 | #3 | Link | ||
Registered User
Join Date: Nov 2009
Posts: 327
|
Quote:
Quote:
Last edited by Stephen R. Savage; 28th December 2017 at 02:18. |
||
28th December 2017, 14:46 | #4 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,797
|
Holy smoke, thank you very much! I've been waiting to get my hands on SmoothD2 in 64-bit Vapoursynth since we are still waiting for a proper port, and with this tool, it's possible
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
28th December 2017, 16:53 | #5 | Link | |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,804
|
Quote:
And loading my sample script via VFW aka Avisource is not possible -> instant crash in VS ( No problems in Virtualdub-64). That's why I asked if x64 would possible.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
|
28th December 2017, 18:36 | #6 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,579
|
Instant crash? Does it output any error like bad mmx state if you try to output it with vspipe?
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
28th December 2017, 19:44 | #7 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,804
|
No output. Tested like this with R41-test4
Code:
.\VSPipe.exe -i 'D:\Test.vpy' . Code:
clip = core.avisource.AVISource(r'D:\ivtc.avs') clip.set_output() Code:
AddAutoloadDir("D:\AvisynthRepository\SCRIPTS") mpeg2source("D:\01\VTS_01_CHAPTER_03_1.d2v") tfm(mode=6, PP=5, slow =2, d2v="D:\01\VTS_01_CHAPTER_03_1.d2v") <- bad boy But this forced me to switch to vivtc, and after some conditionalDeintStillCombed magic I got similar/better results.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database Last edited by ChaosKing; 28th December 2017 at 19:47. |
28th December 2017, 20:27 | #8 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,579
|
Quote:
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
28th December 2017, 22:26 | #9 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,804
|
Here is my x64 r2544 avs folder (plugins, scripts & sample script)
LINK //EDIT Same crash with r2580
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database Last edited by ChaosKing; 28th December 2017 at 22:34. |
29th December 2017, 00:01 | #10 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,804
|
Thx, woking now. Loading an external avisynth.dll too!
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
29th December 2017, 17:47 | #11 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,579
|
Quote:
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
30th December 2017, 19:49 | #12 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,579
|
Quote:
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
30th December 2017, 20:22 | #13 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,804
|
Code:
vapoursynth.Error: Avisynth read error: CAVIStreamSynth: System exception - Access Violation at 0x000001D41A5DB6D0 2017-12-30 20:16:58.862 Core freed but 460800 bytes still allocated in framebuffers Core freed but 460800 bytes still allocated in framebuffers 2017-12-30 20:17:05.392 Bad MMX state detected when creating new core
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
30th December 2017, 20:29 | #14 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,579
|
Quote:
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
30th December 2017, 20:37 | #15 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,804
|
Working now. I had an old x64 TIVTC.dll from 2010, don't know why :-/
No problems with: https://github.com/pinterf/TIVTC/releases EDIT: I guess I took it from this (outdated) list http://avisynth.nl/index.php/AviSynth%2B_x64_plugins EDIT2: But it's still interessting that it only crashes in VS and not in VdubMod
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database Last edited by ChaosKing; 30th December 2017 at 20:48. |
7th January 2018, 11:07 | #16 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,804
|
I should be able to pass a VS clip to Avisynth, right?
Because this works Code:
c = core.avsw.eval('blankclip() Subtitle("Hello world!") ') Code:
c = core.std.BlankClip(color=[255, 0, 0]) c = core.avsw.eval('Subtitle("Hello world!") ', clips=[c], clip_names=["last"])
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
8th January 2018, 01:27 | #17 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,804
|
The original from Soureforge works, also 2.6 (MT) from here https://forum.doom9.org/showthread.php?t=148782
But the colors are shifted https://www.dropbox.com/s/7lft4ek963...color.PNG?dl=0 AVS+ would be nice for 16bit support (if possible)
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database Last edited by ChaosKing; 8th January 2018 at 01:29. |
13th January 2018, 11:55 | #18 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,804
|
I totally forgot about stack16, thanks for the reminder!
Found a new issue: I tried CropResize from here https://forum.doom9.org/showthread.php?t=175114 with Autocrop, but it gets stuck. Without AutoC=true it's ok. There's no output in vspipe. tested with avs+ and 2.6 Code:
core.avsw.Eval('AddAutoloadDir("D:\AvisynthRepository\SCRIPTS") pCropResize(AutoC=true)', clips=[c], clip_names=["last"], slave_log=r"D:\x.txt", avisynth =r"D:\AvisynthRepository\AVSPLUS_x86\Avisynth.dll") Code:
[observe @ :376] load avisynth DLL from 'D:\AvisynthRepository\AVSPLUS_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: 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 AddAutoloadDir("D:\AvisynthRepository\SCRIPTS") pCropResize(AutoC=true)[observe @ :503] end eval script [GetFrame @ :288] clip 0 frame 1 not prefetched [send_sync @ :492] sync send command type: 8 [send_async @ :465] async send command type 8: 0
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
15th January 2018, 00:54 | #19 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,804
|
Works flawlessly
EDIT: currently an avs error msg is not show like in virtualdub (or any other tool). It would be nice to see the actual avs error rather than "vapoursynth.Error: Avisynth 32-bit proxy: command failed". It's a nice to have feature (and if it isn't too hard to implement)
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database Last edited by ChaosKing; 15th January 2018 at 01:02. |
18th January 2018, 19:51 | #20 | Link | |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,797
|
Quote:
Code:
import vapoursynth as vs core = vs.get_core() core.avs.LoadPlugin(r'C:\\Program Files\\VapourSynth\\avs64\DGDecodeNV.dll') c = core.avs.DGSource(r'C:\Temp\test.dgi') clp = core.avsw.eval('SmoothD2(quant=2, shift=4)', clips=[c], clip_names=["last"]) clp.set_output()
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|