1. NodeBox 1
    1. Homepage
    2. NodeBox 3Node-based app for generative design and data visualization
    3. NodeBox OpenGLHardware-accelerated cross-platform graphics library
    4. NodeBox 1Generate 2D visuals using Python code (Mac OS X only)
  2. Gallery
  3. Documentation
  4. Forum
  5. Blog

Quicktime

Posted by Lucky on Feb 15, 2011

Hi everybody

I have been trying to understand for days what FRAME stands for in the script below, which I got from the tutorials. It is not defined anywhere and it is no build in command. And still it works.

What I ultimately want to do is to be able to read frames in a list and then apply a filter to those and display them in a canvas. And it seems pretty straight forward and easy. But I dont understand that FRAME and I dont udnerstand how I can spread them evenly an write on the canvas. I saw the grid tutorial, but I would like to understand how I could achieve this without grid.

Thanks for the attention

movie = quicktime.movie("twisted_world.mp4")
size(movie.width, movie.height)
speed(50)
def draw():
    frame = movie.frame(FRAME*0.1)
    image(None, 0, 0, data=frame.data, width=frame.width)


 
Posted by Trumpetto on Feb 18, 2011

Something like this (no filter yet)?

quicktime = ximport("quicktime")
 
movie = quicktime.movie("twisted_world.mp4")
size(movie.width, movie.height)
 
for row in range(4):
    for column in range(4):
        frame = movie.frame(FRAME*0.1 + column + (row*4))
        image(None, ((frame.width/4) * column), ((frame.height/4) * row), data=frame.data, width=frame.width/4)