We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Playing a video (Read 899 times)
Playing a video
Oct 15th, 2009, 2:09pm
 

Ookay, I;ve read the warning that Processing is not extremely good at playing videos, but I need a short video to be shown in my program

I do this:

import processing.video.*;
Movie myMovie;
...
  void draw() {
...
myMovie = new Movie(this, "video.mp4");
myMovie.loop();

...

I hear the sound from the video for about one second, the image never shows up, and then I stops. is it because of file format or what?

What could I do to make it work? Thanks in advance
Re: Playing a video
Reply #1 - Nov 3rd, 2009, 2:23pm
 
I don't do a lot of videos but here I go. Do you need to actually display the video on screen to see it? In your code you don't have "display this video at (x,y)" anywhere so how can processing display it? I suggest you read the processing examples on video, especially the one where video is played where your mouse it at. There you will find out how to display.

Read this:
http://processing.org/learning/libraries/loop.html
Re: Playing a video
Reply #2 - Nov 3rd, 2009, 2:33pm
 
i would test it with a mov file just to make sure its not a mp4 problem, i am not sure it mp4 can be shown using processing. maybe anybody else knows more about it.
Page Index Toggle Pages: 1