英文:
Java OpenCv VideoWriter wont open OpenCv 4.4.0
问题
public void save(String filename) {
Size size = new Size(this.shape[0], this.shape[1]);
VideoWriter videoWriter = new VideoWriter(filename, 0, this.fps, size, true);
System.out.println(videoWriter.open(filename, 0, this.fps, size, true));
for (Mat frame : this.frames) {
videoWriter.write(frame);
}
videoWriter.release();
}
Im using java jdk 14.0.2, OpenCv 4.4.0 and Intellij
Im trying to combine the frames in the ArrayList this.frames.
When i check if videoWriter is open it returns false.
Iv'e tried OpenCv 3.4.0 which managed to create a file but not write to it.
英文:
public void save(String filename){
Size size = new Size(this.shape[0], this.shape[1]);
VideoWriter videoWriter = new VideoWriter(filename, 0, this.fps , size, true);
System.out.println(videoWriter.open(filename, 0, this.fps , size, true));
for(Mat frame : this.frames) {
videoWriter.write(frame);
}
videoWriter.release();
}
Im using java jdk 14.0.2, OpenCv 4.4.0 and Intellij
Im trying to combine the frames in the ArrayList this.frames.
When i check if videoWriter is open it returns false.
Iv'e tried OpenCv 3.4.0 which managed to create a file but not write to it.
答案1
得分: 1
将在OpenCV zip文件的bin文件夹中找到的ffmpeg dll移动到opencv_440.dll的位置。
英文:
Moving the ffmpeg dll found in the bin folder of the opencv zip to the location of the opencv_440.dll.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论