when i export sketch as app video won't play

edited November 2014 in Using Processing

Hi,

i wrote a sketch that the app uses a pir sensor to trigger a video loop, so it use arduino and the native video library.

when my sketch is in pde form with works perfectly when i export it as an app it will not work (not video play back)

any input is appreciated.

Thanks,

Oli

Answers

  • edited November 2014

    If, for example, you have your video in the "data" folder of your sketch folder, you might be giving your sketch the relative path to your video (like "data/video.mov"). But, that won't work for your exported app because it is not placed in the same folder as your .pde.

    So, in order to solve that, just make your video's path absolute, like "C:/Users/User/Desktop/Sketch/data/video.mov", instead of just "data/video.mov" because then your exported app will know exactly where your video is placed.

    Of course, this might not be the cause of your problem, but without knowing more about your sketch (like it's source), that's all I can suggest.

    ...

    Actually, maybe giving the absolute path is not such a good idea, just put it in the data folder (as quark pointed out) which is in the same folder as the app.

  • When you export the application any resources needed by the sketch (e.g. movie file) MUST be inside the data folder if they are to be included in the export. In your code there is no need to prefix the resource file name with 'data/' as Processing will automatically look there for you.

  • hi, they are actually in the data folder so Im a bit stumped.

    i need it to all export together for use on different machine so i don't think its going to work by changing the file path of the video (won't be user friendly)

    any suggestions

  • thanks for the input so far btw!

  • You should check if the problem is the video playing or the Arduino communication. Processing had issues with the latter, solved only in the 3.x series, AFAIK.

    I suggest to make a simple sketch with video only, export it, and see if it works.

Sign In or Register to comment.