Browse Source

视频回放

hexiao 1 year ago
parent
commit
0450476a1a
1 changed files with 3 additions and 2 deletions
  1. 3 2
      hazard-admin/src/main/java/com/ozs/web/core/util/CameraUtil.java

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

@@ -381,8 +381,9 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.flv
         File file = new File(newfilePath);
         boolean flay = false;
         if (!file.getParentFile().exists()) {
-            file.getParentFile().mkdirs();
+            boolean mkdirs = file.getParentFile().mkdirs();
             log.info("创建文件夹:{}", file.getParentFile().getPath());
+            log.info("创建文件夹结果:{}", mkdirs);
             flay = true;
         }
         log.info("newfilePath:{}", newfilePath);
@@ -826,7 +827,7 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.flv
                 Object o = mergeVideoTsFile.get(s);
                 Date fileTime = new Date(Long.parseLong(s));
                 calendar.setTime(fileTime);
-                calendar.add(calendar.MINUTE, 10); //把日期往后增加10分钟,整数  往后推,负数往前移动
+                calendar.add(calendar.MINUTE, 30); //把日期往后增加10分钟,整数  往后推,负数往前移动
                 fileTime = calendar.getTime(); //这个时间就是日期往后推一天的结果
                 if (date.compareTo(fileTime) > 0) {
                     List<String> list = (List<String>) o;