zee944
4th January 2011, 21:14
Is there a method in AviSynth to adjust each frame differently with values taken from a text file?
What I'm currently doing is this:
...
Trim(last, 0, 1208-1)++Trim(last, 1208,1).skewfix(1.79 )++Trim(last, 1208+1,0)
Trim(last, 0, 1209-1)++Trim(last, 1209,1).skewfix(-1.94 )++Trim(last, 1209+1,0)
Trim(last, 0, 1210-1)++Trim(last, 1210,1).skewfix(-2.25 )++Trim(last, 1210+1,0)
Trim(last, 0, 1211-1)++Trim(last, 1211,1).skewfix(2.75 )++Trim(last, 1211+1,0)
...
Trim(last, 0, 1332-1)++Trim(last, 1332,1).skewfix(1.65 )++Trim(last, 1332+1,0)
Trim(last, 0, 1333-1)++Trim(last, 1333,1).skewfix(-2.86 )++Trim(last, 1333+1,0)
Trim(last, 0, 1334-1)++Trim(last, 1334,1).skewfix(3.37 )++Trim(last, 1334+1,0)
...
This is extremly slow and leads to memory overflow soon when you have hundreds or thousands of frames to adjust. (I have. :D) ApplyRange() and JDL_ApplyRange() isn't any better either.
What I'd want to put the values in a text file like this:
frame#
1208; 1.79
1209; -1.94
1210; -2.25
1211; 2.75
...
1332; 1.65
1333; -2.86
1334; 3.37
...and use only one call: skewfix("values.txt") or something similar and not using excessive chaining and Trim() commands anymore. Can AviSynth do that?
I'd appreciate any answers. Thank you in advance!
What I'm currently doing is this:
...
Trim(last, 0, 1208-1)++Trim(last, 1208,1).skewfix(1.79 )++Trim(last, 1208+1,0)
Trim(last, 0, 1209-1)++Trim(last, 1209,1).skewfix(-1.94 )++Trim(last, 1209+1,0)
Trim(last, 0, 1210-1)++Trim(last, 1210,1).skewfix(-2.25 )++Trim(last, 1210+1,0)
Trim(last, 0, 1211-1)++Trim(last, 1211,1).skewfix(2.75 )++Trim(last, 1211+1,0)
...
Trim(last, 0, 1332-1)++Trim(last, 1332,1).skewfix(1.65 )++Trim(last, 1332+1,0)
Trim(last, 0, 1333-1)++Trim(last, 1333,1).skewfix(-2.86 )++Trim(last, 1333+1,0)
Trim(last, 0, 1334-1)++Trim(last, 1334,1).skewfix(3.37 )++Trim(last, 1334+1,0)
...
This is extremly slow and leads to memory overflow soon when you have hundreds or thousands of frames to adjust. (I have. :D) ApplyRange() and JDL_ApplyRange() isn't any better either.
What I'd want to put the values in a text file like this:
frame#
1208; 1.79
1209; -1.94
1210; -2.25
1211; 2.75
...
1332; 1.65
1333; -2.86
1334; 3.37
...and use only one call: skewfix("values.txt") or something similar and not using excessive chaining and Trim() commands anymore. Can AviSynth do that?
I'd appreciate any answers. Thank you in advance!