日本熟妇hd丰满老熟妇,中文字幕一区二区三区在线不卡 ,亚洲成片在线观看,免费女同在线一区二区

視頻/圖片混剪

本文為您介紹如何修改SubmitMediaProducingJobTimeline參數來完成視頻/圖片混剪。

使用說明

  • 智能生產制作支持直播流、點播和OSS素材文件的剪輯合成、特效渲染、模板生產等功能,更多詳情請參見智能生產制作概述

  • 將一個或多個視頻、音頻、圖片、字幕素材合成為成品,可以通過不同的Timeline參數配置提交剪輯,然后調用SubmitMediaProducingJob - 提交剪輯合成作業來完成合成。

  • 時間線是將素材按照視頻創意進行編排和特效設計的產物,時間線主要包含軌道、素材、效果3種對象,詳情請參見Timeline配置說明

  • 如果您想通過調用SDK進行音視頻剪輯,請參見安裝IMS服務端SDK的準備工作

設置成片視頻寬高

調用接口SubmitMediaProducingJob提交剪輯合成任務時,通過設置參數OutputMediaConfig中的Width、Height字段來定義成片分辨率。

String outputMediaUrl = "https://your-bucket.oss-cn-shanghai.aliyuncs.com/target_video.mp4";
String outputMediaConfig = "{\"MediaURL\":\"" + outputMediaUrl + "\",\"Width\":720,\"Height\":1280}";
SubmitMediaProducingJobRequest request = new SubmitMediaProducingJobRequest();
request.setTimeline("<your-timeline>");
request.setOutputMediaConfig(outputMediaConfig);
SubmitMediaProducingJobResponse response = iceClient.submitMediaProducingJob(request);

視頻橫轉豎-補充上下黑邊

若Timeline中的素材為橫屏視頻,而提交剪輯合成任務時設置的成片分辨率為豎屏,則系統會根據素材和成片的寬高進行等比縮放,并將素材居中顯示。

成片效果

Timeline示例

{
  "VideoTracks": [{
    "VideoTrackClips": [{
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h1.mp4"
    },{
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h2.mp4"
    },{
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h3.mp4"
    }]
  }]
}

視頻橫轉豎-補充上下模糊區域

Radius(模糊半徑)取值范圍為[0.01, 1],具體參考Effect Type:Background 背景設置

成片效果

Timeline示例

{
	"VideoTracks": [{
		"VideoTrackClips": [{
			"MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h1.mp4",
			"Effects": [{
				"Type": "Background",
				"SubType": "Blur",
				"Radius": 0.1
			}]
		}, {
			"MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h2.mp4",
			"Effects": [{
				"Type": "Background",
				"SubType": "Blur",
				"Radius": 0.1
			}]
		}, {
			"MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h3.mp4",
			"Effects": [{
				"Type": "Background",
				"SubType": "Blur",
				"Radius": 0.1
			}]
		}]
	}]
}

視頻橫轉豎-三分屏效果

AdaptMode=Cover參數表示素材按照其長寬比進行縮放,并填充滿整個目標區域。其他值可參考VideoTrackClip

成片效果

Timeline示例

{
  "VideoTracks": [{
    "VideoTrackClips": [{
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h1.mp4",
      "Width": 1,
      "Height": 0.3333,
      "X": 0,
      "Y": 0.3333,
      "AdaptMode": "Cover"
    },{
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h2.mp4",
      "Width": 1,
      "Height": 0.3333,
      "X": 0,
      "Y": 0.3333,
      "AdaptMode": "Cover"
    },{
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h3.mp4",
      "Width": 1,
      "Height": 0.3333,
      "X": 0,
      "Y": 0.3333,
      "AdaptMode": "Cover"
    }]
  },{
    "VideoTrackClips": [{
      "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/h1.mp4",
      "Width": 1,
      "Height": 0.3333,
      "X": 0,
      "Y": 0,
      "AdaptMode": "Cover"
    },{
      "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/h2.mp4",
      "Width": 1,
      "Height": 0.3333,
      "X": 0,
      "Y": 0,
      "AdaptMode": "Cover"
    },{
      "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/h3.mp4",
      "Width": 1,
      "Height": 0.3333,
      "X": 0,
      "Y": 0,
      "AdaptMode": "Cover"
    }]
  },{
    "VideoTrackClips": [{
      "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/h1.mp4",
      "Width": 1,
      "Height": 0.3333,
      "X": 0,
      "Y": 0.6666,
      "AdaptMode": "Cover"
    },{
      "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/h2.mp4",
      "Width": 1,
      "Height": 0.3333,
      "X": 0,
      "Y": 0.6666,
      "AdaptMode": "Cover"
    },{
      "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/h3.mp4",
      "Width": 1,
      "Height": 0.3333,
      "X": 0,
      "Y": 0.6666,
      "AdaptMode": "Cover"
    }]
  }],
  "SubtitleTracks":[
    {
      "SubtitleTrackClips": [
        {
          "Type": "Text",
          "X": 0,
          "Y": 200,
          "Font": "AlibabaPuHuiTi",
          "Content": "這里是標題",
          "Alignment": "TopCenter",
          "FontSize": 80,
          "FontColorOpacity": 1,
          "1FontColor": "#ffffff",
          "FontColor": "#FFDEAD",
          "FontFace": {
            "Bold": true,
            "Italic": false,
            "Underline": false
          }
        }
      ]
    },
    {
      "SubtitleTrackClips": [
        {
          "Type":"Text",
          "X": 0,
          "Y": 320,
          "Font": "KaiTi",
          "Content": "這里是副標題",
          "Alignment": "TopCenter",
          "FontSize": 45,
          "FontColor": "#ffffff",
          "FontFace": {
            "Bold": false,
            "Italic": true,
            "Underline": true
          }
        }
      ]
    },
    {
      "SubtitleTrackClips":[
        {
          "Type":"Text",
          "X": 0,
          "Y": 900,
          "Font": "AlibabaPuHuiTi",
          "Content": "視頻拼接的同時可以加字幕\n可以加換行符進行多行展示",
          "Alignment": "TopCenter",
          "FontSize": 40,
          "FontColor": "#ffffff",
          "FontFace": {
            "Bold": true,
            "Italic": false,
            "Underline": false
          }
        }
      ]
    }
  ]
}

視頻橫轉豎-設置背景顏色

成片效果

Timeline示例

{
  "VideoTracks": [{
    "VideoTrackClips": [{
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h1.mp4",
      "Effects": [{
        "Type": "Background",
        "SubType": "Color",
        "Color": "#000066"
      }]
    }, {
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h2.mp4",
      "Effects": [{
        "Type": "Background",
        "SubType": "Color",
        "Color": "#006400"
      }]
    }, {
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h3.mp4",
      "Effects": [{
        "Type": "Background",
        "SubType": "Color",
        "Color": "#8B1A1A"
      }]
    }]
  }]
}

視頻截取

In=3、Out=8 表示截取視頻的第3秒到第8秒的區間。

成片效果

Timeline示例

{
  "VideoTracks": [{
    "VideoTrackClips": [{
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h1.mp4",
      "In": 3,
      "Out": 8
    }]
  }]
}

多段視頻截取合并

在Clip中,可以不設置TimelineIn和TimelineOut,系統將默認對素材進行前后拼接。

當MaxOut=5時,表示最多截取到Out為5秒的位置。具體操作為:

  • 如果素材時長超過5秒,則截取前5秒;

  • 如果素材時長不足5秒,則截取到素材結尾。

成片效果

Timeline示例

{
  "VideoTracks": [{
    "VideoTrackClips": [{
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h1.mp4",
      "In": 3,
      "Out": 8
    }, {
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h2.mp4",
      "MaxOut": 5
    }, {
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h3.mp4",
      "Effects": [{
        "Type": "Clip",
        "SubType": "RandomClip",
        "ClipDuration": 5
      }]
    }]
  }]
}

視頻圖片混剪

Type的默認值為Video。如果要使用圖片素材,則需要添加Type=Image。

成片效果

Timeline示例

{
  "VideoTracks": [{
    "VideoTrackClips": [{
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h1.mp4",
      "Out": 3
    }, {
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/image/01.jpg",
      "Type": "Image",
      "Duration": 3
    }, {
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h2.mp4",
      "Out": 3
    }, {
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/image/02.jpg",
      "Type": "Image",
      "Duration": 3
    }, {
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h3.mp4",
      "Out": 3
    }]
  }]
}

添加水印/貼紙/GIF貼紙

GIF格式的圖片剪輯需要傳遞動態幀數(DyncFrames),即為GIF素材的幀數。

成片效果

Timeline示例

{
  "VideoTracks": [{
    "VideoTrackClips": [{
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h1.mp4",
      "Out": 5
    }, {
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h2.mp4",
      "Out": 5
    }, {
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h3.mp4",
      "Out": 5
    }]
  },{
    "VideoTrackClips": [{
      "Type": "Image",
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/image/s1.png",
      "TimelineIn": 0,
      "Duration": 5,
      "X": 40,
      "Y": 40,
      "Width": 300,
      "Height": 150
    }, {
      "Type": "Image",
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/image/g2.gif",
      "TimelineIn": 5,
      "Duration": 5,
      "X": 20,
      "Y": 800,
      "Width": 200,
      "Height": 200,
      "DyncFrames": 8
    }, {
      "Type": "Image",
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/image/g1.gif",
      "TimelineIn": 10,
      "Duration": 5,
      "X": 400,
      "Y": 40,
      "Width": 200,
      "Height": 200,
      "DyncFrames": 8
    }]
  }]
}

縮放配置

AdaptMode的取值包括:Contain、Cover、Fill,更多詳細信息,請參閱VideoTrackClip

成片效果

Timeline示例

{
  "VideoTracks": [{
    "VideoTrackClips": [{
      "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/h1.mp4",
      "Width": 1,
      "Height": 0.3333,
      "X": 0,
      "Y": 0.3333,
      "AdaptMode": "Cover",
      "Out": 5
    },{
      "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/v1.mp4",
      "Width": 1,
      "Height": 0.3333,
      "X": 0,
      "Y": 0.3333,
      "AdaptMode": "Cover",
      "Out": 5
    }]
  },{
    "VideoTrackClips": [{
      "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/h1.mp4",
      "Width": 1,
      "Height": 0.3333,
      "X": 0,
      "Y": 0,
      "AdaptMode": "Contain",
      "Out": 5
    },{
      "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/v1.mp4",
      "Width": 1,
      "Height": 0.3333,
      "X": 0,
      "Y": 0,
      "AdaptMode": "Contain",
      "Out": 5
    }]
  },{
    "VideoTrackClips": [{
      "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/h1.mp4",
      "Width": 1,
      "Height": 0.3333,
      "X": 0,
      "Y": 0.6666,
      "AdaptMode": "Fill",
      "Out": 5
    },{
      "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/v1.mp4",
      "Width": 1,
      "Height": 0.3333,
      "X": 0,
      "Y": 0.6666,
      "AdaptMode": "Fill",
      "Out": 5
    }]
  }],
  "SubtitleTracks":[
    {
      "SubtitleTrackClips":[
        {
          "Type":"Text",
          "X": 0,
          "Y": 0,
          "Font": "AlibabaPuHuiTi",
          "Content": "AdaptMode=Cover:被替換的內容在保持其寬高比的同時填充整個目標區域。如果對象的寬高比與內容框不相匹配,該對象將被剪裁以適應目標區域",
          "FontSize": 30,
          "FontColor": "#ffffff",
          "AdaptMode": "AutoWrap",
          "TextWidth": 1,
          "FontFace": {
            "Bold": true,
            "Italic": false,
            "Underline": false
          }
        }
      ]
    },
    {
      "SubtitleTrackClips":[
        {
          "Type":"Text",
          "X": 0,
          "Y": 0.3333,
          "Font": "AlibabaPuHuiTi",
          "Content": "AdaptMode=Contain:被替換的內容將被縮放,在填充目標區域的同時保留其長寬比",
          "FontSize": 30,
          "FontColor": "#ffffff",
          "AdaptMode": "AutoWrap",
          "TextWidth": 1,
          "FontFace": {
            "Bold": true,
            "Italic": false,
            "Underline": false
          }
        }
      ]
    },
    {
      "SubtitleTrackClips":[
        {
          "Type":"Text",
          "X": 0,
          "Y": 0.6666,
          "Font": "AlibabaPuHuiTi",
          "Content": "AdaptMode=Fill:默認邏輯,被替換的內容正好填充目標內容框。整個對象將完全填充此框。如果對象的寬高比與內容框不相匹配,那么該對象將被拉伸以適應目標區域",
          "FontSize": 30,
          "FontColor": "#ffffff",
          "AdaptMode": "AutoWrap",
          "TextWidth": 1,
          "FontFace": {
            "Bold": true,
            "Italic": false,
            "Underline": false
          }
        }
      ]
    }
  ]
}

視頻畫中畫

在VideoTracks中,數組后面的軌道層級較高,會覆蓋數組前面的軌道。

成片效果

Timeline示例

{
  "VideoTracks": [{
    "VideoTrackClips": [{
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/v1.mp4"
    }]
  },{
    "VideoTrackClips": [{
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/v1.mp4",
      "X": 0.25,
      "Y": 0.25,
      "Width": 0.5,
      "Height": 0.5
    }]
  }]
}

水平翻轉、垂直翻轉

成片效果

Timeline示例

{
  "VideoTracks": [
    {
      "VideoTrackClips": [
        {
          "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/h3.mp4",
          "Width": 0.5,
          "Height": 0.5,
          "X": 0,
          "Y": 0,
          "Effects": [
            {
              "Type": "Text",
              "FixedX": 0,
              "FixedY": 0,
              "Font": "HappyZcool-2016",
              "Content": "原視頻",
              "Alignment": "TopLeft",
              "FontSize": 80,
              "FontColor": "#F5FFFA",
              "TimelineIn": 0,
              "TimelineOut": 10,
              "Outline": 1,
              "OutlineColour": "#0e0100"
            }
          ]
        }
      ]
    },
    {
      "VideoTrackClips": [
        {
          "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/h3.mp4",
          "Width": 0.5,
          "Height": 0.5,
          "X": 0.5,
          "Y": 0,
          "Effects": [
            {
              "Type": "Flip",
              "Direction": "horizontal"
            },{
              "Type": "Text",
              "FixedX": 0.5,
              "FixedY": 0,
              "Font": "HappyZcool-2016",
              "Content": "視頻水平翻轉",
              "Alignment": "TopLeft",
              "FontSize": 80,
              "FontColor": "#F5FFFA",
              "TimelineIn": 0,
              "TimelineOut": 10,
              "Outline": 1,
              "OutlineColour": "#0e0100"
            }
          ]
        }
      ]
    },
    {
      "VideoTrackClips": [
        {
          "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/h3.mp4",
          "Width": 0.5,
          "Height": 0.5,
          "X": 0,
          "Y": 0.5,
          "Effects": [
            {
              "Type": "Flip",
              "Direction": "vertical"
            },{
              "Type": "Text",
              "FixedX": 0,
              "FixedY": 0.5,
              "Font": "HappyZcool-2016",
              "Content": "視頻豎直翻轉",
              "Alignment": "TopLeft",
              "FontSize": 80,
              "FontColor": "#F5FFFA",
              "TimelineIn": 0,
              "TimelineOut": 10,
              "Outline": 1,
              "OutlineColour": "#0e0100"
            }
          ]
        }
      ]
    },
    {
      "VideoTrackClips": [
        {
          "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/h3.mp4",
          "Width": 0.5,
          "Height": 0.5,
          "X": 0.5,
          "Y": 0.5,
          "Effects": [
            {
              "Type": "Flip",
              "Direction": "horizontal"
            },{
              "Type": "Flip",
              "Direction": "vertical"
            },{
              "Type": "Text",
              "FixedX": 0.5,
              "FixedY": 0.5,
              "Font": "HappyZcool-2016",
              "Content": "視頻水平豎直翻轉",
              "Alignment": "TopLeft",
              "FontSize": 80,
              "FontColor": "#F5FFFA",
              "TimelineIn": 0,
              "TimelineOut": 10,
              "Outline": 1,
              "OutlineColour": "#0e0100"
            }
          ]
        }
      ]
    }
  ]
}

視頻裁剪

成片效果

Timeline示例

{
  "VideoTracks": [{
    "VideoTrackClips": [{
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/v1.mp4",
      "Out": 3,
      "X": 0.3,
      "Y": 0.3,
      "Width":0.4,
      "Height":0.4,
      "Effects": [{
        "Type":"Crop",
        "X":0.3,
        "Y":0.3,
        "Width":0.4,
        "Height":0.4
      },{
        "Type": "Text",
        "Font": "HappyZcool-2016",
        "Content": "裁掉60%",
        "FixedY": 150,
        "Alignment": "TopCenter",
        "FixedFontSize": 70,
        "FontColor": "#F5FFFA",
        "Outline": 1,
        "OutlineColour": "#0e0100"
      }]
    },{
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/v1.mp4",
      "In": 3,
      "Out": 6,
      "X": 0.15,
      "Y": 0.15,
      "Width":0.7,
      "Height":0.7,
      "Effects": [{
        "Type":"Crop",
        "X":0.15,
        "Y":0.15,
        "Width":0.7,
        "Height":0.7
      },{
        "Type": "Text",
        "Font": "HappyZcool-2016",
        "Content": "裁掉30%",
        "FixedY": 150,
        "Alignment": "TopCenter",
        "FixedFontSize": 70,
        "FontColor": "#F5FFFA",
        "Outline": 1,
        "OutlineColour": "#0e0100"
      }]
    },{
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/v1.mp4",
      "In": 6,
      "Out": 9,
      "Effects": [{
        "Type": "Text",
        "Font": "HappyZcool-2016",
        "Content": "不裁剪",
        "FixedY": 150,
        "Alignment": "TopCenter",
        "FixedFontSize": 70,
        "FontColor": "#F5FFFA",
        "Outline": 1,
        "OutlineColour": "#0e0100"
      }]
    }]
  }]
}

音視頻變速

在AudioTrackClips中,也可以使用Speed參數實現音視頻變速。

成片效果

Timeline示例

{
  "VideoTracks": [{
    "VideoTrackClips": [{
      "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/h2.mp4",
      "Out": 3,
      "Effects": [{
        "Type": "Text",
        "Font": "HappyZcool-2016",
        "Content": "原速",
        "FixedY": 150,
        "Alignment": "TopCenter",
        "FixedFontSize": 70,
        "FontColor": "#F5FFFA"
      }]
    },{
      "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/h2.mp4",
      "Speed": 2,
      "Out": 6,
      "Effects": [{
        "Type": "Text",
        "Font": "HappyZcool-2016",
        "Content": "2倍速",
        "FixedY": 150,
        "Alignment": "TopCenter",
        "FixedFontSize": 70,
        "FontColor": "#F5FFFA"
      }]
    },{
      "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/h2.mp4",
      "Speed": 3,
      "Out": 9,
      "Effects": [{
        "Type": "Text",
        "Font": "HappyZcool-2016",
        "Content": "3倍速",
        "FixedY": 150,
        "Alignment": "TopCenter",
        "FixedFontSize": 70,
        "FontColor": "#F5FFFA"
      }]
    }]
  }]
}

素材旋轉

成片效果

Timeline示例

{
  "VideoTracks": [{
    "VideoTrackClips": [{
      "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/h2.mp4",
      "Out": 3,
      "Effects": [{
        "Type": "Text",
        "Font": "HappyZcool-2016",
        "Content": "原角度",
        "FixedY": 150,
        "Alignment": "TopCenter",
        "FixedFontSize": 70,
        "FontColor": "#F5FFFA",
        "Outline": 1,
        "OutlineColour": "#0e0100"
      }]
    },{
      "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/h2.mp4",
      "Out": 3,
      "X": 0,
      "Y": 0,
      "Height": 720,
      "Width": 1280,
      "Effects": [{
        "Type": "Rotate",
        "Degree": 90
      },{
        "Type": "Text",
        "Font": "HappyZcool-2016",
        "Content": "旋轉90度",
        "FixedY": 150,
        "Alignment": "TopCenter",
        "FixedFontSize": 70,
        "FontColor": "#F5FFFA",
        "Outline": 1,
        "OutlineColour": "#0e0100"
      }]
    },{
      "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/h2.mp4",
      "Out": 3,
      "Effects": [{
        "Type": "Rotate",
        "Degree": 180
      },{
        "Type": "Text",
        "Font": "HappyZcool-2016",
        "Content": "旋轉180度",
        "FixedY": 150,
        "Alignment": "TopCenter",
        "FixedFontSize": 70,
        "FontColor": "#F5FFFA",
        "Outline": 1,
        "OutlineColour": "#0e0100"
      }]
    },{
      "MediaURL": "http://ice-public-media.oss-cn-shanghai.aliyuncs.com/test_media/h2.mp4",
      "Out": 3,
      "X": 0,
      "Y": 0,
      "Height": 720,
      "Width": 1280,
      "Effects": [{
        "Type": "Rotate",
        "Degree": 270
      },{
        "Type": "Text",
        "Font": "HappyZcool-2016",
        "Content": "旋轉270度",
        "FixedY": 150,
        "Alignment": "TopCenter",
        "FixedFontSize": 70,
        "FontColor": "#F5FFFA",
        "Outline": 1,
        "OutlineColour": "#0e0100"
      }]
    }]
  }]
}

圓形、矩形、線性、鏡面遮罩

成片效果

Timeline示例

{
    "VideoTracks": [
        {
            "VideoTrackClips": [
                {
                    "MediaUrl": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h2.mp4",
                    "Width": 1,
                    "Height": 1,
                    "In": 0,
                    "Out": 5,
                    "AdaptMode": "Cover",
                    "Duration": 10
                }
            ]
        },
        {
            "VideoTrackClips": [
                {
                    "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/v1.mp4",
                    "X": 0.1,
                    "Y": 0.1,
                    "Width": 0.3,
                    "Height": 0.3,
                    "AdaptMode": "Cover",
                    "In": 0,
                    "Out": 5,
                    "Effects": [
                        {
                            "Type": "VFX",
                            "SubType": "mask_circle",
                            "ExtParams": "x=0.5,y=0.2,width=200.0,height=200.0,antialias=0.05"
                        }
                    ]
                }
            ]
        },
        {
            "VideoTrackClips": [
                {
                    "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/v1.mp4",
                    "X": 0.5,
                    "Y": 0.1,
                    "Width": 0.3,
                    "Height": 0.3,
                    "AdaptMode": "Cover",
                    "In": 0,
                    "Out": 5,
                    "Effects": [
                        {
                            "Type": "VFX",
                            "SubType": "mask_linear",
                            "ExtParams": "x=0.5,y=0.2,antialias=0.1,angle=90.0"
                        }
                    ]
                }
            ]
        },
        {
            "VideoTrackClips": [
                {
                    "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/v1.mp4",
                    "X": 0.1,
                    "Y": 0.5,
                    "Width": 0.3,
                    "Height": 0.3,
                    "AdaptMode": "Cover",
                    "In": 0,
                    "Out": 5,
                    "Effects": [
                        {
                            "Type": "VFX",
                            "SubType": "mask_minor",
                            "ExtParams": "x=0.5,y=0.4,size=0.6,angle=45.0"
                        }
                    ]
                }
            ]
        },
        {
            "VideoTrackClips": [
                {
                    "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/v1.mp4",
                    "X": 0.5,
                    "Y": 0.5,
                    "Width": 0.3,
                    "Height": 0.3,
                    "AdaptMode": "Cover",
                    "In": 0,
                    "Out": 5,
                    "Effects": [
                        {
                            "Type": "VFX",
                            "SubType": "mask_rec",
                            "ExtParams": "x=0.5,y=200.0,width=200.0,height=200.0,radius=50.0,antialias=0.03"
                        }
                    ]
                }
            ]
        }
    ]
}

參數說明

  • 圓形(橢圓)

    type = mask_circle

    參數

    類型

    取值范圍

    默認值

    說明

    x

    float

    [0.0, 素材寬]

    0.5

    遮罩圓心在素材內相比素材左上角的X坐標。

    • [0.0, 1.0]時表示相對素材寬的坐標。

    • 大于1.0時,表示絕對像素值。

    y

    float

    [0.0, 素材高]

    0.5

    遮罩圓心在素材內相比素材左上角的Y坐標。

    • [0.0, 1.0]時表示相對素材高的坐標。

    • 大于1.0時,表示絕對像素值。

    width

    float

    [0.0, 素材寬]

    0.8

    遮罩橢圓的寬度,相比素材的寬度。

    • [0.0, 1.0]時表示相對素材寬的寬度。

    • 大于1.0時,表示絕對像素值。

    height

    float

    [0.0, 素材高]

    0.8

    遮罩橢圓的高度,相比素材的高度。

    • [0.0, 1.0]時表示相對素材高的高度。

    • 大于1.0時,表示絕對像素值。

    antialias

    float

    [0.0, 1.0]

    0.1

    遮罩橢圓的抗鋸齒參數。值越大,邊緣羽化程度越高。

    angle

    float

    [-9999.0, 9999.0]

    0.0

    旋轉角度。

  • 矩形

    type = mask_rec

    參數

    類型

    取值范圍

    默認值

    說明

    x

    float

    [0.0, 素材寬]

    0.5

    遮罩矩形中心在視頻素材內相比素材左上角的X坐標。

    • [0.0, 1.0]時表示相對素材寬的坐標。

    • 大于1.0時,表示絕對像素值。

    y

    float

    [0.0, 素材高]

    0.5

    遮罩矩形中心在視頻素材內相比素材左上角的Y坐標。

    • [0.0, 1.0]時表示相對素材高的坐標。

    • 大于1.0時,表示絕對像素值。

    width

    float

    [0.0, 素材寬]

    0.8

    遮罩矩形的寬度。

    • [0.0, 1.0]時表示相對素材寬的寬度。

    • 大于1.0時,表示絕對像素值。

    height

    float

    [0.0, 素材高]

    0.8

    遮罩矩形的高度。

    • [0.0, 1.0]時表示相對素材高的高度。

    • 大于1.0時,表示絕對像素值。

    antialias

    float

    [0.0, 1.0]

    0.1

    遮罩矩形的抗鋸齒參數,值越大,邊緣羽化程度越高。

    radius

    float

    [0.0, 素材寬或高的較大值]

    0.1

    遮罩矩形圓角半徑。

    • [0.0, 1.0]時表示相對素材寬或高的較大值的半徑大小。

    • 大于1.0時,表示絕對像素值。

    angle

    float

    [-9999.0, 9999.0]

    0.0

    旋轉角度。

  • 線性

    type = mask_linear

    參數

    類型

    取值范圍

    默認值

    說明

    x

    float

    [0.0, 素材寬]

    0.5

    線性遮罩中心基準點在素材內相比素材左上角的X坐標。

    • [0.0, 1.0]時表示相對素材寬的坐標。

    • 大于1.0時,表示絕對像素值。

    y

    float

    [0.0, 素材高]

    0.5

    線性遮罩中心基準點在視頻素材內相比視頻左上角的Y坐標。

    • [0.0, 1.0]時表示相對素材高的坐標。

    • 大于1.0時,表示絕對像素值。

    antialias

    float

    [0.0, 1.0]

    0.1

    線性遮罩的抗鋸齒參數,值越大,邊緣羽化程度越高。

    angle

    float

    [-9999.0, 9999.0]

    0.0

    旋轉角度。

  • 鏡面

    type = mask_minor

    參數

    類型

    取值范圍

    默認值

    說明

    x

    float

    [0.0, 素材寬]

    0.5

    鏡面遮罩中心基準點在素材內相比素材左上角的X坐標。

    • [0.0, 1.0]時表示相對素材寬的坐標。

    • 大于1.0時,表示絕對像素值。

    y

    float

    [0.0, 素材高]

    0.5

    鏡面遮罩中心基準點在素材內相比素材左上角的Y坐標。

    • [0.0, 1.0]時表示相對素材高的坐標。

    • 大于1.0時,表示絕對像素值。

    antialias

    float

    [0.0, 1.0]

    0.1

    鏡面遮罩的抗鋸齒參數,值越大,邊緣羽化程度越高。

    angle

    float

    [-9999.0, 9999.0]

    0.0

    旋轉角度。

相關文檔