3 Commits 9c7c399e12 ... 744de3355e

Author SHA1 Message Date
  Aladding 744de3355e Merge branch 'master' of http://124.70.58.209:3000/ytrd-project-management/GeoHazardMonitor 9 months ago
  Aladding cf19ba9790 格式化代码,下上版本相同 9 months ago
  Aladding 49cefa9e1f 使用文件参数方式合并,仅为备份代码,未测试 9 months ago
1 changed files with 5 additions and 6 deletions
  1. 5 6
      hazard-admin/src/main/java/com/ozs/web/core/util/CameraUtil.java

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

@@ -439,12 +439,11 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
         	if (!videoFile.exists()) {
         		return;
         	}
-        	validFileList.add(filePath);
         	log.info("file:{}", filePath);
+
+        	validFileList.add(filePath);
         	
-        	argFileTxt.append("file ")
-        		.append("'").append(filePath).append(".").append(System.lineSeparator());
-        	
+        	argFileTxt.append("file '").append(filePath).append("'").append(System.lineSeparator());
         });
         
         if (!flay) {
@@ -467,8 +466,8 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
         }
         
         StringBuilder cmd = new StringBuilder(ffmpegPath);
-        cmd.append(" concat -i")
-        		.append(argFileName)
+        cmd.append(" -f concat -i ")
+        		.append(argFile.getAbsolutePath())
 	        	.append(" -c copy ")
 	        	.append(newfilePath);