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. |
24th September 2016, 12:57 | #2261 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
I have too much other stuff to do and I think some of you could help me on the Python side.
Task 1: If you do something like clip1 + clip2 + clip3 + clip4... this expands to Splice([Splice([Splice([clip1, clip2]), clip3]), clip4])... It works but becomes a bit inefficient when hundreds of clips are involved and combining it into a single Splice[clip1, clip2, clip3, ...] would be better. Something like a delayed evaluation object for splice operations could be nice to have. Something similar for trim could also be useful. I guess. The relevant code to modify can be found here. Needs cython to compile but works just like normal python. Task 2: I want to flatten things so you don't need to keep a core object around anymore like this: import vapoursynth as vs vs.std.BlankClip() So basically also check the object returned from get_core() for all the attributes not found directly in the vapoursynth module. Cython unfortunately doesn't seem to like the usual Python tricks so I'm a bit stuck there too. Too bad __getattr__ doesn't exist on the module level.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
26th September 2016, 12:15 | #2262 | Link |
Registered User
Join Date: Jul 2012
Posts: 94
|
Hi,
What would be the best, fastest and effective way to do a SelectRangeEvery like Avisynth does? I read this https://forum.doom9.org/showthread.p...lectrangeevery but the only thing I can do is a simple SelectEvery. Should I trim some part of the clip then merge them together or is there an easiest way with the function above? |
26th September 2016, 13:07 | #2263 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
Code:
clip = core.std.SelectEvery(clip = clip, cycle = x, offsets = range(14))
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
26th September 2016, 14:11 | #2264 | Link |
Registered User
Join Date: Jul 2012
Posts: 94
|
My bad. The values for x and range was way to low. ^^'
It's definitely easy. Is it possible to tweak QTGMC like in avisynth using mode to get the max speed or vapoursynth does it by itself automaticaly with vs.get_core? The x264 process is slower with a vpy script than an avs script. It's a simple script: Code:
import vapoursynth as vs import havsfunc as haf core = vs.get_core(threads=8) core.avs.LoadPlugin(r'C:\Program Files (x86)\AviSynth+\plugins64\DGDecodeNV.dll') video = core.avs.DGSource(r'H:\Videos1.dgi')+core.avs.DGSource(r'H:\Videos2.dgi')+core.avs.DGSource(r'H:\Videos3.dgi')+core.avs.DGSource(r'H:\Videos4.dgi') video = haf.QTGMC(video, Preset='Medium', TFF=True, FPSDivisor=2).fmtc.resample(kernel="spline36", w=1280, h=720).fmtc.bitdepth(bits=8) video.set_output() |
26th September 2016, 14:46 | #2265 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
Bonus points for not saying how much slower it is so I can speculate why. Different code, different speed. I don't have much to add there. Try another resizer and find out? Looks easy enough to do...
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
26th September 2016, 15:03 | #2266 | Link |
Registered User
Join Date: Jul 2012
Posts: 94
|
Avisynth can use MTMode so we can make QTGMC process much faster. Sure you already knew. ^^
Can we do that in vapoursynth? For exemple in avisynth QTGMC has this option: EdiThreads=3. Vapoursynth hasn't. My speed tests: Avs (QTGMC=medium, spline36) + x264 (veryslow) = 5min to achieve 5.30fps Vpy (QTGMC=medium, spline36) + x264 (veryslow) = 5min to achieve 4fps Very significant. I assume CPU doesn't assing the same % to the pipe process. Sure I can try all I know but I rather ask for all I don't. Maybe there is some options I don't know yet or what. Last edited by Sm3n; 26th September 2016 at 15:06. |
26th September 2016, 15:07 | #2267 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
What's the cpu usage like? is it 100% for both or less for VS?
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet Last edited by Myrsloik; 26th September 2016 at 15:18. |
|
26th September 2016, 15:42 | #2268 | Link | |
Registered User
Join Date: Jul 2012
Posts: 94
|
Quote:
I ran a new test. Vpy = 4.90fps Now sure for some, difference could be nothing but during an encode taking hours, at the end it might have time wasted. Thx for your help. |
|
26th September 2016, 15:44 | #2269 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
If the difference is that big between runs you really need a better way to measure things. Seriously. With that kind of variation you can't even say that one is faster than the other.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
26th September 2016, 20:01 | #2270 | Link | |
Registered User
Join Date: Jul 2012
Posts: 94
|
Quote:
In fact, next project I have to do I'll be using a vpy script. Usualy an encode takes a bit less than 8h. It will be easy to see the difference I'm sure. If my cpu can handle X fps in x min using avs vs Y fps in x min using vpy where Y is slowest, I'm pretty sure that avs+x264 process will finish sooner than vpy+x264. Maybe I'm wrong but it makes sense to me. |
|
29th September 2016, 23:18 | #2272 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
R34 RC1 YO! Check it out! Basically it fixes the horrible buggy untested mess that R33 was. Should be a safe to use. Just note that the abomination that is temporalsoften no longer is an included plugin.
Installer Portable 64bit Portable 32bit Changes: Code:
r34: it's now possible to skip installing the visual studio runtimes in the installer to reduce online dependency of installer (installation may not work until manually installed, obviously) temporalsoften plugin is no longer included in the windows installer, it has been replaced by the misc plugin containing various functions useful for avisynth compatibility the default max memory usage is now 4GB on 64bit systems fixed several unpacking issues in avisource introduced in the previous version added warning if there are any nodes or frames still in use when the core is free improved avfs prefetch logic for vpy added premultiplied blending mode to maskedmerge added premultiply filter to premultiply a clip with alpha makediff and adddiff no longer pointlessly clamp float to a limited range since there's no good reason to do so fixed memory leak when the core is freed introduced in the previous version fixed memory leak in avfs introduced in the previous version removed rshift and replaced it with a scale argument in sobel and prewitt fixed sobel and prewitt wrongly passing through the input pixel values added support for hdr formats and dci-p3 in zimg optimized planestats added float support to pemverifier fixes active region offset and height for interlaced resizing added support for more different subsampled input formats for vfm (jackoneill)
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
30th September 2016, 05:06 | #2273 | Link |
The cult of personality
Join Date: May 2013
Location: Planet Vegeta
Posts: 155
|
I am using R33-1 and it is working fine. I use the x64 portable version with python352 and the editor all in one folder as recommended. Now, for updating to newer versions, should I just copy and replace VS files (excluding plugins folder)?
|
30th September 2016, 08:37 | #2274 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Including the plugins dir. Overwriting an existing version is fine.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
30th September 2016, 10:44 | #2275 | Link |
Registered User
Join Date: Oct 2014
Posts: 268
|
The HDR stuff seems to work nicely. Able to convert some clips to something that is quite OK to look at on regular screens. I do a little gamma tweak (like 1.2 or 1.3) to lift the shadows a bit at the end with a nominal luminance somewhere between 400 and 600 and so far so good.
That being said, can someone help me to get something like highlight compression or shadow boosting without altering the entire gamma? A bit like Photo-correcting software does. Is something possible? with Expr or something? Or make / define a curve myself with float values that map values close-to 1.0 and over 1.0 to a sane value within the 0.0 - 1.0 range? And / or, is it possible to load and apply 3d Cube lut files? |
30th September 2016, 10:50 | #2276 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
2. If you only want 1d adjustment you can definitely do that with expr if you don't mind creating your own expression 3. I have no idea what algorithm photo correction software uses (and I can't google my way to it since you didn't list software+mode) but I suspect it's closer to local constrast enhancement than a 1d lut adjustment
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
30th September 2016, 15:02 | #2277 | Link | |
The cult of personality
Join Date: May 2013
Location: Planet Vegeta
Posts: 155
|
Quote:
The plugins folder comes empty anyway. If you mean the core plugins then fine, I can replace it. |
|
30th September 2016, 15:05 | #2278 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Yes, that's what I meant.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
1st October 2016, 05:14 | #2279 | Link | |
Registered User
Join Date: Jan 2016
Posts: 98
|
Quote:
Also, have you tried "Retinex" plugin for VapourSynth? |
|
11th October 2016, 12:34 | #2280 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Changes from RC1:
Pismo PFM runtime included in the installer to make AVFS usage easier AVFS supports avs+ high bitdepth output Super minor fixes nobody will ever notice R34 RC2 Portable 64bit Portable 32bit
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
Tags |
speed, vaporware, vapoursynth |
|
|