在诓骗FFmpegFrameGrabber处理视频流91porn download,将视频一帧一帧取出来的经过中
遭受一个报错:Could not initialize class org.bytedeco.javacpp.avutil
网上查找府上发现是少引入了包
关联词增多之后又会有其他的报错91porn download,如:Exception in thread "main" java.lang.NoClassDefFoundError: org/bytedeco/javacpp/PointerScope
查来查去,发现是由于依赖包之间不匹配导致,修改成一致之后惩处:
我是引入了底下两个就没问题了:
<dependency><groupId>org.bytedeco</groupId><artifactId>javacv</artifactId><version>1.4.3</version></dependency><dependency><groupId>org.bytedeco.javacpp-presets</groupId><artifactId>ffmpeg-platform</artifactId><version>4.0.2-1.4.3</version></dependency>
不错从这里检察对应版块:
http://bytedeco.org/download/
2018年最新国产在线视频附视频流截取帧的中枢代码:91porn download
FFmpegFrameGrabber frameGrabber = new FFmpegFrameGrabber(new File(System.getProperty("user.dir") + "/test.h264"));frameGrabber.setFrameRate(100);frameGrabber.setFormat("h264");frameGrabber.setVideoBitrate(15);frameGrabber.setVideoOption("preset", "ultrafast");frameGrabber.setNumBuffers(25000000);Java2DFrameConverter converter = new Java2DFrameConverter();frameGrabber.start();Frame frame = frameGrabber.grab();BufferedImage bufferedImage = converter.convert(frame);File file = new File(System.getProperty("user.dir") + "/temp/image_" + count + ".jpg");ImageIO.write(bufferedImage, "jpg", file);baos.flush();baos.close();本站仅提供存储作事,通盘实质均由用户发布,如发现存害或侵权实质,请点击举报。