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. |
11th January 2019, 00:02 | #1 | Link |
Registered User
Join Date: Mar 2018
Posts: 447
|
Setting script's working directory
I have another question related to the AvisynthOptimizer port. When the optimizer tests a new set of parameters it creates a new script into a separate directory and runs it. In order to make relative paths work I change the script's working directory to the original directory where the script was located. In Avisynth this is done easily by using SetWorkingDir() at the beginning of the script.
In Python the working directory can be changed with os.chdir() but I noticed that it doesn't have effect inside the function which FrameEval is calling unless the os.chdir() is also there. Is this by design and can it be changed so that calling os.chdir() in the beginning of the script would make the change also effective inside FrameEval()? Or is there some other workaround to change the working directory for the whole script? |
11th January 2019, 00:31 | #2 | Link | |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Why not just pass an path argument to FrameEval?
Also possibly relevant for AvisynthOptimizer: Quote:
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
|
11th January 2019, 10:48 | #3 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
I suspect you open and write a file or something. Open the file handle outside frameeval and pass it as an argument to the function or something. See the functools.partial example in the documentation.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
12th January 2019, 01:34 | #4 | Link | ||
Registered User
Join Date: Mar 2018
Posts: 447
|
Yes that's certainly possible. I was just hoping that there would be a "cleaner" option.
Quote:
Quote:
By the way the optimizer works with VapourSynth scripts now. I'm going to do an official release this weekend. Now the question is... what to call it when it's no longer Avisynth-specific. SynthOptimizer? MetaOptimizer? ZorrIsDaManOptimizer? |
||
12th January 2019, 10:24 | #5 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
ZorrIsDaManOptimizer, sounds pretty good, but, hows bout OptiSynth ?
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
12th January 2019, 11:26 | #7 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
OptiSynth sounds cool.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
12th January 2019, 15:07 | #8 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
OptiSynth also name for an engine oil, Vroom, Vroom !
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 13th January 2019 at 15:35. |
12th January 2019, 16:12 | #10 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Agreed.
I like this:
__________________
Groucho's Avisynth Stuff |
12th January 2019, 16:13 | #11 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Dont be daft, aint nobody gonna try puttin' it in their engine.
EDIT: since seeing G2K4 comment, Maybe OptiVroom.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 12th January 2019 at 16:17. |
12th January 2019, 16:22 | #12 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Hm, sounds a bit like a household cleaning appliance.
__________________
Groucho's Avisynth Stuff |
12th January 2019, 21:59 | #15 | Link |
Registered User
Join Date: Mar 2018
Posts: 447
|
Thanks for the name ideas guys! I agree that it shouldn't be a "synth", that's a category of its own and this little software doesn't deserve to be called that.
I think the "optimizer" should be part of the name since that's what it does. And what does it optimize? Well it doesn't optimize Avisynth or Vapoursynth so the original name is kinda wrong too. Lansing was closer with the "plugin" idea, but it really doesn't optimize plugins either. It optimizes scripts. So... ScriptOptimizer? If we stick with original name format we could just replace AviSynth with something more general. It's just hard to come up with a word that would explain succinctly what it and Vapoursynth are... "frameserving tool for video manipulation"? Ok how about we take the common parts from both Avisynth and Vapoursynth and slap the optimizer in there as well. Something like XSynthOptimizer. Hey if I call it XXXSynthOptimizer it would crash the whole forum as there would be so much interest! There's also another dilemma, where should I put the thread for this tool? I could make a new thread here for Vapoursynth related discussion and keep the original for Avisynth related things. Might be hard to know where to ask more general questions though. |
Thread Tools | Search this Thread |
Display Modes | |
|
|