Selur's Little Message Board
[INFO] About Vapoursynth Filter Order/Queue - Printable Version

+- Selur's Little Message Board (https://forum.selur.net)
+-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html)
+--- Forum: General Hybrid Infos (https://forum.selur.net/forum-2.html)
+--- Thread: [INFO] About Vapoursynth Filter Order/Queue (/thread-1753.html)



About Vapoursynth Filter Order/Queue - Selur - 27.02.2021

Hybrid does not allow the user you randomly write it's own code mainly because it's a pain to debug.

To give the user some control over the generated script aside Hybrid offers two methods
a. a filter order with custom additions
b. a filter queue with custom additions

Filter Order:
When 'Filter Order' is used (this is the default), all available filters (some combined in a group) and be called once inside a script.
The order in which they can be called is defined by the 'Filter Order' (Filtering->Vapoursynth->Misc->Filter Order/Queue).
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 need 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.
Additionally to the ability to rearrange 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 possibily) 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 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
# frametype F
with:
  • X from [48-32768]
  • Y from [48-32768]
  • S being from [progressive, telecine, bff, tff]
  • F from [1-999.0000] (int or double, with '.' as separator, so no ',')

Filter Queue:
Supporting a filter queue instead of using a more resticted filter order allows the user to:
  • add most filters multiple times (atm. Deinterlacers, Crop, Rotation, FrameInterpolation, Resize, Letterboxing, AddingSubtitle can only be added once, since I didn't get time to write code for adding them multiple times)
  • the order of filters can be rearranged with the same restriction to this freedom of ordering like in the filter queue: crop < rotate < resize < letterbox.
  • custom additions can be added anywhere.
Note that this freedom comes at a price, when using the filter queue, the user not only must decide which filter he wants to use, he must actively add the filter settings to the filter queue and adjust it's positition as needed.
Filter Queue always contains entries for:
  • Deinterlace
  • Rotation
  • Crop
  • Frameinterpolation
  • Resize
  • Letterboxing
  • AddingSubtitle
These are auto generated from the settings in the gui.

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.

Cu Selur