0
當我嘗試導出處理視頻以在瀏覽器中工作的處理小程序時,我遇到了一個經常性問題。這是一個簡單的應用程序,用於停止,播放和暫停.mp4視頻。當我使用Processing IDE運行它時,它工作得很好。但在執行的時候我出口產生的index.html,視頻框變空,沒有什麼發生,我在控制檯收到此錯誤:導出視頻處理視頻小程序
Exception in thread "Animation Thread" java.lang.NoClassDefFoundError: Could not initialize class quicktime.QTSession
at processing.video.Movie.init(Unknown Source)
at processing.video.Movie.<init>(Unknown Source)
at processing.video.Movie.<init>(Unknown Source)
at sketch_nov14a.setup(sketch_nov14a.java:31)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
也許這是一個已知的問題,但我仍然無法找到解決方案:
這是代碼:
import processing.video.*;
Movie theMov;
boolean isPlaying;
boolean isLooping;
void setup() {
size(600,400,P2D);
theMov = new Movie(this, "http://www.sinopsedofilme.com.br/processing/video2.mp4");
/* only use 1 of the following options */
theMov.play(); //plays the movie once
theMov.loop(); //plays the movie over and over
isPlaying = true;
isLooping = true;
}
void draw() {
image(theMov, 0,0);
}
void movieEvent(Movie m) {
m.read();
}
void keyPressed() {
if (key == 'p') {
// toggle pausing
if (isPlaying) {
theMov.pause();
} else {
theMov.play();
}
isPlaying = !isPlaying;
} else if (key == 'l') {
// toggle looping
if (isLooping) {
theMov.noLoop();
} else {
theMov.loop();
}
isLooping = !isLooping;
} else if (key == 's') {
// stop playing
theMov.stop();
isPlaying = false;
} else if (key == 'j') {
// jump to a random time
theMov.jump(random(theMov.duration()));
}
}
哦,圖書館的喜悅沒有調試信息:( – 2010-11-14 15:25:34