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. |
16th February 2020, 06:17 | #1 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,346
|
Load avs x64 core function into vapoursynth x64 ?
Is there a way to load a native(internal) x64 avisynth core function (not an external .dll plugin) in vapoursynth x64 ?
eg. RGBAdjust() avsproxy can embed x86 avs+ in x64 vapoursynth, but I don't think it can do x64 avs |
16th February 2020, 08:58 | #2 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
No, not unless you recompile then as separate plugins. If you look at the rgbadjust documentation you'll see it's trivial to implement using expr.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
16th February 2020, 16:02 | #3 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,346
|
Quote:
In this case I was more interested in the analyze=true parameter ? Same with ColorYUV(analyze=true). Or does vapoursynth have another similar function where it can display min/max values |
|
16th February 2020, 16:10 | #4 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
Quote:
Code:
vs.std.PlaneStats(clip).text.FrameProps()
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
16th February 2020, 16:54 | #7 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
Quote:
Code:
vs.std.PlaneStats(clip, plane=0, prop='PlaneStatsR').std.PlaneStats(clip, plane=1, prop='PlaneStatsG').std.PlaneStats(clip, plane=2, prop='PlaneStatsB').text.FrameProps()
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
16th February 2020, 22:33 | #9 | Link |
Registered User
Join Date: May 2011
Posts: 321
|
nice, and to analyze those frames it could go like this for example:
Code:
import vapoursynth from vapoursynth import core import threading clip = core.lsmas.LibavSMASHSource(r'C:\video.mp4') clip = core.resize.Point(clip, format = vs.RGB24, matrix_in_s = '709') class Analyze: LABELS = [ 'RMin', 'RMax', 'GMin', 'GMax', 'BMin', 'BMax' ] def __init__(self, c): self.c = c self.illegal_R = 0 self.illegal_G = 0 self.illegal_B = 0 c = core.std.PlaneStats(c, plane=0, prop = 'PlaneStatsR' )\ .std.PlaneStats(c, plane=1, prop = 'PlaneStatsG' )\ .std.PlaneStats(c, plane=2, prop = 'PlaneStatsB' ) for frame in range(len(c)): props_dict = dict(c.get_frame(frame).props) for label in self.LABELS: setattr(self, label, props_dict['PlaneStats'+label]) #print('frame:', frame, label,'=', getattr(self, label)) self.analyze_frame(frame) self.resolution() def analyze_frame(self, frame): if self.RMin < MIN or self.RMax > MAX: self.illegal_R +=1 #and something with other channels def resolution(self): print(f'channel R has {self.illegal_R} illegal frames out of {len(self.c)} frames') #etc. #checking illegal RGB values MIN = 5 MAX=246 test_clip = clip p = threading.Thread(target=Analyze, args=(test_clip,)) p.start() clip.set_output() Last edited by _Al_; 16th February 2020 at 22:35. |
Thread Tools | Search this Thread |
Display Modes | |
|
|