Browse Source

合并视频bug

Aladding 7 months ago
parent
commit
69410a781b

+ 1 - 1
hazard-admin/src/main/java/com/ozs/web/core/util/CameraUtil.java

@@ -463,7 +463,7 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
         }
         }
         
         
         StringBuilder cmd = new StringBuilder(ffmpegPath);
         StringBuilder cmd = new StringBuilder(ffmpegPath);
-        cmd.append(" -f concat -i ")
+        cmd.append(" -f concat -safe 0 -i ")
         		.append(argFile.getAbsolutePath())
         		.append(argFile.getAbsolutePath())
 	        	.append(" -c copy ")
 	        	.append(" -c copy ")
 	        	.append(newfilePath);
 	        	.append(newfilePath);