|
@@ -172,7 +172,9 @@ public class CameraUtil {
|
|
|
Process process = null;
|
|
|
ProcessBuilder builder = null;
|
|
|
List<String> command = null;
|
|
|
-
|
|
|
+ String substr = fromVideoFileList.get(0).substring(0, fromVideoFileList.get(0).lastIndexOf("/"));
|
|
|
+ log.info("substr:{}", substr);
|
|
|
+ Runtime.getRuntime().exec("chmod 777 " + substr);
|
|
|
for (int i = 0; i < fromVideoFileList.size(); i++) {
|
|
|
String fromVideoFile = fromVideoFileList.get(i);
|
|
|
command = new ArrayList<String>();
|
|
@@ -186,12 +188,11 @@ public class CameraUtil {
|
|
|
command.add("h264_mp4toannexb");
|
|
|
command.add("-f");
|
|
|
command.add("mpegts");
|
|
|
- fromVideoFile = fromVideoFile.substring(fromVideoFile.lastIndexOf("/") + 1, fromVideoFile.length());
|
|
|
- String n = flvPath + fromVideoFile.substring(0,
|
|
|
- fromVideoFile.lastIndexOf("."));
|
|
|
- command.add(n + ".ts");
|
|
|
+ command.add(fromVideoFile.substring(0,
|
|
|
+ fromVideoFile.lastIndexOf(".")) + ".ts");
|
|
|
builder = new ProcessBuilder(command);
|
|
|
- voidTS.add(n + ".ts");
|
|
|
+ voidTS.add(fromVideoFile.substring(0,
|
|
|
+ fromVideoFile.lastIndexOf(".")) + ".ts");
|
|
|
try {
|
|
|
process = builder.start();
|
|
|
InputStream errorStream = process
|