fizzybrain
17th October 2009, 16:10
Hello,
Does anyone know of a perl script/module/fragment to read and parse a .avs file? I have written animation software which generates frames and .avs file to string them all together. Now as a development of that I want to read the .avs file I've already created to assist with editing the frames I have made.
My .avs file is very simple - it just sets up sequences and pauses and then adds them all together. It looks something like this ("..." = about a hundred similar entries cut out):
===============
clip_1 = ImageSource("scale3d_21_2009-10-16_20-24-09_%04d.png", start=0, end=20, fps=5,pixel_type = "rgb24")
pause_1=ImageSource("scale3d_21_2009-10-16_20-24-09_0020.png", fps=5,pixel_type = "rgb24").trim(1,15)
clip_2 = ImageSource("scale3d_21_2009-10-16_20-24-09_%04d.png", start=21, end=71, fps=5,pixel_type = "rgb24")
pause_2=ImageSource("scale3d_21_2009-10-16_20-24-09_0071.png", fps=5,pixel_type = "rgb24").trim(1,5)
...
clip_75 = ImageSource("scale3d_21_2009-10-16_20-24-09_%04d.png", start=1057, end=1067, fps=5,pixel_type = "rgb24")
pause_75=ImageSource("scale3d_21_2009-10-16_20-24-09_1067.png", fps=5,pixel_type = "rgb24").trim(1,2)
clip_76 = ImageSource("scale3d_21_2009-10-16_20-24-09_%04d.png", start=1068, end=1078, fps=5,pixel_type = "rgb24")
pause_76=ImageSource("scale3d_21_2009-10-16_20-24-09_1078.png", fps=5,pixel_type = "rgb24").trim(1,2)
clip_77 = ImageSource("scale3d_21_2009-10-16_20-24-09_%04d.png", start=1079, end=1089, fps=5,pixel_type = "rgb24")
pause_77=ImageSource("scale3d_21_2009-10-16_20-24-09_1089.png", fps=5,pixel_type = "rgb24").trim(1,2)
+clip_1+pause_1+clip_2+pause_2+clip_3 ... +clip_76+pause_76+clip_77+pause_77
======================
It's a fairly trivial task, and I'm sure I can write something for my own needs, but I just thought that if anything already exists then it would make sense to use it.
Share and Enjoy
Does anyone know of a perl script/module/fragment to read and parse a .avs file? I have written animation software which generates frames and .avs file to string them all together. Now as a development of that I want to read the .avs file I've already created to assist with editing the frames I have made.
My .avs file is very simple - it just sets up sequences and pauses and then adds them all together. It looks something like this ("..." = about a hundred similar entries cut out):
===============
clip_1 = ImageSource("scale3d_21_2009-10-16_20-24-09_%04d.png", start=0, end=20, fps=5,pixel_type = "rgb24")
pause_1=ImageSource("scale3d_21_2009-10-16_20-24-09_0020.png", fps=5,pixel_type = "rgb24").trim(1,15)
clip_2 = ImageSource("scale3d_21_2009-10-16_20-24-09_%04d.png", start=21, end=71, fps=5,pixel_type = "rgb24")
pause_2=ImageSource("scale3d_21_2009-10-16_20-24-09_0071.png", fps=5,pixel_type = "rgb24").trim(1,5)
...
clip_75 = ImageSource("scale3d_21_2009-10-16_20-24-09_%04d.png", start=1057, end=1067, fps=5,pixel_type = "rgb24")
pause_75=ImageSource("scale3d_21_2009-10-16_20-24-09_1067.png", fps=5,pixel_type = "rgb24").trim(1,2)
clip_76 = ImageSource("scale3d_21_2009-10-16_20-24-09_%04d.png", start=1068, end=1078, fps=5,pixel_type = "rgb24")
pause_76=ImageSource("scale3d_21_2009-10-16_20-24-09_1078.png", fps=5,pixel_type = "rgb24").trim(1,2)
clip_77 = ImageSource("scale3d_21_2009-10-16_20-24-09_%04d.png", start=1079, end=1089, fps=5,pixel_type = "rgb24")
pause_77=ImageSource("scale3d_21_2009-10-16_20-24-09_1089.png", fps=5,pixel_type = "rgb24").trim(1,2)
+clip_1+pause_1+clip_2+pause_2+clip_3 ... +clip_76+pause_76+clip_77+pause_77
======================
It's a fairly trivial task, and I'm sure I can write something for my own needs, but I just thought that if anything already exists then it would make sense to use it.
Share and Enjoy