zhujinghui %!s(int64=4) %!d(string=hai) anos
pai
achega
da8fc2a376

+ 8 - 4
4dkankan-scene/src/main/java/com/fdkankan/scene/util/CreateObjUtil.java

@@ -48,10 +48,14 @@ public class CreateObjUtil{
 		log.info("生成水印视频开始");
 		String fileName = videoPath.substring(videoPath.lastIndexOf("/") + 1, videoPath.lastIndexOf("."));
 		String fileFolderPath = videoPath.substring(0, videoPath.lastIndexOf("/") + 1);
-		String command = "ssh root@" + ffmpegEnv +  " '4dage-ffmpeg-rotVwatermark -s " + videoPath
-				+ " -w " + Constant.WATER_MARK_PATH
-				+ " -n " + fileName + Constant.SCENE_VIDEO_SHARE_SUFFIX
-				+ " -o " + fileFolderPath.substring(0, fileFolderPath.length() - 1) + "'";
+//		String command = "ssh root@" + ffmpegEnv +  " '4dage-ffmpeg-rotVwatermark -s " + videoPath
+//				+ " -w " + Constant.WATER_MARK_PATH
+//				+ " -n " + fileName + Constant.SCENE_VIDEO_SHARE_SUFFIX
+//				+ " -o " + fileFolderPath.substring(0, fileFolderPath.length() - 1) + "'";
+		String command = "bash /monchickey/ffmpeg/bin/ff_rotVwatermark.sh " + videoPath + " " + Constant.WATER_MARK_PATH
+				+ " " + fileName + Constant.SCENE_VIDEO_SHARE_SUFFIX
+				+ " " + fileFolderPath.substring(0, fileFolderPath.length() - 1);
+
 		log.info("调用脚本命令-{}", command);
 		callshell(command);
 		log.info("生成水印视频结束");

+ 9 - 3
4dkankan-web/src/main/java/com/fdkankan/web/controller/TestController.java

@@ -3,6 +3,7 @@ package com.fdkankan.web.controller;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.fdkankan.common.api.BaseController;
+import com.fdkankan.common.constant.Constant;
 import com.fdkankan.common.exception.BaseRuntimeException;
 import com.fdkankan.common.model.ViewResult;
 import com.fdkankan.scene.util.CreateObjUtil;
@@ -39,9 +40,14 @@ public class TestController extends BaseController {
     @ApiOperation("获取")
     @GetMapping("/test2")
     public void test2() throws Exception {
-        String url = "/mnt/4Dkankan/scene/video/videoHDdAupM0Px/0.mp4";
-        String ip = "127.0.0.1";
-        CreateObjUtil.generateShareVideo(url, ip);
+        String videoPath = "videoPath";
+        String fileName = "fileName";
+        String fileFolderPath = "fileFolderPath";
+
+        String command = "bash /monchickey/ffmpeg/bin/ff_rotVwatermark.sh " + videoPath + " " + Constant.WATER_MARK_PATH
+                + " " + fileName + Constant.SCENE_VIDEO_SHARE_SUFFIX
+                + " " + fileFolderPath.substring(0, fileFolderPath.length() - 1);
+        System.out.println(command);
     }