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. |
8th September 2012, 08:59 | #62 | Link |
Oz of the zOo
Join Date: May 2005
Posts: 208
|
There are examples of implementing a case-insensitive dictionary which might work for method names as well if I am not mistaken (here and there):
Code:
class CaseInsensitiveDict(dict): def __setitem__(self, key, value): super(CaseInsensitiveDict, self).__setitem__(key.lower(), value) def __getitem__(self, key): return super(CaseInsensitiveDict, self).__getitem__(key.lower()) It looks quite easy to incorporate into vapoursynth's avs class, probably even as an optional parameter 'casesens' in vapoursynth.Core() method which would instantiate avs class or avsCaseInsensitive, yet I don't know if and how I can override the avs class from inside my code... Last edited by wOxxOm; 8th September 2012 at 09:05. |
8th September 2012, 10:11 | #63 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,595
|
Quote:
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
8th September 2012, 11:14 | #64 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,595
|
Quote:
2. Not sure if swscale implements it, will go ask the developers because I'm curious too. 3. For Lut the lut argument is a list of 2^(video bits per sample) ints. So for normal video it simply is the 256 values in the lut you've calculated by yourself. Lut2 is similar except that it's Lut2(clips=[clip1, clip2], lut=[2^(usually 16) ints]) You can also add planes=[1, 2] (or similar) if you only want it to work on uv in yuv. 4. I like it verbose, maybe some day I'll relax the requirement but I see it as a good way of keeping scripts readable. 5. It shall be added
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
8th September 2012, 20:19 | #68 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,595
|
The users have spoken. Make it so.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
9th September 2012, 01:03 | #70 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,595
|
R4 posted at the website. It should fix the corrupt frame output and some other stuff too.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
9th September 2012, 07:27 | #74 | Link |
Novice x264 User
Join Date: Dec 2006
Location: California
Posts: 169
|
That's further than what I got. I can't even get past the first line (says specified module no found) ! This is kind of frustrating because the instructions really are straightforward and easy to follow. Everything is (presumably) at default settings too.
__________________
"I'll take a potato chip... and eat it!" |
9th September 2012, 07:32 | #75 | Link |
Registered User
Join Date: Jan 2010
Posts: 270
|
Awesome project. Finally, something that can completely replace avisynth one day.
I played around with it and wrote a simple (buggy, ugly etc.) wrapper to provide more avisynth-like syntax (chaining support, positional arguments, case insensitivity): http://privatepaste.com/0b53562cdb While it definitely shouldn't be used for anything real in its current state, I hope it shows that vapoursynth could benefit from better API. Thoughts: 1. list_functions() should return a string and not output it to stdout by itself. IMHO, this is just wrong (see _rebuild_functions_cache function). 2. There should be a list_functions() analog, that would return the same data in dictionary/list/whatever form. I'm pretty sure you have one internally. Possible use case: editors, wrappers. 3. Chaining support, or you can call it 'fluent interface'. Just because it makes things so much easier. 4. Positional argument. I'm not sure why you like it verbose while most programming languages use this kind of args without any problems. Some don't even support named arguments. 5. Case-insensitivity should be added. Or at least lowercase bindings for all functions. Good editor could help, sure, but right now it takes me ages to type FFVideoSource correctly. 6. Some list_functions() analog for core functions. Because your (cython?) objects don't support __dict__, inspect.getargspec and other reflection methods. This can be solved with good documentation too. I'm not very good with python and I'm pretty sure that some of these questions can be solved by a simple correct wrapper without your help. Having all this in core API would be nice though. Also, optional parameters don't seem to work right now. And CropAbs accepts negative width/height but then outputs garbage. IMHO it should behave like avisynth's crop function. Last edited by TurboPascal7; 9th September 2012 at 07:39. |
9th September 2012, 10:35 | #77 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,595
|
To crush all who stand against me! *muahaha*
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
9th September 2012, 11:35 | #78 | Link |
Registered User
Join Date: Nov 2011
Location: spain
Posts: 45
|
hi, i can't make CPU Usage = 99% when i use one filter
the CPU Usage is 25% all the time, but when i use the filter x4, the CPU Usage become 99% but in avisynth MT the CPU Usage is 99% all the time what is the problem ?? (or is it a problem ??) |
9th September 2012, 11:40 | #79 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,595
|
Quote:
2. will probably happen some day 3. suggest a way to implement it that's not completely unpythonian and I'll consider it 4. some day 5. I will not add case insensitive stuff to a case sensitive language. Maybe some day I'll make lowercase versions acceptable too. 6. It's already included in list_functions(), why do you need one more? I think I've fixed the crop argument checks. Can you give an example of the optional arguments maybe not working?
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
9th September 2012, 11:51 | #80 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,595
|
Quote:
Newly written and ported filters for the vs api can if done correctly handle multiple frames at once. See the included Lut/Lut2 function.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
Tags |
speed, vaporware, vapoursynth |
Thread Tools | Search this Thread |
Display Modes | |
|
|