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 22nd September 2021, 00:27   #1  |  Link
markfilipak
Registered User
 
markfilipak's Avatar
 
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly San Jose, California)
Posts: 227
How do I start vsedit's 'engine'?

In vsedit, Script > Check script
Quote:
-------------------------------------
import vapoursynth as vs
core = vs.get_core()
-------------------------------------
Log
-------------------------------------
Failed to get the script output node.
-------------------------------------
I can't even succeed with what vsedit loads as default.

What am I doing wrong?

The 1st thing I want to do is 'core.svp1.list_functions()' but don't even know how to 'start the engine'.

Extensive searches have not brought Joy, so I'm here for help.

Thank You!
Mark.
markfilipak is offline   Reply With Quote
Old 22nd September 2021, 01:32   #2  |  Link
Yomiko
Registered User
 
Join Date: Aug 2021
Posts: 39
http://www.vapoursynth.com/doc/getti...example-script

vsedit is for previewing a video clip, for your case you may run in a python interpreter
Yomiko is offline   Reply With Quote
Old 22nd September 2021, 01:50   #3  |  Link
markfilipak
Registered User
 
markfilipak's Avatar
 
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly San Jose, California)
Posts: 227
Quote:
Originally Posted by Yomiko View Post
http://www.vapoursynth.com/doc/getti...example-script

vsedit is for previewing a video clip, for your case you may run in a python interpreter
Thanks, Yomiko,
I ran 'python.exe' and submitted
Code:
Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)] on win32
>>> import vapoursynth as vs
>>> core = vs.get_core()
<stdin>:1: DeprecationWarning: get_core() is deprecated. Use "vapoursynth.core" instead.
>>> import vapoursynth as vs
>>> core = vs.core()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'vapoursynth._CoreProxy' object is not callable
>>>
I apologize for being ignorant. Is there a starter guide for this?
markfilipak is offline   Reply With Quote
Old 22nd September 2021, 01:56   #4  |  Link
markfilipak
Registered User
 
markfilipak's Avatar
 
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly San Jose, California)
Posts: 227
Actually, I guess you did help me make some progress. Look:
Code:
>>> core.svp1.list_functions()
'Analyse(clip:clip; sdata:int; src:clip; opt:data)\nSuper(clip:clip; opt:data)\n'
>>> core.svp2.list_functions()
'SmoothFps(clip:clip; super:clip; sdata:int; vectors:clip; vdata:int; opt:data; src:clip:opt; fps:float:opt)\n'
>>>
Is there a python environment browser (like a web browser) so I can hack the trees of the various built-in objects and methods?
markfilipak is offline   Reply With Quote
Old 22nd September 2021, 02:03   #5  |  Link
Yomiko
Registered User
 
Join Date: Aug 2021
Posts: 39
One of the following is sufficient
Code:
core = vs.core
Code:
from vapoursynth import core
> Is there a python environment browser
I'm interested in it too. Usually I end up moving to filter release pages.
Yomiko is offline   Reply With Quote
Old 22nd September 2021, 04:20   #6  |  Link
markfilipak
Registered User
 
markfilipak's Avatar
 
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly San Jose, California)
Posts: 227
Quote:
Originally Posted by Yomiko View Post
... > Is there a python environment browser
I'm interested in it too ...
You are! Do you know python?

When javascript and the DOM (document object model) were new, I managed to write such an object and property browser. The breakthrough came when I stumbled upon the global constructors, and that only because built-in objects have a '.__constructor' property that returned the constructor of that particular object's class. I don't know python except that it's object oriented. Does it have constructors? Can users write their own constructors? I would think so. Perhaps the snake lovers will help with the answer, eh?
markfilipak is offline   Reply With Quote
Old 22nd September 2021, 06:33   #7  |  Link
Julek
Registered User
 
Julek's Avatar
 
Join Date: Dec 2020
Posts: 29
Quote:
Originally Posted by markfilipak View Post
Failed to get the script output node.
Isn't that the message that pops up when you open the old vsedit in an API4 installation?
Julek is offline   Reply With Quote
Old 22nd September 2021, 16:20   #8  |  Link
markfilipak
Registered User
 
markfilipak's Avatar
 
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly San Jose, California)
Posts: 227
Quote:
Originally Posted by Julek View Post
Isn't that the message that pops up when you open the old vsedit in an API4 installation?
I don't know, Julek. I'm running the latest version. Confession: I don't know what 'API4' means.

"Failed to get the script output node" appears in the 'Log' panel and it prevents vsedit use.

Overall, I've done some pretty outrageous processing with VapourSynth but vsedit seems a dead loss. ...Pitty.

Thanks to Yomiko's push, I can do what I want directly in the python interpreter except that I can't work with vsedit. Perhaps in the future vsedit will perform a mind meld with the python interpreter and become a complete 'person'.

Last edited by markfilipak; 22nd September 2021 at 16:27.
markfilipak is offline   Reply With Quote
Old 22nd September 2021, 17:09   #9  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 360
No one mentioned this, so try https://github.com/YomikoR/VapourSyn.../tag/r19-mod-2. It supports APIv4 builds (Vapoursynth R55).

> I don't know what 'API4' means.
APIv3 is a general use API that Vapoursynth used from Nov 11, 2012 to Sep 20, 2021. APIv4 is the current, up-to-date API with audio support and various internal improvements. Note that some APIv3 stuff got removed from APIv4, so there are few breaking changes, mostly all of them got a workaround nowadays.
__________________
Me on GitHub
PC Specs: Ryzen 5950X, 64 GB RAM, RTX 2070
DJATOM is offline   Reply With Quote
Old 23rd September 2021, 01:26   #10  |  Link
Yomiko
Registered User
 
Join Date: Aug 2021
Posts: 39
Quote:
Originally Posted by Julek View Post
Isn't that the message that pops up when you open the old vsedit in an API4 installation?
Nah, it's because there's no set_output in the script. For old vsedit with new api the message is usually about invoking core.resize to compat format.
Yomiko is offline   Reply With Quote
Old 23rd September 2021, 04:27   #11  |  Link
markfilipak
Registered User
 
markfilipak's Avatar
 
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly San Jose, California)
Posts: 227
Quote:
Originally Posted by Yomiko View Post
... > Is there a python environment browser
I'm interested in it too.
Yomiko,

Try these to see some things.

>>> from vapoursynth import core
>>> core.list_functions
>>> core.list_functions()
>>> core.acrop.list_functions()
>>> core.__getattr__

A day ago or so I wrote about when I wrote a DOM browser shortly after the DOM was invented. I wrote that I stumbled across a built-in object's '.__constructor' property. I was wrong -- that was over 20 years ago. The property -- properties are called "attributes" in python -- was actually '.__prototype' -- the discovery that every DOM object has a '.__prototype' property was like finding the key to a lock on a door that needed to be opened. ...But the rest of my story was correct.

Methods like 'core.__getattr__' (and others to be discovered) are the keys to making an interactive python run-time system browser. I currently have too many balls in the air to devote time to it. But if you want to try, and will keep me updated, I'll try to help if you get stuck. Basically, it means guessing the names of fundamental run-time objects, object attributes, object methods, and functions. PM me if you like. If you're successful, it will benefit you, me, and others I'm sure.

Regards,
Mark.
markfilipak is offline   Reply With Quote
Old 23rd September 2021, 04:41   #12  |  Link
markfilipak
Registered User
 
markfilipak's Avatar
 
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly San Jose, California)
Posts: 227
Quote:
Originally Posted by Yomiko View Post
Quote:
Originally Posted by Julek View Post
Isn't that the message that pops up when you open the old vsedit in an API4 installation?
Nah, it's because there's no set_output in the script. For old vsedit with new api the message is usually about invoking core.resize to compat format.
I tried several variations on 'set_output' but none worked, probably because I don't know python run-time architecture. But if you take the time to hack (or find) a python run-time browser, that will change. Otherwise, the run-time system remains a mystery.
markfilipak is offline   Reply With Quote
Old 23rd September 2021, 06:17   #13  |  Link
Yomiko
Registered User
 
Join Date: Aug 2021
Posts: 39
Quote:
Originally Posted by markfilipak View Post
I tried several variations on 'set_output' but none worked, probably because I don't know python run-time architecture. But if you take the time to hack (or find) a python run-time browser, that will change. Otherwise, the run-time system remains a mystery.
I doubt you've made things unnecessarily complicated. If you have a video clip to preview, put clip.set_output() in the end of your script and use vsedit / vspreview, because in python we won't create a playback window in a few lines. Otherwise work in the interpreter because you want the texts in stdout / stderr.
Yomiko 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 00:45.


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