|
@@ -723,6 +723,7 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
|
|
|
for (String line : commands) {
|
|
|
out.println(line);
|
|
|
}
|
|
|
+ out.println("exit");// 这个命令必须执行,否则in流不结束。
|
|
|
String rspLine = "";
|
|
|
while ((rspLine = in.readLine()) != null) {
|
|
|
System.out.println(rspLine);
|
|
@@ -731,7 +732,9 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
|
|
|
int i = proc.waitFor();
|
|
|
log.info("执行结果:{}", i);
|
|
|
|
|
|
-
|
|
|
+ in.close();
|
|
|
+ out.close();
|
|
|
+ proc.destroy();
|
|
|
} catch (IOException e) {
|
|
|
log.error(e.getMessage());
|
|
|
} catch (InterruptedException e) {
|