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. |
2nd February 2021, 05:27 | #4181 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
plugin path: https://github.com/IFeelBloated/vsFi...Plugin.vxx#L59
script path: https://github.com/IFeelBloated/Vapo...orMagik.py#L71 |
2nd February 2021, 11:52 | #4182 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
The "vs plugin folder" is also harder to determine. Basically you have 3 locations: 1. The core plugins 2. The global plugins 3. User plugins The location of 2 is written to the registry and 3 is always in the same appdata location. Why do you even need to find out where things are?
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
2nd February 2021, 12:09 | #4183 | Link | |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Quote:
|
|
2nd February 2021, 12:28 | #4184 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
For plugins http://www.vapoursynth.com/doc/plugins.html#windows
vsrepogui just uses the paths provided by vsrepo. But registry can be tricky if the user has installed 32bit vapoursynth or it is a "per user installation". I need to check 4 locations in vsrepogui to cover all cases. Code:
var regl32 = new VsRegistry().GetRegistry(localKey32, @"SOFTWARE\VapourSynth-32"); var regl64 = new VsRegistry().GetRegistry(localKey64, @"SOFTWARE\VapourSynth"); var regu32 = new VsRegistry().GetRegistry(userKey32, @"SOFTWARE\VapourSynth-32"); var regu64 = new VsRegistry().GetRegistry(userKey64, @"SOFTWARE\VapourSynth"); userKey* => RegistryHive.CurrentUser EDIT vsrepo code for scripts https://github.com/vapoursynth/vsrep...vsrepo.py#L186 Code:
import site site_package_dir = site.getusersitepackages()
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database Last edited by ChaosKing; 2nd February 2021 at 12:42. |
3rd February 2021, 19:57 | #4186 | Link |
Registered User
Join Date: Jul 2019
Location: Russia
Posts: 87
|
How should such a video be indexed?
Code:
Format : AVI Format/Info : Audio Video Interleave Commercial name : DV Format profile : OpenDML Overall bit rate mode : Constant Overall bit rate : 30 Mb/s Video ID : 0 Format : DV Codec ID : dvsd Codec ID/Hint : Sony Bit rate mode : Constant Width : 720 pixels Height : 480 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 29.970 (30000/1001) FPS Original frame rate : 29.970 (29970/1000) FPS Standard : NTSC Color space : YUV Chroma subsampling : 4:1:1 Bit depth : 8 bits Scan type : Interlaced Scan order : Bottom Field First Compression mode : Lossy |
3rd February 2021, 20:04 | #4187 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
You can open that with ffms2 or L-Smash-Source.
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists |
4th February 2021, 13:40 | #4190 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
does anyone actually need half precision (fp16) facilities and does any plugin actually provide support for it? I don't really wanna have it in my project and I have very good reasons:
1) there's no native support for fp16 in standard C/C++ and most CPUs provide very little or no support for it, meaning you will have to create your homegrown software-emulated fp16 type. it's not portable and it's very likely that it will be way slower than fp32 which comes with native hardware support. 2) unlike fp32 and fp64 which are universally well defined (literally every implementation out there adopts the representation defined by IEEE 754), the representation of fp16 varies on different platforms. there's the IEEE fp16, and BFloat16 (Google TPU), and who knows what else! applying arithmetic operations defined for one fp16 representation on another fp16 representation leads to garbage result. The user (or maybe even the developer) usually has absolutely no clue which fp16 representation is being used and all sorts of weird shit can happen. It might be better to avoid all this by simply not supporting fp16. |
4th February 2021, 13:44 | #4191 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
2. Obviously it's whatever the cpu native fp16 format is, just like with other floats. So IEEE all the way on x86 (and just about all sane cpus). Support is mostly pointless.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
5th February 2021, 11:16 | #4193 | Link |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
What function do I use to retrieve warning message from the api? If I run a script with clip = core.get_core() in PyCharm it'll give me a nice deprecated warning, but in vseditor I couldn't find a function that can do that. the getError() only return on fatal error like frame failed to load.
|
5th February 2021, 11:26 | #4194 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
https://github.com/vapoursynth/vapou...ynth.pyx#L2337
it has nothing to do with VS per se. you just have to find a way to utilize python's warnings module in your application. |
6th February 2021, 01:36 | #4196 | Link | |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Quote:
|
|
6th February 2021, 08:20 | #4197 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
you can use vaporsynth's FFI facilities to execute arbitrary python code in your C++ programs. you need to:
1) define a python function that does what you want, in this case, the function should collect all warning messages from warnings and return them as a list of strings. 2) pass the function to a special filter and execute it, in this case, you can instantly execute the acquired function in your filter's constructor, then call Core.Alert() to send all warning messages to console. |
6th February 2021, 17:18 | #4198 | Link | |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Quote:
|
|
6th February 2021, 17:40 | #4199 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
https://github.com/IFeelBloated/vsFi...e/Function.vxx
and use it to run python code thru a special filter Code:
struct PythonEval { static constexpr auto Name = "PythonEval"; static constexpr auto Signature = "code:func;"; PythonEval(auto Arguments, auto Core) { for (auto PythonCode = static_cast<Function>(Arguments["code"]); auto&& WarningMessage : PythonCode()) Core.Alert(static_cast<std::string>(WarningMessage)); } }; |
7th February 2021, 07:51 | #4200 | Link |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
This is what I found to catch the warnings:
Code:
import warnings with warnings.catch_warnings(record=True) as warning_list: core = vs.get_core() clip = core.dgdecodenv.DGSource(r'hello.dgi') clip.set_output() for warning in warning_list: print(warning.message) |
Tags |
speed, vaporware, vapoursynth |
|
|