lyhzzz 3 年之前
父節點
當前提交
011bddd58a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/main/java/com/fdkankan/fusion/common/util/VideoUtil.java

+ 1 - 1
src/main/java/com/fdkankan/fusion/common/util/VideoUtil.java

@@ -82,7 +82,7 @@ public class VideoUtil {
 
             for (String fromVideoFile : fromVideoFileList) {
                 String format = "%s -y -i %s -vcodec copy -bsf:v h264_mp4toannexb -f mpegts %s";
-                String name = fromVideoFile.substring(0, fromVideoFile.lastIndexOf("."));
+                String name = UUID.randomUUID().toString().replace("-","");
                 String command = String.format(format, "ffmpeg", fromVideoFile, newVideoFile +"/"+name + ".ts");
                 execCommand(command);
                 voidTS.add(name + ".ts");