我正在尝试使用OpenIMAJ加载视频。它确实显示了视频,但总是向我显示以下错误:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/MaryLu/.m2/repository/ch/qos/logback/logback-classic/1.0.0/logback-classic-1.0.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/MaryLu/.m2/repository/org/slf4j/slf4j-log4j12/1.7.2/slf4j-log4j12-1.7.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.selector.DefaultContextSelector]
16/04/24 20:39:57 INFO xuggle.XuggleVideo: URL file:/F:/workspaceMaven/keyboardcat.flv could not be opened by ffmpeg. Trying to open a stream to the URL instead.
20:39:57.984 [main] DEBUG com.xuggle.xuggler - Could not open output url: file:/F:/workspaceMaven/keyboardcat.flv (../../../../../../../csrc/com/xuggle/xuggler/Container.cpp:436)我已经检查了类似的问题,但我没有设法解决这个问题。如果我理解的话,我需要在我的POM.xml中的某个地方排除slf4j,但我真的不知道哪个依赖项。
发布于 2016-04-25 02:56:16
答案已经在您的日志文件中给出了。按照教程进行操作。
http://www.slf4j.org/codes.html#multiple_bindings
正如Wouter所说的
运行mvn dependency:tree并搜索具有您不想要的slf4j实现的依赖项,然后使用依赖项排除排除它们,如下所示:
<dependency>
<groupId>org.someexternallib</groupId>
<artifactId>someexternallibartifact</artifactId>
<version>...</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>发布于 2016-04-25 02:54:58
slf4j消息只是告诉您,您的slf4j配置已损坏,因此它将恢复为默认配置。
真正的问题是,您的URL并没有像您所期望的那样指向本地文件,因为它已经损坏,所以尝试使用它的代码会失败。损坏的一个可能原因可能是您已经在某个地方打开了文件,因此Windows不允许覆盖它。
发布于 2017-10-14 03:59:51
<exclusion>
<artifactId>logback-classic</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
<exclusion>
<artifactId>slf4j-simple</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>为了找到使用上述工件的依赖项,请通过"$ mvn dependency:tree“查找,一旦发现,就将上述排除项放在相应的依赖项上。这应该会解决这个问题,我会说要注意特定的依赖关系。
https://stackoverflow.com/questions/36827420
复制相似问题