提交 9044c8b3 作者: 方治民

feat: 增加 ffmpeg 监测的异常判断

上级 39e45c1a
......@@ -50,8 +50,6 @@ public class UploadProcessServiceImpl implements UploadProcessService {
final Minio minio;
final EnvConfig env;
Pattern pattern = Pattern.compile("^.*\\.ts$");
@SneakyThrows
@Override
public String handle(String object, MultipartFile file) {
......@@ -115,7 +113,12 @@ public class UploadProcessServiceImpl implements UploadProcessService {
// 判断是否配置 ffmpeg 环境
FFmpeg ffmpeg = new FFmpeg();
FFprobe ffprobe = new FFprobe();
if (!ffmpeg.isFFmpeg() || !ffprobe.isFFprobe()) {
try {
if (!ffmpeg.isFFmpeg() || !ffprobe.isFFprobe()) {
return object;
}
} catch (Exception e) {
log.warn(e.getMessage());
return object;
}
......@@ -211,6 +214,7 @@ public class UploadProcessServiceImpl implements UploadProcessService {
executor.createJob(builder).run();
if (Files.exists(tempFile)) {
Pattern pattern = Pattern.compile("^.*\\.ts$");
// 解析 m3u8 文件
List<String> lines = FileUtil.readLines(tempFile.toString(), StandardCharsets.UTF_8);
// 获取 ts 切片文件
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论