• 微信公众号:美女很有趣。 工作之余,放松一下,关注即送10G+美女照片!

使用javavc截取视频第一帧放在服务器报错

开发技术 开发技术 4小时前 1次浏览

使用javavc进行视频截取第一帧时,在windows平台能够正常截取。在linux(centos7)上报错,信息如下:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000000000d596, pid=1, tid=0x00007fe629a0cb10
#
# JRE version: OpenJDK Runtime Environment (8.0_212-b04) (build 1.8.0_212-b04)
# Java VM: OpenJDK 64-Bit Server VM (25.212-b04 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 3.12.0
# Distribution: Custom build (Sat May  4 17:33:35 UTC 2019)
# Problematic frame:
# C  0x000000000000d596
#
# Core dump written. Default location: //core or core.1
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid1.log
#

引入依赖:

 <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>

在执行到 ff.start()处报错,错误信息如图上所示。

FFmpegFrameGrabber ff = null;
byte[] data = null;
   ByteArrayOutputStream os = new ByteArrayOutputStream();
   try {
       ff = new FFmpegFrameGrabber(videoPath);
       ff.start();
       

还请各位大佬帮帮忙,万分感谢!!!


程序员灯塔
转载请注明原文链接:使用javavc截取视频第一帧放在服务器报错
喜欢 (0)