diff --git a/gb28181-wvp-proxy-service/src/main/java/cn/skcks/docking/gb28181/wvp/service/ffmpeg/FfmpegSupportService.java b/gb28181-wvp-proxy-service/src/main/java/cn/skcks/docking/gb28181/wvp/service/ffmpeg/FfmpegSupportService.java index 8a2bc24..382f43c 100644 --- a/gb28181-wvp-proxy-service/src/main/java/cn/skcks/docking/gb28181/wvp/service/ffmpeg/FfmpegSupportService.java +++ b/gb28181-wvp-proxy-service/src/main/java/cn/skcks/docking/gb28181/wvp/service/ffmpeg/FfmpegSupportService.java @@ -27,7 +27,7 @@ public class FfmpegSupportService { String outputParam = debug.getOutput() ? rtp.getOutput() : StringUtils.joinWith(" ", "-t", unit.toSeconds(time), rtp.getOutput(), out); log.info("视频输出参数 {}", outputParam); - return ffmpegExecutor(inputParam, outputParam, time + 15, unit, streamHandler, executeResultHandler); + return ffmpegExecutor(inputParam, outputParam, unit.toSeconds(time) + 15, TimeUnit.SECONDS, streamHandler, executeResultHandler); } @SneakyThrows @@ -45,7 +45,7 @@ public class FfmpegSupportService { String outputParam = debug.getOutput() ? rtp.getOutput() : StringUtils.joinWith(" ", rtp.getOutput(), out); log.info("视频输出参数 {}", outputParam); - return ffmpegExecutor(inputParam, outputParam, time, unit, streamHandler, executeResultHandler); + return ffmpegExecutor(inputParam, outputParam, unit.toSeconds(time) + 15, TimeUnit.SECONDS, streamHandler, executeResultHandler); } @SneakyThrows diff --git a/gb28181-wvp-proxy-service/src/main/java/cn/skcks/docking/gb28181/wvp/service/video/VideoService.java b/gb28181-wvp-proxy-service/src/main/java/cn/skcks/docking/gb28181/wvp/service/video/VideoService.java index 46a6a51..1acf3f4 100644 --- a/gb28181-wvp-proxy-service/src/main/java/cn/skcks/docking/gb28181/wvp/service/video/VideoService.java +++ b/gb28181-wvp-proxy-service/src/main/java/cn/skcks/docking/gb28181/wvp/service/video/VideoService.java @@ -262,7 +262,7 @@ public class VideoService { log.info("到达结束时间, 结束录制 {}", url); executor.getWatchdog().destroyProcess(); log.info("结束录制 {}", url); - }, time, TimeUnit.SECONDS); + }, time + 15, TimeUnit.SECONDS); executeResultHandler.waitFor(); schedule.cancel(true); DateTime endTime = DateUtil.date();