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. |
10th May 2019, 20:34 | #3321 | Link | |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Quote:
|
|
11th May 2019, 07:45 | #3322 | Link | |
unsigned int
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
|
Quote:
__________________
Buy me a "coffee" and/or hire me to write code! |
|
11th May 2019, 14:18 | #3323 | Link | |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Quote:
What I'm thinking now is maybe I can have a temp clip file on the top level and then inside the callback function use "global" to get that file into the function and update it on some logic? Something like this: Code:
temp_clip = clip def apply_lut(n, clip, file_list): global temp_clip if n > blah: temp_clip = core.timecube.Cube(clip, cube=cube_file_path) return core.timecube.Cube(clip, cube=cube_file_path) if n < blah and n > blah: return temp_clip else: return clip accu_file = core.std.FrameEval(rgb_clip, partial(apply_lut, clip=rgb_clip, file_list=file_list)) |
|
12th May 2019, 17:54 | #3325 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
After learning, the hard way, that VapourSynth (vspipe.exe) requires the environment variable %USERPROFILE% to be set correctly – otherwise loading of plugins that have been installed via VSRepo will fail – I was wondering why VapourSynth relies on %USERPROFILE% to deduce the location of the <AppData> directory. Wouldn't it be more obvious and more reliable to look at %APPDATA% instead? Sure, most of the time the path of <AppData> will be equal to "<UserProfile>\AppData\Roaming", but I think we can not really rely on that. If there exists a dedicated environment variable for <AppData>, why not make use of it? And, maybe, fall back "<UserProfile>\AppData\Roaming", if either %APPDATA% is not set or the specified path does not exist. Or even better: Don't rely on environment variables at all (you never know what some user has set up here!), but rather use the SHGetKnownFolderPath() system function?
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 12th May 2019 at 18:03. |
12th May 2019, 20:45 | #3327 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
I don't use environment variables. I only use this code to retrieve the path:
Code:
SHGetFolderPath(nullptr, CSIDL_APPDATA, nullptr, SHGFP_TYPE_CURRENT, appDataBuffer.data());
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
12th May 2019, 22:29 | #3328 | Link | |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
There is no such problem, if %USERPROFILE% is not set at all. Furthermore, if %USERPROFILE% is set to the wrong directory, SHGetFolderPath() with parameters CSIDL_APPDATA and SHGFP_TYPE_DEFAULT works. Interestingly, SHGetFolderPath() with parameters CSIDL_PROFILE does not seem to care about %USERPROFILE% at all My conclusion for now: If call SHGetFolderPath() with parameters CSIDL_APPDATA and SHGFP_TYPE_CURRENT has failed, then we should retry with SHGFP_TYPE_DEFAULT flag.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 12th May 2019 at 22:35. |
|
13th May 2019, 01:50 | #3332 | Link | |
Registered User
Join Date: May 2011
Posts: 321
|
Quote:
Code:
for frame in range(0, len(accu_file)): accu_file.get_frame(frame) |
|
17th May 2019, 00:08 | #3335 | Link |
Noob
Join Date: Mar 2017
Posts: 221
|
is there a function in vs similar to avs's function setmemorymax()
i read http://www.vapoursynth.com/doc/ but couldn't find. having issues of very high ram usage |
17th May 2019, 00:39 | #3336 | Link | |
Registered User
Join Date: Jul 2012
Posts: 1,213
|
Quote:
core.max_cache_size =xxxx |
|
17th May 2019, 01:50 | #3337 | Link | ||
Registered User
Join Date: Sep 2012
Posts: 156
|
dear all,
been away for long, but figured i'll finally take up python/vapoursynth. however, been messing around and having problems with an avisynth encoding script i'm trying to port over whole day. and now i just can't wrap my head around what i'm doing wrong. script itself is pieced together from what i've found here based on the plugins i need to use. Quote:
Quote:
Last edited by aldix; 17th May 2019 at 02:47. |
||
17th May 2019, 02:47 | #3339 | Link | |
Registered User
Join Date: Sep 2012
Posts: 156
|
right. i also started to think that maybe spaces shouldn't be there so i made a new folder.
however, even if i remove the "/" i still get an error, just a different one now. any idea? Quote:
|
|
Tags |
speed, vaporware, vapoursynth |
Thread Tools | Search this Thread |
Display Modes | |
|
|