Procházet zdrojové kódy

相机回放视频过滤排序

hexiao před 2 roky
rodič
revize
22eba3c635

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

@@ -186,12 +186,12 @@ public class CameraUtil {
             command.add("h264_mp4toannexb");
             command.add("-f");
             command.add("mpegts");
-            command.add(fromVideoFile.substring(0,
-                    fromVideoFile.lastIndexOf(".")) + ".ts");
+            fromVideoFile = fromVideoFile.substring(fromVideoFile.lastIndexOf("/") + 1, fromVideoFile.length());
+            String n = flvPath + fromVideoFile.substring(0,
+                    fromVideoFile.lastIndexOf("."));
+            command.add(n + ".ts");
             builder = new ProcessBuilder(command);
-            voidTS.add(fromVideoFile.substring(0,
-                    fromVideoFile.lastIndexOf("."))
-                    + ".ts");
+            voidTS.add(n + ".ts");
             try {
                 process = builder.start();
                 InputStream errorStream = process