我正在尝试编写布朗运动监控程序。测试代码看起来很好,但我无法从草图文件夹下载视频,也不能以.avi或.mov格式下载,窗口打开但它只显示灰色背景。来自控制台的消息:
java.lang.RuntimeException: Could not load movie file Video1.mov
at processing.core.PApplet.die(PApplet.java:3605)
at processing.core.PApplet.die(PApplet.java:3614)
at processing.video.Movie.initGStreamer(Unknown Source)
at processing.video.Movie.<init>(Unknown Source)
at Particles_monitor.setup(Particles_monitor.java:28)
at processing.core.PApplet.handleDraw(PApplet.java:2401)
at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1557)
at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:316)
我试过了:
以下是代码:
import gab.opencv.*;
import processing.video.*;
Movie video;
void setup() {
size (640, 480);
video = new Movie(this, "Video1.avi");
video.play();
}
void movieEvent(Movie video) {
video.read();
}
void draw() {
image(video, 0, 0);
}
文件大小为51 Mb,长度为9分27秒。