浏览代码

Merge branch 'test' of https://gitee.com/hcst/adsp-boot into test

# Conflicts:
#	module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialInfoServiceImpl.java
xuzuoyun 5 年之前
父节点
当前提交
27e8bc885a
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      module-common/src/main/java/cn/com/ctop/common/module/utils/MpsUtils.java

+ 3 - 1
module-common/src/main/java/cn/com/ctop/common/module/utils/MpsUtils.java

@@ -272,6 +272,8 @@ public class MpsUtils {
 
     public String videoWaterMark(String videoPath,String waterMarkPath,String watermarkTemplateId,Integer height){
         String jobId = "";
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        String outputFilename = "watermark/"+sdf.format(new Date())+"/"+ UUID.randomUUID()+".mp4";
         IAcsClient client = getClient();
         String pipelineId = getPipelineId(client);
         SubmitJobsRequest request = new SubmitJobsRequest();
@@ -298,7 +300,7 @@ public class MpsUtils {
         videoWatermark.put("Dy", "0");
         String outputOSSObject;
         try {
-            outputOSSObject = URLEncoder.encode(waterMarkPath, "utf-8");
+            outputOSSObject = URLEncoder.encode(outputFilename, "utf-8");
         } catch (UnsupportedEncodingException e) {
             throw new RuntimeException("output URL encode failed");
         }