|
@@ -46,11 +46,12 @@ public class CreateObjUtil{
|
|
*/
|
|
*/
|
|
public static void generateShareVideo(String videoPath) throws Exception{
|
|
public static void generateShareVideo(String videoPath) throws Exception{
|
|
log.info("生成水印视频开始");
|
|
log.info("生成水印视频开始");
|
|
- String fileName = videoPath.substring(videoPath.lastIndexOf("/") + 1);
|
|
|
|
|
|
+ String fileName = videoPath.substring(videoPath.lastIndexOf("/") + 1, videoPath.lastIndexOf("."));
|
|
|
|
+ String suffix = videoPath.substring(videoPath.lastIndexOf("."));
|
|
String fileFolderPath = videoPath.substring(0, videoPath.lastIndexOf("/") + 1);
|
|
String fileFolderPath = videoPath.substring(0, videoPath.lastIndexOf("/") + 1);
|
|
String command = "4dage-ffmpeg-rotVwatermark -s " + videoPath
|
|
String command = "4dage-ffmpeg-rotVwatermark -s " + videoPath
|
|
+ " -w " + Constant.WATER_MARK_PATH
|
|
+ " -w " + Constant.WATER_MARK_PATH
|
|
- + " -n " + fileName + Constant.SCENE_VIDEO_SHARE_SUFFIX
|
|
|
|
|
|
+ + " -n " + fileName + Constant.SCENE_VIDEO_SHARE_SUFFIX + suffix
|
|
+ " -o " + fileFolderPath;
|
|
+ " -o " + fileFolderPath;
|
|
log.info("调用脚本命令-{}", command);
|
|
log.info("调用脚本命令-{}", command);
|
|
callshell(command);
|
|
callshell(command);
|