我正在做这,我遇到了一个问题。
这是我的密码
package vid;
import java.io.File;
import org.apache.log4j.BasicConfigurator;
import org.openimaj.image.MBFImage;
import org.openimaj.video.Video;
import org.openimaj.video.xuggle.XuggleVideo;
public class Movie{
public static void main(String[] args){
BasicConfigurator.configure();
Video<MBFImage> video;
video = new XuggleVideo(new File("in.flv"));
for (MBFImage mbfImage : video) {
//something
}
video.close();
}
}当我运行它的时候
21:18:51.520 [main] DEBUG com.xuggle.xuggler - Could not open output url: file:/D:/Workspace/openIMAJ/in.flv (../../../../../../../csrc/com/xuggle/xuggler/Container.cpp:436)
1 [main] INFO org.openimaj.video.xuggle.XuggleVideo - URL file:/D:/Workspace/openIMAJ/in.flv could not be opened by ffmpeg. Trying to open a stream to the URL instead.
Exception in thread "main" java.lang.NoClassDefFoundError: org/openimaj/io/InputStreamObjectReader
at org.openimaj.video.xuggle.XuggleVideo$MBFImageConverter.toImage(XuggleVideo.java:264)
at com.xuggle.mediatool.MediaReader.dispatchVideoPicture(MediaReader.java:600)
at com.xuggle.mediatool.MediaReader.decodeVideo(MediaReader.java:519)
at com.xuggle.mediatool.MediaReader.readPacket(MediaReader.java:475)
at org.openimaj.video.xuggle.XuggleVideo.readFrame(XuggleVideo.java:482)
at org.openimaj.video.xuggle.XuggleVideo.hasNextFrame(XuggleVideo.java:577)
at org.openimaj.video.VideoIterator.hasNext(VideoIterator.java:59)
at vid.Movie.main(Movie.java:17)
Caused by: java.lang.ClassNotFoundException: org.openimaj.io.InputStreamObjectReader
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 8 more还有我的pom.xml (长,所以我把它保存在烤箱里)。对于openIMAJ的不同部分有很多依赖关系,因为我已经失去了做什么的线索。我尝试在这之后下载lib,但是当我添加任何核心之外的东西时,我会得到
Missing artifact org.openimaj:video:jar:1.0.6-SNAPSHOT在上一个站点上提供的Libs与在Maven中央存储库中提供的Libs不同。所以,我的问题是,在哪里可以找到所需的类库(或者MCR中的哪个库可以帮助)?或者与openIMAJ站点上的教程兼容的libs。
谢谢你的帮助
发布于 2016-04-07 21:42:17
为什么要定义<sourceDirectory>src</sourceDirectory>?例如,不使用Maven被广泛接受的默认${project.basedir}/src/main/java。
OpenIMAJ Wiki页面的最新更新是来自2012年9月的。我会和Maven Central 2014年9月发布的最新版本1.3.1一起去。
如果您真的想使用快照:版本1.0.6-快照的core是2013年。有一个1.4-SNAPSHOT,它只有一个月的历史。这可能也适用于libs。我建议使用最新的。
https://stackoverflow.com/questions/36485651
复制相似问题