Advertisement
xeromino

video

Mar 9th, 2017
179
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import processing.video.*;
  2.  
  3. // Step 1. Declare a Movie object.
  4. Movie movie;
  5.  
  6. void setup() {  
  7.   size(320, 240);  
  8.  
  9.   // Step 2. Initialize Movie object. The file "testmovie.mov" should live in the data folder.
  10.   movie = new Movie(this, "testmovie.mov");  
  11.  
  12.   // Step 3. Start playing movie. To play just once play() can be used instead.
  13.   movie.loop();
  14. }
  15.  
  16. // Step 4. Read new frames from the movie.
  17. void movieEvent(Movie movie) {  
  18.   movie.read();
  19. }
  20.  
  21. // Step 5. Display movie.
  22. void draw() {
  23.   image(movie, 0, 0);
  24. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement