|
@@ -42,18 +42,17 @@ public class CreateObjUtil{
|
|
|
|
|
|
/**
|
|
|
* 生成水印视频
|
|
|
- * @param folderName
|
|
|
- * @param isModel
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public static void generateShareVideo(String videoPath) throws Exception{
|
|
|
log.info("生成水印视频开始");
|
|
|
- String fileName = videoPath.substring(videoPath.lastIndexOf("/"));
|
|
|
+ String fileName = videoPath.substring(videoPath.lastIndexOf("/") + 1);
|
|
|
String fileFolderPath = videoPath.substring(0, videoPath.lastIndexOf("/") + 1);
|
|
|
String command = "4dage-ffmpeg-rotVwatermark -s " + videoPath
|
|
|
+ " -w " + Constant.WATER_MARK_PATH
|
|
|
+ " -n " + fileName + Constant.SCENE_VIDEO_SHARE_SUFFIX
|
|
|
- + " -o" + fileFolderPath;
|
|
|
+ + " -o " + fileFolderPath;
|
|
|
+ log.info("调用脚本命令-{}", command);
|
|
|
callshell(command);
|
|
|
log.info("生成水印视频结束");
|
|
|
}
|
|
@@ -252,7 +251,7 @@ public class CreateObjUtil{
|
|
|
outGobbler.start();
|
|
|
process.waitFor();
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ log.error("调用脚本报错,命令-{}, 错误原因", command, e);
|
|
|
}
|
|
|
}
|
|
|
|