Log in

View Full Version : Rainbow color transition with Animate filter


konstantin1
2nd December 2016, 09:02
I would like to add a continuously changing colored borders to my clip. My clip is 406 pixel width and 360 height, contains 23213 frames (12 min 54 sec).

I want to add a 117 pixel border on the left and right to make a 640x360 clip.

I tried Animate() filter to achieve the rainbow coloured transition, but no luck:

v=lanczos4resize(406,360).converttorgb24()
animate(v,0,23213,"addborders",117,0,117,0,0,117,0,117,0,16777215)

Colour transition should be appear, because I pass 10 parameters after "addborders": first 4 for the border dimensions, 5th is the beginning colour in integer (0), next 4 parameter is for the border dimension again, doesn't change, only the 10th parameter is altered from the 0 color int to the 0xffffff corresponding value: 16777215

In fact I get a lot of color in the changing colored border, but not in the right order, not like in the rainbow.

How can I achieve this goal? Maybe should I use ScriptClip() instead of Animate() and using current_frame somehow to get the desired color code?

wonkey_monkey
3rd December 2016, 01:51
test reply

can't seem to post/edit properly, forum seems borked.

I have a solution for you but can't post it, so that sucks.

raffriff42
3rd December 2016, 15:57
I was locked out too. Was your solution something like this?

I get a lot of color in the changing colored border, but not in the right order, not like in the rainbow.v=Lanczos4Resize(406,360).ConvertToYV24 ## YUV required
b=BlankClip(v, width=117, color=color_turquoise) ## any starting color
r=Animate(b, 0, 21313, "tweak",
\ 0.0,
\ 120*360.0) ## set number of cycles here
StackHorizontal(r, v, r)

wonkey_monkey
3rd December 2016, 19:35
No, yours is way better :(