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

視頻/圖片混剪

更新時(shí)間:

本文為您介紹如何修改SubmitMediaProducingJobTimeline參數(shù)來(lái)完成視頻/圖片混剪。

使用說(shuō)明

  • 智能生產(chǎn)制作支持直播流、點(diǎn)播和OSS素材文件的剪輯合成、特效渲染、模板生產(chǎn)等功能,更多詳情請(qǐng)參見(jiàn)智能生產(chǎn)制作概述

  • 將一個(gè)或多個(gè)視頻、音頻、圖片、字幕素材合成為成品,可以通過(guò)不同的Timeline參數(shù)配置提交剪輯,然后調(diào)用SubmitMediaProducingJob - 提交剪輯合成作業(yè)來(lái)完成合成。

  • 時(shí)間線是將素材按照視頻創(chuàng)意進(jìn)行編排和特效設(shè)計(jì)的產(chǎn)物,時(shí)間線主要包含軌道、素材、效果3種對(duì)象,詳情請(qǐng)參見(jiàn)Timeline配置說(shuō)明

  • 如果您想通過(guò)調(diào)用SDK進(jìn)行音視頻剪輯,請(qǐng)參見(jiàn)安裝IMS服務(wù)端SDK的準(zhǔn)備工作

設(shè)置成片視頻寬高

調(diào)用接口SubmitMediaProducingJob提交剪輯合成任務(wù)時(shí),通過(guò)設(shè)置參數(shù)OutputMediaConfig中的Width、Height字段來(lái)定義成片分辨率。

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);

視頻橫轉(zhuǎn)豎-補(bǔ)充上下黑邊

若Timeline中的素材為橫屏視頻,而提交剪輯合成任務(wù)時(shí)設(shè)置的成片分辨率為豎屏,則系統(tǒng)會(huì)根據(jù)素材和成片的寬高進(jìn)行等比縮放,并將素材居中顯示。

成片效果

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"
    }]
  }]
}

視頻橫轉(zhuǎn)豎-補(bǔ)充上下模糊區(qū)域

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

成片效果

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
			}]
		}]
	}]
}

視頻橫轉(zhuǎn)豎-三分屏效果

AdaptMode=Cover參數(shù)表示素材按照其長(zhǎng)寬比進(jìn)行縮放,并填充滿(mǎn)整個(gè)目標(biāo)區(qū)域。其他值可參考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": "這里是標(biāo)題",
          "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": "這里是副標(biāo)題",
          "Alignment": "TopCenter",
          "FontSize": 45,
          "FontColor": "#ffffff",
          "FontFace": {
            "Bold": false,
            "Italic": true,
            "Underline": true
          }
        }
      ]
    },
    {
      "SubtitleTrackClips":[
        {
          "Type":"Text",
          "X": 0,
          "Y": 900,
          "Font": "AlibabaPuHuiTi",
          "Content": "視頻拼接的同時(shí)可以加字幕\n可以加換行符進(jìn)行多行展示",
          "Alignment": "TopCenter",
          "FontSize": 40,
          "FontColor": "#ffffff",
          "FontFace": {
            "Bold": true,
            "Italic": false,
            "Underline": false
          }
        }
      ]
    }
  ]
}

視頻橫轉(zhuǎn)豎-設(shè)置背景顏色

成片效果

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秒的區(qū)間。

成片效果

Timeline示例

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

多段視頻截取合并

在Clip中,可以不設(shè)置TimelineIn和TimelineOut,系統(tǒng)將默認(rèn)對(duì)素材進(jìn)行前后拼接。

當(dāng)MaxOut=5時(shí),表示最多截取到Out為5秒的位置。具體操作為:

  • 如果素材時(shí)長(zhǎng)超過(guò)5秒,則截取前5秒;

  • 如果素材時(shí)長(zhǎng)不足5秒,則截取到素材結(jié)尾。

成片效果

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的默認(rèn)值為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格式的圖片剪輯需要傳遞動(dòng)態(tài)幀數(shù)(DyncFrames),即為GIF素材的幀數(shù)。

成片效果

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,更多詳細(xì)信息,請(qǐng)參閱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:被替換的內(nèi)容在保持其寬高比的同時(shí)填充整個(gè)目標(biāo)區(qū)域。如果對(duì)象的寬高比與內(nèi)容框不相匹配,該對(duì)象將被剪裁以適應(yīng)目標(biāo)區(qū)域",
          "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:被替換的內(nèi)容將被縮放,在填充目標(biāo)區(qū)域的同時(shí)保留其長(zhǎng)寬比",
          "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:默認(rèn)邏輯,被替換的內(nèi)容正好填充目標(biāo)內(nèi)容框。整個(gè)對(duì)象將完全填充此框。如果對(duì)象的寬高比與內(nèi)容框不相匹配,那么該對(duì)象將被拉伸以適應(yīng)目標(biāo)區(qū)域",
          "FontSize": 30,
          "FontColor": "#ffffff",
          "AdaptMode": "AutoWrap",
          "TextWidth": 1,
          "FontFace": {
            "Bold": true,
            "Italic": false,
            "Underline": false
          }
        }
      ]
    }
  ]
}

視頻畫(huà)中畫(huà)

在VideoTracks中,數(shù)組后面的軌道層級(jí)較高,會(huì)覆蓋數(shù)組前面的軌道。

成片效果

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
    }]
  }]
}

水平翻轉(zhuǎn)、垂直翻轉(zhuǎn)

成片效果

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": "視頻水平翻轉(zhuǎn)",
              "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": "視頻豎直翻轉(zhuǎn)",
              "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": "視頻水平豎直翻轉(zhuǎn)",
              "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參數(shù)實(shí)現(xiàn)音視頻變速。

成片效果

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"
      }]
    }]
  }]
}

素材旋轉(zhuǎn)

成片效果

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": "旋轉(zhuǎn)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": "旋轉(zhuǎn)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": "旋轉(zhuǎn)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"
                        }
                    ]
                }
            ]
        }
    ]
}

參數(shù)說(shuō)明

  • 圓形(橢圓)

    type = mask_circle

    參數(shù)

    類(lèi)型

    取值范圍

    默認(rèn)值

    說(shuō)明

    x

    float

    [0.0, 素材寬]

    0.5

    遮罩圓心在素材內(nèi)相比素材左上角的X坐標(biāo)。

    • [0.0, 1.0]時(shí)表示相對(duì)素材寬的坐標(biāo)。

    • 大于1.0時(shí),表示絕對(duì)像素值。

    y

    float

    [0.0, 素材高]

    0.5

    遮罩圓心在素材內(nèi)相比素材左上角的Y坐標(biāo)。

    • [0.0, 1.0]時(shí)表示相對(duì)素材高的坐標(biāo)。

    • 大于1.0時(shí),表示絕對(duì)像素值。

    width

    float

    [0.0, 素材寬]

    0.8

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

    • [0.0, 1.0]時(shí)表示相對(duì)素材寬的寬度。

    • 大于1.0時(shí),表示絕對(duì)像素值。

    height

    float

    [0.0, 素材高]

    0.8

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

    • [0.0, 1.0]時(shí)表示相對(duì)素材高的高度。

    • 大于1.0時(shí),表示絕對(duì)像素值。

    antialias

    float

    [0.0, 1.0]

    0.1

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

    angle

    float

    [-9999.0, 9999.0]

    0.0

    旋轉(zhuǎn)角度。

  • 矩形

    type = mask_rec

    參數(shù)

    類(lèi)型

    取值范圍

    默認(rèn)值

    說(shuō)明

    x

    float

    [0.0, 素材寬]

    0.5

    遮罩矩形中心在視頻素材內(nèi)相比素材左上角的X坐標(biāo)。

    • [0.0, 1.0]時(shí)表示相對(duì)素材寬的坐標(biāo)。

    • 大于1.0時(shí),表示絕對(duì)像素值。

    y

    float

    [0.0, 素材高]

    0.5

    遮罩矩形中心在視頻素材內(nèi)相比素材左上角的Y坐標(biāo)。

    • [0.0, 1.0]時(shí)表示相對(duì)素材高的坐標(biāo)。

    • 大于1.0時(shí),表示絕對(duì)像素值。

    width

    float

    [0.0, 素材寬]

    0.8

    遮罩矩形的寬度。

    • [0.0, 1.0]時(shí)表示相對(duì)素材寬的寬度。

    • 大于1.0時(shí),表示絕對(duì)像素值。

    height

    float

    [0.0, 素材高]

    0.8

    遮罩矩形的高度。

    • [0.0, 1.0]時(shí)表示相對(duì)素材高的高度。

    • 大于1.0時(shí),表示絕對(duì)像素值。

    antialias

    float

    [0.0, 1.0]

    0.1

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

    radius

    float

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

    0.1

    遮罩矩形圓角半徑。

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

    • 大于1.0時(shí),表示絕對(duì)像素值。

    angle

    float

    [-9999.0, 9999.0]

    0.0

    旋轉(zhuǎn)角度。

  • 線性

    type = mask_linear

    參數(shù)

    類(lèi)型

    取值范圍

    默認(rèn)值

    說(shuō)明

    x

    float

    [0.0, 素材寬]

    0.5

    線性遮罩中心基準(zhǔn)點(diǎn)在素材內(nèi)相比素材左上角的X坐標(biāo)。

    • [0.0, 1.0]時(shí)表示相對(duì)素材寬的坐標(biāo)。

    • 大于1.0時(shí),表示絕對(duì)像素值。

    y

    float

    [0.0, 素材高]

    0.5

    線性遮罩中心基準(zhǔn)點(diǎn)在視頻素材內(nèi)相比視頻左上角的Y坐標(biāo)。

    • [0.0, 1.0]時(shí)表示相對(duì)素材高的坐標(biāo)。

    • 大于1.0時(shí),表示絕對(duì)像素值。

    antialias

    float

    [0.0, 1.0]

    0.1

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

    angle

    float

    [-9999.0, 9999.0]

    0.0

    旋轉(zhuǎn)角度。

  • 鏡面

    type = mask_minor

    參數(shù)

    類(lèi)型

    取值范圍

    默認(rèn)值

    說(shuō)明

    x

    float

    [0.0, 素材寬]

    0.5

    鏡面遮罩中心基準(zhǔn)點(diǎn)在素材內(nèi)相比素材左上角的X坐標(biāo)。

    • [0.0, 1.0]時(shí)表示相對(duì)素材寬的坐標(biāo)。

    • 大于1.0時(shí),表示絕對(duì)像素值。

    y

    float

    [0.0, 素材高]

    0.5

    鏡面遮罩中心基準(zhǔn)點(diǎn)在素材內(nèi)相比素材左上角的Y坐標(biāo)。

    • [0.0, 1.0]時(shí)表示相對(duì)素材高的坐標(biāo)。

    • 大于1.0時(shí),表示絕對(duì)像素值。

    antialias

    float

    [0.0, 1.0]

    0.1

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

    angle

    float

    [-9999.0, 9999.0]

    0.0

    旋轉(zhuǎn)角度。

相關(guān)文檔