Browse Source

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 years ago
parent
commit
27e8bc885a

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