From 1e5166c403ed9b591684016ae44467aeb4f73bc4 Mon Sep 17 00:00:00 2001 From: 86156 <823267011@qq.com> Date: Sun, 28 Sep 2025 18:30:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-video/pom.xml | 33 +++++++++++++++++++ .../thread/MediaTransferFlvByJavacv.java | 4 +-- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/ruoyi-video/pom.xml b/ruoyi-video/pom.xml index 6d43c9c..c63639f 100644 --- a/ruoyi-video/pom.xml +++ b/ruoyi-video/pom.xml @@ -36,13 +36,22 @@ org.bytedeco javacv-platform 1.5.12 + + + org.bytedeco + opencv + + + + org.bytedeco opencv-platform 4.11.0-1.5.12 + com.fasterxml.jackson.core @@ -79,4 +88,28 @@ + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.4.1 + + + enforce-versions + + enforce + + + + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-video/src/main/java/com/ruoyi/video/thread/MediaTransferFlvByJavacv.java b/ruoyi-video/src/main/java/com/ruoyi/video/thread/MediaTransferFlvByJavacv.java index 92e04fc..4b3f4e5 100644 --- a/ruoyi-video/src/main/java/com/ruoyi/video/thread/MediaTransferFlvByJavacv.java +++ b/ruoyi-video/src/main/java/com/ruoyi/video/thread/MediaTransferFlvByJavacv.java @@ -480,8 +480,8 @@ public class MediaTransferFlvByJavacv extends MediaTransfer implements Runnable } // 记录帧 - if (frame != null) { - long now = System.currentTimeMillis(); + if (frame != null) { long now = System.currentTimeMillis(); + if (startTime == 0) startTime = now; videoTS = 1000 * (now - startTime); if (videoTS > recorder.getTimestamp()) recorder.setTimestamp(videoTS);