|
@@ -299,12 +299,14 @@ public class CameraUtil {
|
|
|
// 合并成一个临时文件
|
|
|
commands.add(commit);
|
|
|
// 临时文件转化为 flv
|
|
|
- commands.add(commit1);
|
|
|
+// commands.add(commit1);
|
|
|
log.info("录像视频命令:{}", commands);
|
|
|
for (String line : commands) {
|
|
|
log.info("命令:{}", line);
|
|
|
out.println(line);
|
|
|
}
|
|
|
+ log.info("命令:{}", commit1);
|
|
|
+ execute(commit1);
|
|
|
try {
|
|
|
Thread.currentThread().sleep(10000);
|
|
|
} catch (InterruptedException e) {
|
|
@@ -549,6 +551,16 @@ public class CameraUtil {
|
|
|
return listFiles;
|
|
|
}
|
|
|
|
|
|
+ public static void execute(String command) {
|
|
|
+ try {
|
|
|
+ ProcessBuilder process = new ProcessBuilder(command);
|
|
|
+ process.inheritIO().start().waitFor();
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
public static void main(String[] args) throws InterruptedException, ParseException, IOException {
|
|
|
// CameraUtil cameraUtil = new CameraUtil();
|
|
|
// cameraUtil.closeRecording();
|