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) {
             for (String fromVideoFile : fromVideoFileList) {
                 String format = "%s -y -i %s -vcodec copy -bsf:v h264_mp4toannexb -f mpegts %s";
                 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");
                 String command = String.format(format, "ffmpeg", fromVideoFile, newVideoFile +"/"+name + ".ts");
                 execCommand(command);
                 execCommand(command);
                 voidTS.add(name + ".ts");
                 voidTS.add(name + ".ts");