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. |
18th February 2021, 03:02 | #4221 | Link |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
What is the correct scenario for use of setting max cache size? I have a 1080i source with QTGMC(Preset='Medium'), setting max cache size to 4000 MB will give me a "script exceeded memory limit" warning, raising it to 12,000 MB will clear the warning, but there is no difference in speed on benchmark at 41 fps.
|
23rd February 2021, 12:29 | #4222 | Link | |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Quote:
Code:
import logging import warnings class MessageAbsorber(logging.Handler): def __init__(self, MessageContainer): logging.Handler.__init__(self) self.MessageContainer = MessageContainer def emit(self, MessageRecord): self.MessageContainer += [MessageRecord.getMessage()] WarningMessages = [] warnings.simplefilter('always') logging.captureWarnings(True) logging.getLogger('py.warnings').addHandler(MessageAbsorber(WarningMessages)) # user script goes here core.vsedit.PrintWarnings(WarningMessages) |
|
28th February 2021, 17:44 | #4223 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
@Myrsloik
could you add Code:
const char* getPluginName(VSPlugin*); const char* getPluginNamespace(VSPlugin*); const char* getPluginIdentifier(VSPlugin*); const char* getPluginFunctionArguments(VSPlugin*, const char* functionName); |
8th March 2021, 21:47 | #4225 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Maybe this mpls reader can help https://github.com/HomeOfVapourSynth...Synth-ReadMpls
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
11th March 2021, 12:47 | #4228 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
Quote:
fmFrameState and fmSerial are still separate things.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
11th March 2021, 13:36 | #4230 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
Never mind, fmFrameState = fmSerial. I renamed it so people won't think it makes frame accesses more linear which is a common confusion.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
13th March 2021, 00:53 | #4231 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,259
|
Got a question:
In case it use SelectEvery to split a clip into two clips: Code:
clipA = core.std.SelectEvery(clip=clip, cycle=5, offsets=[0 3 4]) clipB = core.std.SelectEvery(clip=clip, cycle=5, offsets=[1 2]) and apply some additional filters to those clips, how can I weave those two clips properly together again? Is there some sort of advanced Interleave which I could use with the offsets I used before. Alternatively: How can I apply a filter only to specific frames which follow a pattern (given by cycle and offsets)? Cu Selur Ps.: may be using https://github.com/Irrational-Encodi...th-RemapFrames ? Last edited by Selur; 13th March 2021 at 00:56. |
13th March 2021, 02:09 | #4232 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,346
|
Quote:
Or ugly "old fashioned" way Code:
clipA = core.std.SelectEvery(clip, cycle=5, offsets=[0, 3, 4]) clipB = core.std.SelectEvery(clip, cycle=5, offsets=[1, 2]) clipA0 = core.std.SelectEvery(clipA, cycle=3, offsets=[0]) clipA3 = core.std.SelectEvery(clipA, cycle=3, offsets=[1]) clipA4 = core.std.SelectEvery(clipA, cycle=3, offsets=[2]) clipB1 = core.std.SelectEvery(clipB, cycle=2, offsets=[0]) clipB2 = core.std.SelectEvery(clipB, cycle=2, offsets=[1]) int = core.std.Interleave(clips=[clipA0,clipB1,clipB2,clipA3,clipA4]) |
|
13th March 2021, 23:53 | #4235 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
Nope. There's no api guarantee at all for order. There is however an internal tag that keeps track of the request number and takes it into consideration when scheduling things so most of the time things will be kinda in order.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
14th March 2021, 02:30 | #4236 | Link | |
Registered User
Join Date: May 2011
Posts: 321
|
Quote:
Code:
import vapoursynth as vs from vapoursynth import core clip = core.std.BlankClip(format=vs.YUV420P8, color =(100,128,128)) def bright(clip): return clip.std.Expr(["x 40 +","",""]) def dark(clip): return clip.std.Expr(["x 40 -","",""]) DISTRIBUTE_FILTER = { 0: bright, 1: dark, 2: dark, 3: bright, 4: bright, } clip_out = clip.std.FrameEval(lambda n: DISTRIBUTE_FILTER[n % len(DISTRIBUTE_FILTER)](clip)) clip_out.set_output() Code:
import functools def distribute_filter(n,clip=clip): return DISTRIBUTE_FILTER[n % len(DISTRIBUTE_FILTER)](clip) clip_out = core.std.FrameEval(clip, functools.partial(distribute_filter,clip=clip)) Last edited by _Al_; 14th March 2021 at 02:40. |
|
15th March 2021, 01:46 | #4237 | Link |
Registered User
Join Date: Dec 2017
Posts: 15
|
I'm attempting to decomb a video clip using TDeintMod, but it keeps outputting an error that I have no idea how to solve.
Script: Code:
import vapoursynth as vs core = vs.get_core() core.max_cache_size = 32768 clip = r'D:\Video\1.mkv' #replace with your video file def conditionalDeint(n, f, orig, deint): if f.props['_Combed']: return deint else: return orig deint = core.tdm.TDeintMod(clip, order=1, edeint=core.nnedi3.nnedi3(clip, field=1)) combProps = core.tdm.IsCombed(clip) clip = core.std.FrameEval(clip, functools.partial(conditionalDeint, orig=clip, deint=deint), combProps) clip.set_output() Code:
2021-03-14 19:43:13.737 Failed to evaluate the script: Python exception: nnedi3: argument clip was passed an unsupported type (expected clip compatible type but got str) 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 "E:\VapourSynthEditor\Decomb.vpy", line 13, in deint = core.tdm.TDeintMod(clip, order=1, edeint=core.nnedi3.nnedi3(clip, field=1)) File "src\cython\vapoursynth.pyx", line 2056, in vapoursynth.Function.__call__ vapoursynth.Error: nnedi3: argument clip was passed an unsupported type (expected clip compatible type but got str) |
15th March 2021, 02:13 | #4238 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,346
|
Quote:
Did you load the video with a source filter? Code:
clip = r'D:\Video\1.mkv' #replace with your video file Code:
clip = core.lsmas.LWLibavSource(r'D:\Video\1.mkv') |
|
15th March 2021, 03:13 | #4239 | Link | |
Registered User
Join Date: Dec 2017
Posts: 15
|
Quote:
Code:
2021-03-14 21:12:32.715 Failed to evaluate the script: Python exception: lsmas: failed to construct index. 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 "E:\VapourSynthEditor\Decomb.vpy", line 6, in clip = core.lsmas.LWLibavSource(clip) File "src\cython\vapoursynth.pyx", line 2069, in vapoursynth.Function.__call__ vapoursynth.Error: lsmas: failed to construct index. Last edited by AOmundson; 15th March 2021 at 03:16. |
|
15th March 2021, 03:32 | #4240 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,346
|
Quote:
Did you get the path correct ? Are you using recent LSmash version ? Personally, I would use neither for a DVD source. DGSource if you have a Nvidia card and license, or DGDecode / d2v.Source are more reliable |
|
Tags |
speed, vaporware, vapoursynth |
Thread Tools | Search this Thread |
Display Modes | |
|
|