jdf / Processing.py-Bugs

A home for all bugs and feature requests about Python Mode for the Processing Development Environment.
41 stars 8 forks source link

Can't use video library in PythonMode #229

Closed newton45 closed 6 years ago

newton45 commented 6 years ago

Processing can't run this code below:

add_library('video')

def setup():
    size(640, 360)
    background(0)

    movie = Movie(this, "transit.mov")
    movie.loop()

def movieEvent(m):
    m.read()

def draw():
    image(movie, 0,0,width,height)

Error says "processing.app.SketchException: java.lang.RuntimeException: Could not load movie file transit.mov"

jdf commented 6 years ago

Have you added transit.mov to the sketch's data folder?

villares commented 6 years ago

Hi, @newton45,

I can confirm it works for me after adding global movie inside setup() (and having a transit.mov file in the data folder, as you can see on the screen shot.

screen shot 2018-06-02 at 10 04 50 pm