I have lots of short video clips that I want to be played back one after another in a random order.
The only method I can see is to use the duration() function to get the length of the clip when I start playing it, then store that value in a variable and decrement it every second until it reaches 0, then start the next clip and continue the process. The problem is that duration() always returns 0.0. The clips all play fine via the play() function and they are obviously not 0 seconds long, so what could be the issue?
Here's some code that I have in my setup function:
Movie[] shortContent = new Movie[13];
for (int i = 0; i < shortContent.length; i++ )
shortContent[i] = new Movie(this, "Content_JS_S_"+i+".avi");
for (int i = 0; i < shortContent.length; i++ )
print("Duration: " + shortContent[i].duration());
All of those movie clips play back just fine, but the code prints "Duration: 0.0" for every single one of them. If I call duration() in my draw function the same thing happens.
What could the problem be? Or is there a better way to randomly sequence video clips? Im using processing 2.0b6
I am using Processing 2.0b3 and trying to run the sample
video playback code. I always get the error:
Could not load movie file movieName.mov. I have tried using different video files, including one mov that I was able to use without issue in an older version of processing. What could be the issue? My video file is in the same folder as my project file and I have not altered the sample code in any way other than changing the video file name.
Also, what video types does processing support? I would rather use .avi but can't find any info on whether or not processing can use it.