浏览代码

多元融合

lyhzzz 3 周之前
父节点
当前提交
c56e49ea64
共有 1 个文件被更改,包括 3 次插入7 次删除
  1. 3 7
      src/main/java/com/fdkankan/fusion/common/util/VideoUtil.java

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

@@ -30,7 +30,7 @@ public class VideoUtil {
             StringBuilder tsPath = new StringBuilder();
             StringBuilder tsPath = new StringBuilder();
             tsPath.append("ffmpeg");
             tsPath.append("ffmpeg");
             tsPath.append(" -i ");
             tsPath.append(" -i ");
-            tsPath.append("concat:");
+            tsPath.append("'concat:");
             for (int t = 0; t < voidTS.size(); t++) {
             for (int t = 0; t < voidTS.size(); t++) {
                 if (t != voidTS.size() - 1) {
                 if (t != voidTS.size() - 1) {
                     tsPath.append(voidTS.get(t) + "|");
                     tsPath.append(voidTS.get(t) + "|");
@@ -38,12 +38,8 @@ public class VideoUtil {
                     tsPath.append(voidTS.get(t));
                     tsPath.append(voidTS.get(t));
                 }
                 }
             }
             }
-            tsPath.append(" -vcodec ");
-            tsPath.append(" copy ");
-            tsPath.append(" -bsf:a ");
-            tsPath.append(" aac_adtstoasc ");
-            tsPath.append(" -movflags ");
-            tsPath.append(" +faststart ");
+            tsPath.append("'");
+            tsPath.append(" -c:v copy -c:a copy -bsf:a aac_adtstoasc -movflags +faststart ");
             tsPath.append(newVideoFile).append("/").append(fileName);
             tsPath.append(newVideoFile).append("/").append(fileName);
             ShellUtil.execCmd(tsPath.toString());
             ShellUtil.execCmd(tsPath.toString());