![]() |
|
[INFO] About Vapoursynth FilterControl (Order/Queue/Nodes) - Printable Version +- Selur's Little Message Board (https://forum.selur.net) +-- Forum: Talk, Talk, Talk (https://forum.selur.net/forum-5.html) +--- Forum: General Hybrid Infos (https://forum.selur.net/forum-2.html) +--- Thread: [INFO] About Vapoursynth FilterControl (Order/Queue/Nodes) (/thread-1753.html) |
About Vapoursynth FilterControl (Order/Queue/Nodes) - Selur - 27.02.2021 Hybrid does not allow users to freely write their own script, mainly because that would be a pain to debug. To give the user some control over the generated script, Hybrid offers three methods: a. a filter order with custom additions b. a filter queue with custom additions c. a node editor, a graphical view of the filter queue All three are selected in Filtering->Vapoursynth->Misc->Filter Control. Filter Order: When 'Filter Order' is used (this is the default), each available filter (some combined in a group) can be called once inside a script. The order in which they are called is defined by the 'Filter Order' (Filtering->Vapoursynth->Misc->Filter Control). One can change the order of the filters using the 'Filter Order' controls. Note that there is one restriction to this freedom of ordering: crop < rotate < resize < letterbox This means that cropping always needs to be done before rotating, which always needs to be done before resizing, which always needs to be done before letterboxing. This restriction exists since I otherwise would have to rewrite the resize/letterbox/output resolution calculation, which would be a real pain and cost more time than I'm willing to spend on it. In addition to rearranging the filters through the filter order, a user can add custom additions to the script before each of the filters/filter groups in the filter order. Filter Order + Custom addition: When adding a custom addition, be aware that Hybrid does not validate the code you write there. So if you write something that isn't proper Vapoursynth code, it will break the script. Also keep in mind that Hybrid disables (as far as possible) any autoloading of Vapoursynth, so make sure the filters and scripts you use are either already included in the script or get actively loaded in the custom section. Also, if your custom addition changes width, height, scantype, colorformat or framerate, let Hybrid know. Hybrid will scan the custom code for lines like: # width X
# height Y
# scantype S
# framerate F
Filter Queue: Supporting a filter queue instead of the more restricted filter order allows the user to:
The Filter Queue always contains entries for:
Filter Queue + Custom: Unlike with the filter order, adding a custom addition to the filter queue can be done more freely, but hinting width, height etc. is still required. Node Editor: When 'Node Editor' is selected, a 'Node Editor' button appears next to the mode selection, which opens the editor in its own window. The node editor is not a separate system: it is just another view of the filter queue. The filters connected between the 'Video Input' node and the 'Video Output' node are the filter queue, so the same chain creates the same script as in 'Filter Queue' mode. While the node editor is active, the filter queue list stays visible (it shows the current chain), but its buttons are disabled.
Switching back to 'Filter Queue' keeps the queue. Switching to 'Filter Order' behaves like disabling the filter queue. Node Editor + Custom: A 'Custom code' node can be placed anywhere in the chain. Same rules as for the other custom additions: Hybrid does not validate the code, and autoloading (on Windows) is disabled. The property panel of a custom node offers the hint lines (# scantype, # colorformat, # width, # height, # framerate, # colormatrix, # lumascale, # requires ..., # additional output ...) as controls. Checked hints are written at the top of the code; hints you type by hand fill in the controls. 'Apply code' writes the node. Cu Selur |