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 November 2018, 17:06 | #1 | Link |
Registered User
Join Date: Feb 2013
Posts: 10
|
Numerator argument always causes an error
Simple example:
AssumeFPS(BlankClip(), numerator=30000, denominator=1001) Result: Script error: Invalid arguments to function "AssumeFPS" I can't work out why, and searching revealed nothing. Also: ConvertFPS(BlankClip(), numerator=30000, denominator=1001) Result: Script error: ConvertFPS does not have a named argument "numerator" I've tried upgrading AviSynth to 2.60 (official build) Feb 20 2015 but it is the same. (I know there are presets I can use for 30000/1001 but I actually want to use other numerators and denominators.) |
16th November 2018, 18:09 | #3 | Link | ||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
As VideoH said.
Numerator is NON Optional (and un-named) http://avisynth.nl/index.php/FPS#AssumeFPS Code:
AssumeFPS(clip clip, float fps [, bool sync_audio]) AssumeFPS(clip clip, int numerator [, int denominator, bool sync_audio]) # Optional in blue, numerator is NON OPTIONAL (and NOT named) AssumeFPS(clip clip1, clip clip2 [, bool sync_audio]) AssumeFPS(clip clip1, string preset [, bool sync_audio]) eg Code:
AssumeFPS(BlankClip, 25) AssumeFPS(BlankClip, 25,1) AssumeFPS(BlankClip, 25,denominator=1) Code:
AssumeFPS(clip c, int numerator, int "denominator", ... etc) # note denominator in double quotes, ie named, & optional So, below will work Code:
ConvertFPS(BlankClip(), 30000, denominator=1001) Also note, that in first code block, the 2nd arg is always non optional (and all are different types), and the user supplied 2nd argument type is used to resolve the intended prototype . EDIT: Quote:
Code:
numerator = 30000 denominator = 1001 ConvertFPS(BlankClip(), numerator, denominator=denominator) #ConvertFPS(BlankClip(), numerator, denominator) #BlankClip(fps=numerator,fps_denominator=denominator) # For BlankClip, fps is also optional & named EDIT: Below in red from docs should be NOTED (I was not aware of it). Quote:
Code:
Function Test(Float "FPS", Int "Fps_Denominator") { FPS = (Fps_Denominator.Defined) ? Int(Default(FPS,24)) : Float(Default(FPS,24.0)) # FPS is already forced to type FLOAT if avs v2.60+ Fps_Denominator=Default(Fps_Denominator, Undefined() ) # Same as Not assigning Default() to Fps_Denominator. Can comment out, same effect. return BlankClip(fps=FPS,fps_denominator=Fps_Denominator) # will be as fps_denominator=Undefined, if fps_denominator not supplied. }
__________________
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; 17th November 2018 at 11:29. |
||
Tags |
assumefps, convertfps, invalid argument, no named argument, numerator |
Thread Tools | Search this Thread |
Display Modes | |
|
|