Ver código fonte

多元融合

lyhzzz 3 semanas atrás
pai
commit
c56e49ea64

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

@@ -30,7 +30,7 @@ public class VideoUtil {
             StringBuilder tsPath = new StringBuilder();
             tsPath.append("ffmpeg");
             tsPath.append(" -i ");
-            tsPath.append("concat:");
+            tsPath.append("'concat:");
             for (int t = 0; t < voidTS.size(); t++) {
                 if (t != voidTS.size() - 1) {
                     tsPath.append(voidTS.get(t) + "|");
@@ -38,12 +38,8 @@ public class VideoUtil {
                     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);
             ShellUtil.execCmd(tsPath.toString());