|
@@ -72,21 +72,15 @@ public class CameraUtil {
|
|
|
if (ObjectUtils.isEmpty(fromVideoFileList) || fromVideoFileList.size() <= 0) {
|
|
|
throw new BaseException("当前相机无视频录像");
|
|
|
}
|
|
|
- Thread thread = new Thread(() -> {
|
|
|
+ new Thread(() -> {
|
|
|
try {
|
|
|
myConvetor(fromVideoFileList, NewfilePath, uuid);
|
|
|
} catch (IOException e) {
|
|
|
log.error(e.getMessage());
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
- });
|
|
|
- thread.start();
|
|
|
- try {
|
|
|
- thread.sleep(10000);
|
|
|
- } catch (InterruptedException e) {
|
|
|
- log.error(e.getMessage());
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
+ }).start();
|
|
|
+
|
|
|
return Constants.RESOURCE_PREFIX + "/" + ph;
|
|
|
}
|
|
|
|
|
@@ -306,15 +300,21 @@ public class CameraUtil {
|
|
|
commands.add(commit);
|
|
|
// 临时文件转化为 flv
|
|
|
commands.add(commit1);
|
|
|
-
|
|
|
- commands.add("rm -rf " + pathStr + "/" + substring);
|
|
|
-
|
|
|
log.info("录像视频命令:{}", commands);
|
|
|
for (String line : commands) {
|
|
|
log.info("命令:{}", line);
|
|
|
out.println(line);
|
|
|
}
|
|
|
+ try {
|
|
|
+ Thread.currentThread().sleep(10000);
|
|
|
+ } catch (InterruptedException e) {
|
|
|
+ log.error(e.getMessage());
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ out.println("rm -rf " + pathStr + "/" + substring);
|
|
|
+ log.info("命令:{}", "rm -rf " + pathStr + "/" + substring);
|
|
|
out.println("exit");// 这个命令必须执行,否则in流不结束。
|
|
|
+ log.info("命令:{}", "exit");
|
|
|
String rspLine = "";
|
|
|
while ((rspLine = in.readLine()) != null) {
|
|
|
log.info("*****:{}", rspLine);
|