使用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 #
引入依赖:
org.bytedeco javacv 1.4.3 org.bytedeco.javacpp-presets ffmpeg-platform 4.0.2-1.4.3
在执行到 ff.start()处报错,错误信息如图上所示。
FFmpegframeGrabber ff = null;
byte[] data = null;
ByteArrayOutputStream os = new ByteArrayOutputStream();
try {
ff = new FFmpegframeGrabber(videoPath);
ff.start();
万分感谢!!!



