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. |
15th March 2021, 03:46 | #4241 | Link |
Registered User
Join Date: Dec 2017
Posts: 15
|
Thanks, I've got it working now. When you say to use DGSource/DGDecode instead of LSmash/FFmpeg, how would I go about implementing that? i.e. What DLLs would I need to download for the VS plugin folder, how should I write the code line in the editor itself, and what should I place in the Header, Executable, and Arguments boxes?
|
19th March 2021, 10:21 | #4242 | Link |
Registered User
Join Date: Sep 2007
Posts: 31
|
pip install has different version
I have installed VapourSynth via installer (VapourSynth64-R52.exe).
print(core.version()) for system wide python install says: VapourSynth Video Processing Library Copyright (c) 2012-2020 Fredrik Mellbin Core R52 API R3.6 Options: - If I create my own environment and add Vapoursynth via "pip install vapoursynth" says: print(core.version()) VapourSynth Video Processing Library Copyright (c) 2012-2020 Fredrik Mellbin Core R51 API R3.6 Options: - Documentation says: If installation via pip requires installation of VapourSynth beforehand I assume it referes to the global install (R52) but it says R51. So what version do I actually have when using pip in my own env and does it matter that it only shows R51 and can s.o. update PyPi to R52 that it matches again? Thanks |
23rd March 2021, 00:34 | #4243 | Link |
Registered User
Join Date: Jul 2010
Posts: 114
|
I am just wondering how to use the script here https://github.com/Selur/Vapoursynth...41Fun.py#L2885
if I use vapoursynth? I do not know what to do with it. Thanks and hope somebody could help. I would like to use the script or plugin of the detailsharpen. |
23rd March 2021, 01:19 | #4244 | Link | |
Registered User
Join Date: Nov 2018
Posts: 11
|
Quote:
Code:
import vapoursynth as vs from vapoursynth import core import G41Fun src = core.lsmas.LWLibavSource(clip) dsharped = G41Fun.DetailSharpen(src, z=4, sstr=1.5, power=4, ldmp=1, mode=1, med=False) dsharped.set_output() |
|
23rd March 2021, 05:23 | #4246 | Link |
Registered User
Join Date: Jul 2007
Posts: 106
|
I have some problem with MakeDiff in versions 50,51,52 :x
Code:
Script evaluation failed: Python exception: MakeDiff: both clips must have constant format and dimensions, and the same format and dimensions Traceback (most recent call last): File "src/cython/vapoursynth.pyx", line 2244, in vapoursynth.vpy_evaluateScript File "src/cython/vapoursynth.pyx", line 2245, in vapoursynth.vpy_evaluateScript File "/mnt/dod/04.vpy", line 11, in <module> clip = haf.QTGMC(clip, TFF=True, Preset="Placebo", ShowSettings=False, opencl=False, device=0, TR0=2, TR1=2, SourceMatch=0, TR2=0, Lossless=0, Sharpness=0 ) File "/usr/lib/python3.6/site-packages/havsfunc.py", line 1281, in QTGMC noise = core.std.MakeDiff(clip, denoised, planes=CNplanes) File "src/cython/vapoursynth.pyx", line 2069, in vapoursynth.Function.__call__ vapoursynth.Error: MakeDiff: both clips must have constant format and dimensions, and the same format and dimensions Code:
import vapoursynth as vs import havsfunc as haf core = vs.get_core() core.set_max_cache_size(16000) clip = core.ffms2.Source("//mnt//dod//movie.mkv") clip = core.fmtc.bitdepth (clip, bits=16, fulls=False, fulld=True, dmode=1) clip = haf.QTGMC(clip, TFF=True, Preset="Placebo", ShowSettings=False, opencl=False, device=0, TR0=2, TR1=2, SourceMatch=0, TR2=0, Lossless=0, Sharpness=0 ) clip = haf.MCTemporalDenoise(clip, radius=3, limit=2, twopass=False, limit2=2, refine=True, useTTmpSm=True, stabilize=False, maxr=3, TTstr=3, chroma=False, MVsharp=False, sigma=0, pfMode=-1,search=3, searchparam=4, pel=4, pelsearch=4, bwbh=512, owoh=256, blksize=4, overlap=2, deblock=False, post=0,bt=4,thSAD=2000, thSAD2=2000, thSCD1=1000, thSCD2=200) clip = core.deblock.Deblock(clip, quant=20, aoffset=0, boffset=0) clip = core.fmtc.bitdepth (clip, bits=10, fulls=True, fulld=True, dmode=1) clip.set_output() I removed this code from src/core/mergefilters.c and it started working fine and the video looks correct Code:
if (!isConstantFormat(d.vi) || !isSameFormat(d.vi, vsapi->getVideoInfo(d.node2))) { vsapi->freeNode(d.node1); vsapi->freeNode(d.node2); RETERROR("MakeDiff: both clips must have constant format and dimensions, and the same format and dimensions"); } Last edited by monohouse; 23rd March 2021 at 06:16. |
23rd March 2021, 15:02 | #4247 | Link | |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,781
|
Quote:
Or maybe I'm wrong. I noticed that StaxRip x64 ships both frameservers. But how to select either or mix both, may be better asked in his own thread about StaxRip. Last edited by LigH; 23rd March 2021 at 15:34. |
|
23rd March 2021, 16:15 | #4248 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
@LigH
I've expected a little more competence from somebody like you ... , right-click filters and choose: Filter Setup > VapourSynth After that: File > Save Project As Template > Load template on startup Vapoursynth is now your default frame server ready to use in staxrip, it currently has 60 vapoursynth plugins included, most of them with presets available in an easy-to-use menu. https://github.com/staxrip/staxrip/wiki/Tools
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists Last edited by stax76; 23rd March 2021 at 16:26. |
23rd March 2021, 17:46 | #4249 | Link | |
Registered User
Join Date: Jul 2010
Posts: 114
|
Quote:
|
|
23rd March 2021, 17:55 | #4250 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
It seems it is aready included https://github.com/staxrip/staxrip/wiki/Tools#g41fun
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
23rd March 2021, 18:37 | #4251 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
@jinkazuya
Yes, it appears it was included by an ex maintainer, but it might not be available in the menu, for that there is documentation here: https://github.com/staxrip/staxrip/w...deo-processing https://github.com/staxrip/staxrip/w...%29-in-StaxRip
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists |
23rd March 2021, 20:43 | #4252 | Link | ||
Registered User
Join Date: Jul 2010
Posts: 114
|
Quote:
Quote:
|
||
23rd March 2021, 22:54 | #4253 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
@jinkazuya
Please create a new thread (or use the staxrip thread) asking for code and default values and then add this code and values to the following wiki page: Tool Update Requests
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists Last edited by stax76; 23rd March 2021 at 22:57. |
24th March 2021, 13:01 | #4254 | Link | |
unsigned int
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
|
Quote:
Code:
print(clip) print(denoised)
__________________
Buy me a "coffee" and/or hire me to write code! |
|
27th March 2021, 00:50 | #4255 | Link |
Registered User
Join Date: Jan 2015
Posts: 286
|
Hello everybody. I need your help with the following problem:
I have this code in my avs.c: Code:
h->bit_depth = h->func.avs_bits_per_component(vi); FAIL_IF_ERROR( h->bit_depth < 8 || h->bit_depth > 16, "unsupported bit depth `%d'\n", h->bit_depth ); if( h->bit_depth & 7 ) { AVS_Value arg_arr[2]; arg_arr[0] = res; arg_arr[1] = avs_new_value_int( 16 ); const char *arg_name[] = { NULL, "bits" }; AVS_Value res2 = h->func.avs_invoke( h->env, "ConvertBits", avs_new_value_array( arg_arr, 2 ), arg_name ); FAIL_IF_ERROR( avs_is_error( res2 ), "couldn't convert to 16 bits: %s\n", avs_as_error( res2 ) ); res = update_clip( h, &vi, res2, res ); } Code:
h->bit_depth = vi->format->bitsPerSample; FAIL_IF_ERROR( h->bit_depth < 8 || h->bit_depth > 16, "unsupported bit depth `%d'\n", h->bit_depth ); FAIL_IF_ERROR( vi->format->sampleType == stFloat, "unsupported sample type `float'\n" ); if (h->bit_depth & 7) { VSMap* args = h->vsapi->createMap(); const char* error; VSPlugin* fmtcPlugin = h->vsapi->getPluginById("fmtconv", core); h->vsapi->propSetNode(args, "clip", h->node, paReplace); h->vsapi->freeNode(h->node); const VSFormat* new_format = h->vsapi->registerFormat(vi->format->colorFamily, vi->format->sampleType, 16, vi->format->subSamplingW, vi->format->subSamplingH, core); h->vsapi->propSetInt(args, "csp", new_format->id, paReplace); VSMap* ret = h->vsapi->invoke(fmtcPlugin, "bitdepth", args); error = h->vsapi->getError(ret); if (error) { FAIL_IF_ERROR(1, "failed to convert node to 16 bits: `%s'\n", error); h->vsapi->freeMap(args); h->vsapi->freeMap(ret); return -1; } h->node = h->vsapi->propGetNode(ret, "clip", 0, NULL); h->vsapi->freeMap(ret); } Last edited by Patman; 27th March 2021 at 12:27. |
27th March 2021, 06:00 | #4256 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
if you have a C++20 compiler (I guess GCC11 is currently the only option), you can play with my C++ wrapper for VS API and coding a plugin is no more complicated than python scripting.
if you need to invoke an external filter as some sort of preprocessing, you can do it directly in the constructor of the filter Code:
MyFilter(auto Arguments, auto Core) { auto PreprocessedClip = Core["fmtc"]["bitdepth"]("clip", Arguments["clip"], "bits", 16); } |
27th March 2021, 06:17 | #4257 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
and no error checking of any sort is required (unless you need to change how your filter behaves based on if an evaluation fails), the error message (plugin not found, evaluation failed, or whatever) will automatically propagate to the console (vsedit, vspipe, etc.)
|
27th March 2021, 11:09 | #4259 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
He/She didn't mention what it is that he/she's working on so I wouldn't have known. and since x264 already relies on GCC, it should be pretty handy for him/her to use the C++ wrapper (C99, the standard that x264 seems to be using, is mostly a subset of C++20 after all).
|
Tags |
speed, vaporware, vapoursynth |
Thread Tools | Search this Thread |
Display Modes | |
|
|