how do you enable a Movie myMovie in a processing sketch to play on the web

edited November 2013 in JavaScript Mode

I'm asking this question because I checked at least 50 sketches on openprocessing.org which had the Movie declaration in them and NONE of them ran. I have been working on this for days and have studied the processingjs help files and comments on google groups, and several other fora. I have gathered and tried pieces relating to HTML5 (I am pretty well-versed in HTML.). (I am not having an issue with "your browser does not run this format" kind of an error.)

The issue might be centered around the fact Movie is not recognized by js, and it wants video, but in the sketch, video is the name of the library.

After my days of efforts, I am wondering if my question should be "can you enable . . . "

What I really would like is if someone can point me to a sketch running on the web that plays a movie used in the sketch-- of course one that shows the code -- but even looking at the HTML source of the page would get rid of one avenue of problems!!

Cheers all, and I'm back to creating instead of banging my head against the brick wall!

Answers

  • Answer ✓

    HTML video is still being developed and there is no format that works everywhere. I'm not talking about Processing.js, but video online in general. One browser supports one format, and another browser supports a different one.

    Maybe I'm wrong, but I think you can't play video inside Processing.js yet. I haven't heard of any video library for Processing.js. Remember that none of the Processing libraries work on Processing.js.

    If you just need plain video next to a Processing.js program, you can embed a video in the html page (maybe from YouTube), and control it from Processing.js via JavaScript. But this only allows simple playback, not real time analysis of the video frames and manipulation.

    It also possible to do experimental video effects directly in JavaScript. You can search for "html5 video effects javascript", maybe you find something.

    Cheers!

  • edited November 2013

    @hamoid -- thank you. I had begun to have doubts about my sanity! (There may still be doubts but I can now cross this off as one of the causes.)]

    What I'm thinking now is that, when I decide to try to show my sketch developing is that I will save all the frames, create a movie from that and put that into the page. But, right now I am tired of all this so will put it on my "to do" list when and if I have an idle moment. For now I've just put the the still.

    http://www.clairdunn.com/the-blended-wall.htm

    Thanks again!

  • Answer ✓

    The image looks beautiful :)

    I recorded a tutorial about exporting and uploading movies: http://funprogramming.org/114-How-to-create-movies-using-Processing.html Maybe it helps.

    Cheers!

  • _vk_vk
    Answer ✓

    Would an image sequence work for you? If you can get a frame rate of at least 24 fps you may "play" a video yourself : ). I've made this locally, and works great. Like... load each frame in a PImage array and play with... Several tools can export a movie into an image sequence, which is nothing else than a folder with all the frames of your movie in an image forma, like tif, png, targa, jpg. Quicktime 7 (now free) can for instance...

  • @hamoid -- are you the man behing funprocessing.org?? I look at the materials there a lot.

    If you are, I thank you much for your work.

    @_vk -- yes that is the way around my "unsolvable" problem. Fake the creation of the slit-scan.

    And, yes that is exactly what I will eventually do -- I run Linux with Mint 15. Thank you for this particularly clear explanation, hamoid!

    Clair

Sign In or Register to comment.