Open benjaminpick opened 12 years ago
After reading SO comments, I've decided for xuggler. However, after implementing it I realised that it didn't work - see branch xuggler (using version 5.4). If somebody knows how to resolve these errors, please let me know:
java.lang.NoSuchMethodError: org.slf4j.Logger.trace(Ljava/lang/String;Ljava/lang/Object;)V
at com.xuggle.ferry.JNILibrary.getNativeManifests(JNILibrary.java:67)
at com.xuggle.ferry.JNILibrary.generateCandidateLibraryURLs(JNILibrary.java:353)
at com.xuggle.ferry.JNILibrary.loadFromClasspath(JNILibrary.java:191)
at com.xuggle.ferry.JNILibrary.load(JNILibrary.java:176)
at com.xuggle.ferry.JNILibrary.load(JNILibrary.java:158)
at com.xuggle.ferry.FerryJNI.<clinit>(FerryJNI.java:16)
at com.xuggle.ferry.Ferry.<clinit>(Ferry.java:25)
at com.xuggle.xuggler.XugglerJNI.<clinit>(XugglerJNI.java:19)
at com.xuggle.xuggler.IContainer.<clinit>(IContainer.java:1622)
at com.xuggle.mediatool.MediaReader.<init>(MediaReader.java:137)
at com.xuggle.mediatool.ToolFactory.makeReader(ToolFactory.java:77)
at de.uni_siegen.wineme.come_in.thumbnailer.thumbnailers.XugglerVideoThumbnailer.generateThumbnail(XugglerVideoThumbnailer.java:72)
at de.uni_siegen.wineme.come_in.thumbnailer.thumbnailers.XugglerVideoThumbnailer.generateThumbnail(XugglerVideoThumbnailer.java:60)
at de.uni_siegen.wineme.come_in.thumbnailer.ThumbnailerManager.executeThumbnailers(ThumbnailerManager.java:330)
at de.uni_siegen.wineme.come_in.thumbnailer.ThumbnailerManager.generateThumbnail(ThumbnailerManager.java:289)
at de.uni_siegen.wineme.come_in.thumbnailer.ThumbnailerManager.generateThumbnail(ThumbnailerManager.java:311)
at de.uni_siegen.wineme.come_in.thumbnailer.test.ThumbnailerFileTestDummy._create_thumbnail(ThumbnailerFileTestDummy.java:92)
at de.uni_siegen.wineme.come_in.thumbnailer.test.ThumbnailerFileTestDummy.create_thumbnail(ThumbnailerFileTestDummy.java:83)
at de.uni_siegen.wineme.come_in.thumbnailer.test.ThumbnailerFileTestDummy.create_thumbnail(ThumbnailerFileTestDummy.java:74)
at de.uni_siegen.wineme.come_in.thumbnailer.test.ThumbnailGeneratorBasicTest.generateThumbnail(ThumbnailGeneratorBasicTest.java:31)
[...]
and
java.lang.NoClassDefFoundError: Could not initialize class com.xuggle.xuggler.IContainer
at com.xuggle.mediatool.MediaReader.<init>(MediaReader.java:137)
at com.xuggle.mediatool.ToolFactory.makeReader(ToolFactory.java:77)
at de.uni_siegen.wineme.come_in.thumbnailer.thumbnailers.XugglerVideoThumbnailer.generateThumbnail(XugglerVideoThumbnailer.java:72)
at de.uni_siegen.wineme.come_in.thumbnailer.thumbnailers.XugglerVideoThumbnailer.generateThumbnail(XugglerVideoThumbnailer.java:60)
at de.uni_siegen.wineme.come_in.thumbnailer.ThumbnailerManager.executeThumbnailers(ThumbnailerManager.java:330)
at de.uni_siegen.wineme.come_in.thumbnailer.ThumbnailerManager.generateThumbnail(ThumbnailerManager.java:289)
at de.uni_siegen.wineme.come_in.thumbnailer.ThumbnailerManager.generateThumbnail(ThumbnailerManager.java:311)
at de.uni_siegen.wineme.come_in.thumbnailer.test.ThumbnailerFileTestDummy._create_thumbnail(ThumbnailerFileTestDummy.java:92)
at de.uni_siegen.wineme.come_in.thumbnailer.test.ThumbnailerFileTestDummy.create_thumbnail(ThumbnailerFileTestDummy.java:83)
at de.uni_siegen.wineme.come_in.thumbnailer.test.ThumbnailerFileTestDummy.create_thumbnail(ThumbnailerFileTestDummy.java:74)
at de.uni_siegen.wineme.come_in.thumbnailer.test.ThumbnailGeneratorBasicTest.generateThumbnail(ThumbnailGeneratorBasicTest.java:31)
Note: if you want to use FFmpeg for thumbnailing, you can look into the http://ffmpeg.org/ffmpeg-filters.html#thumbnail filter, or maybe better the scene detection system of the select filter: http://ffmpeg.org/ffmpeg-filters.html#aselect_002c-select (see examples). Or you can just simply pick the first or N frame.
Wow, thank you very much, I didn't even know such a feature existed!
JMF? ffmpeg?