文档

标题字幕短视频

更新时间:

本文为您介绍如何修改SubmitMediaProducingJobTimeline参数来完成标题字幕短视频合成。

使用说明

  • 智能生产制作支持直播流、点播和OSS素材文件的剪辑合成、特效渲染、模板生产等功能,更多详情请参见智能生产制作概述

  • 将一个或多个视频、音频、图片、字幕素材合成为成品,可以通过不同的Timeline参数配置提交剪辑,然后调用SubmitMediaProducingJob - 提交剪辑合成作业来完成合成。

  • 时间线是将素材按照视频创意进行编排和特效设计的产物,时间线主要包含轨道、素材、效果3种对象,详情请参见Timeline配置说明

  • 如果您想通过调用SDK进行音视频剪辑,请参见安装IMS服务端SDK的准备工作

标题+视频+口播文案+自动对齐+背景音乐+黑色背景

成片效果

Timeline示例

{
  "VideoTracks": [
    {
      "VideoTrackClips": [
        {
          "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/food/f18.mp4",
          "ReferenceClipId": "clip0",
          "Effects": [
            {
              "Radius": 0.1,
              "Type": "Background",
              "SubType": "Blur"
            }
          ]
        },
        {
          "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/food/f16.mp4",
          "ReferenceClipId": "clip1",
          "Effects": [
            {
              "Radius": 0.1,
              "Type": "Background",
              "SubType": "Blur"
            }
          ]
        },
        {
          "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/food/f10.mp4",
          "ReferenceClipId": "clip2",
          "Effects": [
            {
              "Radius": 0.1,
              "Type": "Background",
              "SubType": "Blur"
            }
          ]
        },
        {
          "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/food/f11.mp4",
          "ReferenceClipId": "clip3",
          "Effects": [
            {
              "Radius": 0.1,
              "Type": "Background",
              "SubType": "Blur"
            }
          ]
        },
        {
          "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/food/f9.mp4",
          "ReferenceClipId": "clip4",
          "Effects": [
            {
              "Radius": 0.1,
              "Type": "Background",
              "SubType": "Blur"
            }
          ]
        },
        {
          "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/food/f12.mp4",
          "ReferenceClipId": "clip5",
          "Effects": [
            {
              "Radius": 0.1,
              "Type": "Background",
              "SubType": "Blur"
            }
          ]
        },
        {
          "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/food/f1.mp4",
          "ReferenceClipId": "clip6",
          "Effects": [
            {
              "Radius": 0.1,
              "Type": "Background",
              "SubType": "Blur"
            }
          ]
        }
      ]
    }
  ],
  "AudioTracks": [
    {
      "AudioTrackClips": [
        {
          "Type": "AI_TTS",
          "ClipId": "clip0",
          "Content": "人们懂得用五味杂陈形容人生",
          "Effects": [
            {
              "Type": "AI_ASR",
              "Alignment": "TopCenter",
              "FontSize": 55,
              "OutlineColour": "#000000",
              "FontColor": "#ffffff",
              "Y": 0.75,
              "Outline": 2,
              "AdaptMode": "AutoWrap",
              "TextWidth": 0.8,
              "Font": "Alibaba PuHuiTi"
            }
          ],
          "Voice": "zhichu"
        },
        {
          "Type": "AI_TTS",
          "ClipId": "clip1",
          "Content": "因为懂得味道是每个人心中固守的情怀",
          "Effects": [
            {
              "Type": "AI_ASR",
              "Alignment": "TopCenter",
              "FontSize": 55,
              "OutlineColour": "#000000",
              "FontColor": "#ffffff",
              "Y": 0.75,
              "Outline": 2,
              "AdaptMode": "AutoWrap",
              "TextWidth": 0.8,
              "Font": "Alibaba PuHuiTi"
            }
          ],
          "Voice": "zhichu"
        },
        {
          "Type": "AI_TTS",
          "ClipId": "clip2",
          "Content": "在这个时代",
          "Effects": [
            {
              "Type": "AI_ASR",
              "Alignment": "TopCenter",
              "FontSize": 55,
              "OutlineColour": "#000000",
              "FontColor": "#ffffff",
              "Y": 0.75,
              "Outline": 2,
              "AdaptMode": "AutoWrap",
              "TextWidth": 0.8,
              "Font": "Alibaba PuHuiTi"
            }
          ],
          "Voice": "zhichu"
        },
        {
          "Type": "AI_TTS",
          "ClipId": "clip3",
          "Content": "每一个人都经历了太多的苦痛和喜悦",
          "Effects": [
            {
              "Type": "AI_ASR",
              "Alignment": "TopCenter",
              "FontSize": 55,
              "OutlineColour": "#000000",
              "FontColor": "#ffffff",
              "Y": 0.75,
              "Outline": 2,
              "AdaptMode": "AutoWrap",
              "TextWidth": 0.8,
              "Font": "Alibaba PuHuiTi"
            }
          ],
          "Voice": "zhichu"
        },
        {
          "Type": "AI_TTS",
          "ClipId": "clip4",
          "Content": "人们总会将苦涩藏在心里",
          "Effects": [
            {
              "Type": "AI_ASR",
              "Alignment": "TopCenter",
              "FontSize": 55,
              "OutlineColour": "#000000",
              "FontColor": "#ffffff",
              "Y": 0.75,
              "Outline": 2,
              "AdaptMode": "AutoWrap",
              "TextWidth": 0.8,
              "Font": "Alibaba PuHuiTi"
            }
          ],
          "Voice": "zhichu"
        },
        {
          "Type": "AI_TTS",
          "ClipId": "clip5",
          "Content": "而把幸福变成食物",
          "Effects": [
            {
              "Type": "AI_ASR",
              "Alignment": "TopCenter",
              "FontSize": 55,
              "OutlineColour": "#000000",
              "FontColor": "#ffffff",
              "Y": 0.75,
              "Outline": 2,
              "AdaptMode": "AutoWrap",
              "TextWidth": 0.8,
              "Font": "Alibaba PuHuiTi"
            }
          ],
          "Voice": "zhichu"
        },
        {
          "Type": "AI_TTS",
          "ClipId": "clip6",
          "Content": "呈现在四季的餐桌之上",
          "Effects": [
            {
              "Type": "AI_ASR",
              "Alignment": "TopCenter",
              "FontSize": 55,
              "OutlineColour": "#000000",
              "FontColor": "#ffffff",
              "Y": 0.75,
              "Outline": 2,
              "AdaptMode": "AutoWrap",
              "TextWidth": 0.8,
              "Font": "Alibaba PuHuiTi"
            }
          ],
          "Voice": "zhichu"
        }
      ]
    },
    {
      "AudioTrackClips": [
        {
          "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/music/m2.wav"
        }
      ]
    }
  ],
  "SubtitleTracks": [
    {
      "SubtitleTrackClips": [
        {
          "Type": "Text",
          "Font": "HappyZcool-2016",
          "Content": "舌尖上的美食",
          "FontSize": 80,
          "FontColor": "#ffffff",
          "Y": 0.15,
          "Alignment": "TopCenter",
          "EffectColorStyle": "CS0004-000005",
          "FontFace": {
            "Bold": true,
            "Italic": false,
            "Underline": false
          }
        }
      ]
    }
  ]
}

标题+视频+口播音频+背景音乐+图片背景

成片效果

Timeline示例

{
    "VideoTracks": [
        {
            "VideoTrackClips": [
                {
                    "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/food/f9.mp4",
                    "Effects": [
                        {
                            "Radius": 0.1,
                            "Type": "Background",
                            "SubType": "Blur"
                        },
                        {
                            "Type": "Clip",
                            "SubType": "RandomClip",
                            "ClipDuration": 2.986
                        }
                    ]
                },
                {
                    "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/food/f15.mp4",
                    "Effects": [
                        {
                            "Radius": 0.1,
                            "Type": "Background",
                            "SubType": "Blur"
                        },
                        {
                            "Type": "Clip",
                            "SubType": "RandomClip",
                            "ClipDuration": 1.3789997
                        }
                    ]
                },
                {
                    "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/food/f4.mp4",
                    "Effects": [
                        {
                            "Radius": 0.1,
                            "Type": "Background",
                            "SubType": "Blur"
                        },
                        {
                            "Type": "Clip",
                            "SubType": "RandomClip",
                            "ClipDuration": 2.5270004
                        }
                    ]
                },
                {
                    "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/food/f12.mp4",
                    "Effects": [
                        {
                            "Radius": 0.1,
                            "Type": "Background",
                            "SubType": "Blur"
                        },
                        {
                            "Type": "Clip",
                            "SubType": "RandomClip",
                            "ClipDuration": 1.1490002
                        }
                    ]
                },
                {
                    "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/food/f2.mp4",
                    "Effects": [
                        {
                            "Radius": 0.1,
                            "Type": "Background",
                            "SubType": "Blur"
                        },
                        {
                            "Type": "Clip",
                            "SubType": "RandomClip",
                            "ClipDuration": 3.6759996
                        }
                    ]
                },
                {
                    "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/food/f10.mp4",
                    "Effects": [
                        {
                            "Radius": 0.1,
                            "Type": "Background",
                            "SubType": "Blur"
                        },
                        {
                            "Type": "Clip",
                            "SubType": "RandomClip",
                            "ClipDuration": 2.5270004
                        }
                    ]
                },
                {
                    "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/food/f6.mp4",
                    "Effects": [
                        {
                            "Radius": 0.1,
                            "Type": "Background",
                            "SubType": "Blur"
                        },
                        {
                            "Type": "Clip",
                            "SubType": "RandomClip",
                            "ClipDuration": 1.8380003
                        }
                    ]
                },
                {
                    "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/food/f14.mp4",
                    "Effects": [
                        {
                            "Radius": 0.1,
                            "Type": "Background",
                            "SubType": "Blur"
                        },
                        {
                            "Type": "Clip",
                            "SubType": "RandomClip",
                            "ClipDuration": 2.2979984
                        }
                    ]
                }
            ]
        }
    ],
    "AudioTracks": [
        {
            "AudioTrackClips": [
                {
                    "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/food/food_speech.mp3"
                }
            ]
        },
        {
            "AudioTrackClips": [
                {
                    "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/music/m1.wav"
                }
            ]
        }
    ],
    "SubtitleTracks": [
        {
            "SubtitleTrackClips": [
                {
                    "Type": "Text",
                    "Font": "HappyZcool-2016",
                    "Content": "舌尖上的美食",
                    "FontSize": 80,
                    "FontColor": "#ffffff",
                    "Y": 0.15,
                    "Alignment": "TopCenter",
                    "EffectColorStyle": "CS0004-000005",
                    "FontFace": {
                        "Bold": true,
                        "Italic": false,
                        "Underline": false
                    }
                }
            ]
        },
        {
            "SubtitleTrackClips": [
                {
                    "TimelineIn": 0,
                    "TimelineOut": 2.986,
                    "OutlineColour": "#000000",
                    "FontColor": "#ffffff",
                    "Outline": 2,
                    "Font": "Alibaba PuHuiTi",
                    "Type": "Text",
                    "Alignment": "TopCenter",
                    "FontSize": 55,
                    "Content": "人们懂得用五味杂陈形容人生",
                    "Y": 0.75,
                    "AdaptMode": "AutoWrap",
                    "TextWidth": 0.8
                },
                {
                    "TimelineIn": 2.986,
                    "TimelineOut": 4.365,
                    "OutlineColour": "#000000",
                    "FontColor": "#ffffff",
                    "Outline": 2,
                    "Font": "Alibaba PuHuiTi",
                    "Type": "Text",
                    "Alignment": "TopCenter",
                    "FontSize": 55,
                    "Content": "因为懂得味道",
                    "Y": 0.75,
                    "AdaptMode": "AutoWrap",
                    "TextWidth": 0.8
                },
                {
                    "TimelineIn": 4.365,
                    "TimelineOut": 6.892,
                    "OutlineColour": "#000000",
                    "FontColor": "#ffffff",
                    "Outline": 2,
                    "Font": "Alibaba PuHuiTi",
                    "Type": "Text",
                    "Alignment": "TopCenter",
                    "FontSize": 55,
                    "Content": "是每个人心中固守的情怀",
                    "Y": 0.75,
                    "AdaptMode": "AutoWrap",
                    "TextWidth": 0.8
                },
                {
                    "TimelineIn": 6.892,
                    "TimelineOut": 8.041,
                    "OutlineColour": "#000000",
                    "FontColor": "#ffffff",
                    "Outline": 2,
                    "Font": "Alibaba PuHuiTi",
                    "Type": "Text",
                    "Alignment": "TopCenter",
                    "FontSize": 55,
                    "Content": "在这个时代",
                    "Y": 0.75,
                    "AdaptMode": "AutoWrap",
                    "TextWidth": 0.8
                },
                {
                    "TimelineIn": 8.041,
                    "TimelineOut": 11.717,
                    "OutlineColour": "#000000",
                    "FontColor": "#ffffff",
                    "Outline": 2,
                    "Font": "Alibaba PuHuiTi",
                    "Type": "Text",
                    "Alignment": "TopCenter",
                    "FontSize": 55,
                    "Content": "每一个人都经历了太多的苦痛和喜悦",
                    "Y": 0.75,
                    "AdaptMode": "AutoWrap",
                    "TextWidth": 0.8
                },
                {
                    "TimelineIn": 11.717,
                    "TimelineOut": 14.244,
                    "OutlineColour": "#000000",
                    "FontColor": "#ffffff",
                    "Outline": 2,
                    "Font": "Alibaba PuHuiTi",
                    "Type": "Text",
                    "Alignment": "TopCenter",
                    "FontSize": 55,
                    "Content": "人们总会将苦涩藏在心里",
                    "Y": 0.75,
                    "AdaptMode": "AutoWrap",
                    "TextWidth": 0.8
                },
                {
                    "TimelineIn": 14.244,
                    "TimelineOut": 16.082,
                    "OutlineColour": "#000000",
                    "FontColor": "#ffffff",
                    "Outline": 2,
                    "Font": "Alibaba PuHuiTi",
                    "Type": "Text",
                    "Alignment": "TopCenter",
                    "FontSize": 55,
                    "Content": "而把幸福变成食物",
                    "Y": 0.75,
                    "AdaptMode": "AutoWrap",
                    "TextWidth": 0.8
                },
                {
                    "TimelineIn": 16.082,
                    "TimelineOut": 18.38,
                    "OutlineColour": "#000000",
                    "FontColor": "#ffffff",
                    "Outline": 2,
                    "Font": "Alibaba PuHuiTi",
                    "Type": "Text",
                    "Alignment": "TopCenter",
                    "FontSize": 55,
                    "Content": "呈现在四季的餐桌之上",
                    "Y": 0.75,
                    "AdaptMode": "AutoWrap",
                    "TextWidth": 0.8
                }
            ]
        }
    ]
}

标题+视频+音乐

成片效果

Timeline示例

{
  "VideoTracks": [{
    "VideoTrackClips": [{
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h1.mp4",
      "Out": 5,
      "Effects": [{
        "Type": "Volume",
        "Gain": 0
      }]
    },{
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h2.mp4",
      "Out": 5,
      "Effects": [{
        "Type": "Volume",
        "Gain": 0
      }]
    },{
      "MediaURL": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h3.mp4",
      "Out": 5,
      "Effects": [{
        "Type": "Volume",
        "Gain": 0
      }]
    }]
  }],
  "AudioTracks": [{
    "AudioTrackClips": [{
      "MediaUrl": "http://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/music/m1.wav",
      "Out": 15
    }]
  }]
}

相关文档

  • 本页导读 (1)