This commit is contained in:
shikong 2024-03-15 11:26:10 +08:00
parent 04cfcfd22a
commit f8ce65d15b
2 changed files with 3 additions and 3 deletions

View File

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

View File

@ -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();