根本原因在javacv和ffmpeg版本上。
先看官方推荐的配置:bytedeco/javacv: Java interface to OpenCV, FFmpeg, and more (github.com)
这里面截止2024年9月推荐的依赖是
<dependencies> <dependency> <groupId>org.bytedeco</groupId> <artifactId>javacv-platform</artifactId> <version>1.5.10</version> </dependency> <!-- Additional dependencies required to use CUDA and cuDNN --> <dependency>