Detailed code example for generating flower character effects in video clips

This article is the fourth issue of the Alibaba Cloud Intelligent Media Service IMS "Cloud Intelligent Editing" Practice Guide. By using the officially provided flower character templates or custom-designed flower characters, you can complete rich and exquisite flower character special effects video editing.

Yu Chen|Author

In the post-editing of videos, the "flower character" is a special existence.

By using fancy characters suitable for videos, you can not only enrich the video content, but also make the information conveyed in the video easier for users to accept, and deepen the audience's impression of the video content.

For customers who are doing short video marketing scenarios, fancy characters play a vital role, not only enhancing the ability of the video to convey information, but also increasing the sophistication of the video.

The commonly used floral characters in videos generally include several elements: text color, texture, font, multi-layer strokes, multi-layer shadows, background and glow effects, etc.

This article mainly introduces how to add flower characters by using the intelligent media service IMS "Cloud Intelligent Editing". It will introduce the powerful flower character capabilities from two aspects: "how to use official flower characters" and "how to customize the design of flower characters". The effect of this article is relatively simple to achieve. Just replace the video address with your own oss address to achieve the example effect.

01 original subtitles

We refer to the more mainstream marketing short video editing models on the market and use the following process as a template for demo display.

- Use a picture as the video cover, add main title, subtitle and description text;

- Use three videos shot horizontally as the main content, output as a vertical screen video (convenient for mobile phone viewing), and add a background blur effect up and down;

- Each video or picture corresponds to a TTS oral broadcast, so that the video or picture is aligned with the oral broadcast to ensure the smoothness of the video;

- TTS oral broadcast is also paired with ASR subtitles.

According to the template above, let’s first look at a video effect edited without using any complex subtitle effects:

https://v.qq.com/x/page/p3502q8vcef.html

After watching the video, I found that there are some problems with the subtitles in the video:

lThe  video background is relatively complex. When the subtitle color is close to the video background color, the subtitles will not be clear enough;

lThe  subtitles are relatively monotonous and the video content is not refined enough, which can easily cause visual fatigue for users and reduce communication power;

lThe  subtitles are not eye-catching enough to allow users to grasp the key information of the video at a glance.

Original subtitle Timeline:

{
  "VideoTracks": [{
    "VideoTrackClips": [{
        "MediaUrl": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/cover.jpg",
        "Width": 1,
        "Height": 1,
        "Type": "Image",
        "AdaptMode": "Cover",
        "ReferenceClipId": "speech_1",
        "Effects": [{
            "Type": "Text",
            "Font": "HappyZcool-2016",
            "Content": "朋友聚餐",
            "Y": 0.5,
            "FontSize": 80,
            "Angle": "30",
            "Alignment": "TopCenter",
            "FontColor": "#ffffff"
          },
          {
            "Type": "Text",
            "Font": "HappyZcool-2016",
            "Content": "同学聚会",
            "Y": 0.6,
            "FontSize": 80,
            "Angle": "30",
            "Alignment": "TopCenter",
            "FontColor": "#ffffff"
          },
          {
            "Type": "Text",
            "Font": "HappyZcool-2016",
            "Content": "家人团聚",
            "Y": 0.7,
            "FontSize": 80,
            "Angle": "30",
            "Alignment": "TopCenter",
            "FontColor": "#ffffff"
          },
          {
            "Type": "Text",
            "Font": "HappyZcool-2016",
            "Content": "同事团建",
            "Y": 0.8,
            "FontSize": 80,
            "Angle": "30",
            "Alignment": "TopCenter",
            "FontColor": "#ffffff"
          }
        ]
      },
      {
        "Comment": "火锅",
        "MediaUrl": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/%E7%81%AB%E9%94%85.mp4",
        "Y": 0.3,
        "Width": 1080,
        "Height": 608,
        "AdaptMode": "Cover",
        "Effects": [{
          "Type": "Background",
          "SubType": "Blur",
          "Radius": 0.1
        }],
        "ReferenceClipId": "speech_2"
      },
      {
        "Comment": "烤羊肉串",
        "MediaUrl": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/%E7%83%A4%E7%BE%8A%E8%82%89%E4%B8%B2.mp4",
        "Y": 0.3,
        "Width": 1080,
        "Height": 608,
        "AdaptMode": "Cover",
        "Effects": [{
          "Type": "Background",
          "SubType": "Blur",
          "Radius": 0.1
        }],
        "ReferenceClipId": "speech_3"
      },
      {
        "Comment": "大鱿鱼",
        "MediaUrl": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/%E7%83%A4%E9%B1%BF%E9%B1%BC.mp4",
        "Y": 0.3,
        "Width": 1080,
        "Height": 608,
        "AdaptMode": "Cover",
        "Effects": [{
          "Type": "Background",
          "SubType": "Blur",
          "Radius": 0.1
        }],
        "ReferenceClipId": "speech_4"
      },
      {
        "Comment": "新鲜蔬菜",
        "MediaUrl": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/%E8%94%AC%E8%8F%9C.mp4",
        "Y": 0.3,
        "Width": 1080,
        "Height": 608,
        "AdaptMode": "Cover",
        "Effects": [{
          "Type": "Background",
          "SubType": "Blur",
          "Radius": 0.1
        }],
        "ReferenceClipId": "speech_5"
      }
    ]
  }],
  "AudioTracks": [{
    "AudioTrackClips": [{
        "Type": "AI_TTS",
        "Content": "周末就来阿云美食城吧",
        "Voice": "zhimi_emo",
        "ClipId": "speech_1"
      },
      {
        "Type": "AI_TTS",
        "Content": "这里有入口醇香的老北京火锅!",
        "Voice": "zhimi_emo",
        "Effects": [{
          "Type": "AI_ASR",
          "Font": "HappyZcool-2016",
          "Alignment": "TopCenter",
          "Y": 0.65,
          "FontSize": 80,
          "FontColor": "#ffffff"
        }],
        "ClipId": "speech_2"
      },
      {
        "Type": "AI_TTS",
        "Content": "这里有香喷喷的烤羊肉串!",
        "Voice": "zhimi_emo",
        "Effects": [{
          "Type": "AI_ASR",
          "Font": "HappyZcool-2016",
          "Alignment": "TopCenter",
          "Y": 0.65,
          "FontSize": 80,
          "FontColor": "#ffffff"
        }],
        "ClipId": "speech_3"
      },
      {
        "Type": "AI_TTS",
        "Content": "这里有无比鲜嫩的大鱿鱼!",
        "Voice": "zhimi_emo",
        "Effects": [{
          "Type": "AI_ASR",
          "Font": "HappyZcool-2016",
          "Alignment": "TopCenter",
          "Y": 0.65,
          "FontSize": 80,
          "FontColor": "#ffffff"
        }],
        "ClipId": "speech_4"
      },
      {
        "Type": "AI_TTS",
        "Content": "还有各种新鲜蔬菜等你来品尝~",
        "Voice": "zhimi_emo",
        "Effects": [{
          "Type": "AI_ASR",
          "Font": "HappyZcool-2016",
          "Alignment": "TopCenter",
          "Y": 0.65,
          "FontSize": 80,
          "FontColor": "#ffffff"
        }],
        "ClipId": "speech_5"
      }
    ]
  }],
  "SubtitleTracks": [{
    "SubtitleTrackClips": [{
        "Comment": "主标题",
        "Type": "Text",
        "Font": "HappyZcool-2016",
        "Y": 0.05,
        "FontSize": 200,
        "Content": "阿云美食城",
        "FontColor": "#CFFAFF",
        "SizeRequestType": "Nominal",
        "AdaptMode": "AutoScale",
        "Spacing": 3,
        "Alignment": "TopCenter"
      },
      {
        "Comment": "副标题",
        "Type": "Text",
        "Font": "HappyZcool-2016",
        "Y": 0.2,
        "FontSize": 100,
        "Content": "味蕾盛宴",
        "FontColor": "#CFFAFF",
        "SizeRequestType": "Nominal",
        "AdaptMode": "AutoScale",
        "Spacing": 3,
        "Alignment": "TopCenter"
      }
    ]
  }]
}

02 32 sets of official characters

In order to solve the above-mentioned problems such as the original subtitle text is not obvious and the effect is relatively poor, we can use the official characters integrated in IMS to enrich the video content. Alibaba Cloud Intelligent Media Service has added 32 sets of advanced characters.

Examples of flower character effects:

https://help.aliyun.com/document_detail/449561.html

You can simply set the flower character ID to achieve a variety of flower character effects with one click. The effect of using official characters to enrich video content is as follows:

https://v.qq.com/x/page/r3502mwbj8h.html

Comparing the effect of the original subtitle version without the fancy characters, we can find that the short marketing video produced with the official fancy characters will no longer make the subtitles unclear due to changes in the background color of the video, and thus can better capture the audience's attention. deepen impression.

The way to set flower characters is also very simple. Just set a flower character ID, such as "EffectColorStyle": "CS0002-000011". If you need to modify the text font, you can use the custom font function or use our official built-in font library .

Official floral timeline:


{
  "VideoTracks": [{
    "VideoTrackClips": [{
        "MediaUrl": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/cover.jpg",
        "Width": 1,
        "Height": 1,
        "Type": "Image",
        "AdaptMode": "Cover",
        "ReferenceClipId": "speech_1",
        "Effects": [{
            "Type": "Text",
            "Content": "朋友聚餐",
            "Y": 0.5,
            "FontSize": 80,
            "Angle": "30",
            "Alignment": "TopCenter",
            "EffectColorStyle": "CS0001-000015"
          },
          {
            "Type": "Text",
            "Content": "同学聚会",
            "Y": 0.6,
            "FontSize": 80,
            "Angle": "30",
            "Alignment": "TopCenter",
            "EffectColorStyle": "CS0001-000015"
          },
          {
            "Type": "Text",
            "Content": "家人团聚",
            "Y": 0.7,
            "FontSize": 80,
            "Angle": "30",
            "Alignment": "TopCenter",
            "EffectColorStyle": "CS0001-000015"
          },
          {
            "Type": "Text",
            "Content": "同事团建",
            "Y": 0.8,
            "FontSize": 80,
            "Angle": "30",
            "Alignment": "TopCenter",
            "EffectColorStyle": "CS0001-000015"
          }
        ]
      },
      {
        "Comment": "火锅",
        "MediaUrl": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/%E7%81%AB%E9%94%85.mp4",
        "Y": 0.3,
        "Width": 1080,
        "Height": 608,
        "AdaptMode": "Cover",
        "Effects": [{
          "Type": "Background",
          "SubType": "Blur",
          "Radius": 0.1
        }],
        "ReferenceClipId": "speech_2"
      },
      {
        "Comment": "烤羊肉串",
        "MediaUrl": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/%E7%83%A4%E7%BE%8A%E8%82%89%E4%B8%B2.mp4",
        "Y": 0.3,
        "Width": 1080,
        "Height": 608,
        "AdaptMode": "Cover",
        "Effects": [{
          "Type": "Background",
          "SubType": "Blur",
          "Radius": 0.1
        }],
        "ReferenceClipId": "speech_3"
      },
      {
        "Comment": "大鱿鱼",
        "MediaUrl": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/%E7%83%A4%E9%B1%BF%E9%B1%BC.mp4",
        "Y": 0.3,
        "Width": 1080,
        "Height": 608,
        "AdaptMode": "Cover",
        "Effects": [{
          "Type": "Background",
          "SubType": "Blur",
          "Radius": 0.1
        }],
        "ReferenceClipId": "speech_4"
      },
      {
        "Comment": "新鲜蔬菜",
        "MediaUrl": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/%E8%94%AC%E8%8F%9C.mp4",
        "Y": 0.3,
        "Width": 1080,
        "Height": 608,
        "AdaptMode": "Cover",
        "Effects": [{
          "Type": "Background",
          "SubType": "Blur",
          "Radius": 0.1
        }],
        "ReferenceClipId": "speech_5"
      }
    ]
  }],
  "AudioTracks": [{
    "AudioTrackClips": [{
        "Type": "AI_TTS",
        "Content": "周末就来阿云美食城吧",
        "Voice": "zhimi_emo",
        "ClipId": "speech_1"
      },
      {
        "Type": "AI_TTS",
        "Content": "这里有入口醇香的老北京火锅!",
        "Voice": "zhimi_emo",
        "Effects": [{
          "Type": "AI_ASR",
          "Font": "KaiTi",
          "Spacing": 2,
          "Alignment": "TopCenter",
          "Y": 0.65,
          "FontSize": 70,
          "AdaptMode": "AutoWrap",
          "EffectColorStyle": "CS0001-000014"
        }],
        "ClipId": "speech_2"
      },
      {
        "Type": "AI_TTS",
        "Content": "这里有香喷喷的烤羊肉串!",
        "Voice": "zhimi_emo",
        "Effects": [{
          "Type": "AI_ASR",
          "Font": "KaiTi",
          "Spacing": 2,
          "Alignment": "TopCenter",
          "Y": 0.65,
          "FontSize": 70,
          "AdaptMode": "AutoWrap",
          "EffectColorStyle": "CS0001-000014"
        }],
        "ClipId": "speech_3"
      },
      {
        "Type": "AI_TTS",
        "Content": "这里有无比鲜嫩的大鱿鱼!",
        "Voice": "zhimi_emo",
        "Effects": [{
          "Type": "AI_ASR",
          "Font": "KaiTi",
          "Spacing": 2,
          "Alignment": "TopCenter",
          "Y": 0.65,
          "FontSize": 70,
          "AdaptMode": "AutoWrap",
          "EffectColorStyle": "CS0001-000014"
        }],
        "ClipId": "speech_4"
      },
      {
        "Type": "AI_TTS",
        "Content": "还有各种新鲜蔬菜等你来品尝~",
        "Voice": "zhimi_emo",
        "Effects": [{
          "Type": "AI_ASR",
          "Font": "KaiTi",
          "Spacing": 2,
          "Alignment": "TopCenter",
          "Y": 0.65,
          "FontSize": 70,
          "AdaptMode": "AutoWrap",
          "EffectColorStyle": "CS0001-000014"
        }],
        "ClipId": "speech_5"
      }
    ]
  }],
  "SubtitleTracks": [{
    "SubtitleTrackClips": [{
        "Comment": "主标题",
        "Type": "Text",
        "Y": 0.05,
        "FontSize": 200,
        "Content": "阿云美食城",
        "FontColor": "#CFFAFF",
        "SizeRequestType": "Nominal",
        "AdaptMode": "AutoScale",
        "Spacing": 2,
        "Alignment": "TopCenter",
        "EffectColorStyle": "CS0002-000003"
      },
      {
        "Comment": "副标题",
        "Type": "Text",
        "Y": 0.2,
        "FontSize": 100,
        "Content": "味蕾盛宴",
        "FontColor": "#CFFAFF",
        "SizeRequestType": "Nominal",
        "AdaptMode": "AutoScale",
        "Spacing": 2,
        "Alignment": "TopCenter",
        "EffectColorStyle": "CS0002-000011"
      }
    ]
  }]
}

03 Custom designed floral characters

When the official flower characters still cannot meet the needs of video production effects, we also support the custom flower character function. You can flexibly organize multi-layer stroke effects and multi-layer shadow effects. We also support setting Gaussian blur to achieve subtitle glow effects.

Before setting up the specific Timeline, let’s first take a look at the effect of custom-designed characters.

https://v.qq.com/x/page/h3502f25vuk.html

API protocol for customizing fancy characters:

https://help.aliyun.com/document_detail/198823.html

First, let’s look at an example of multi-layered strokes. Let’s take the official flower character CS0001-000016 as an example.

CS0001-000016 flower character

If you observe carefully, you can see that this flower character is realized by superimposing multiple layers of strokes with gradually darker colors from the outside to the inside. This flower character can be realized by setting multiple layers of stroke effects with gradually darker colors in SubtitleEffects.

The Color field is the RGB color value, and the Type is set to Outline to represent the stroke. When Bord and Shift are set to decimals from 0 to 1, they represent the value of the relative font size. The actual rendering will be multiplied by the FontSize value, so that different font sizes can be achieved. Below, the flower character effect remains basically the same.

SubtitleEffects is a JSON array. The higher it is, the further it will be at the bottom when rendering. Therefore, the bottom stroke Bord needs to be set slightly larger than the upper stroke Bord. Otherwise, the bottom stroke will be obscured by the upper stroke. Loss of effect.

The text color of the flower character is white, and the font is set to Zoku Happy. Based on this, the subtitle track parameters can be set as follows.

CS0001-000016 Huazi SubtitleTrackClips parameter analysis:

{
  "Type": "Text",
  "FontSize": 130,
  "Content": "阿里云剪辑",
  "Spacing": 2,
  "Alignment": "TopCenter",
  "Font": "HappyZcool-2016",
  "FontColor": "#ffffff",
  "SubtitleEffects": [{
    "Color": "#c6f295",
    "Type": "Outline",
    "Blur": 0.0,
    "XBord": 0.16,
    "YBord": 0.16,
    "XShift": 0.0,
    "YShift": 0.0,
    "Opacity": 1.0
  }, {
    "Color": "#99dda3",
    "Type": "Outline",
    "Blur": 0.0,
    "XBord": 0.12,
    "YBord": 0.12,
    "XShift": 0.0,
    "YShift": 0.0,
    "Opacity": 1.0
  }, {
    "Color": "#66c19c",
    "Type": "Outline",
    "Blur": 0.0,
    "XBord": 0.08,
    "YBord": 0.08,
    "XShift": 0.0,
    "YShift": 0.0,
    "Opacity": 1.0
  }, {
    "Color": "#138b8a",
    "Type": "Outline",
    "Blur": 0.0,
    "XBord": 0.04,
    "YBord": 0.04,
    "XShift": 0.0,
    "YShift": 0.0,
    "Opacity": 1.0
  }]
}

Let’s take a look at how to customize the subtitle glowing effect .

CS0002-000015 flower character

Let’s take the flower effect of CS0002-000015 as an example. If you look closely, you will see that this flower character is composed of two parts, one is the text projection at the bottom, and the other is the upper text body.

If you look closely, you can find that the outermost part of the text projection is composed of a layer of light blue luminous effect, and the middle is a layer of strokes, which contains dark blue text entities in the middle. We achieve the glowing effect by adding a blur effect to the shadows.

The main part of the upper text is composed of a layer stroke containing the outline of the main body of the text. The main part of the text has a translucent effect, so the subtitle track parameters of the flower effect analysis are as follows:

CS0002-000015 Huazi SubtitleTrackClips parameter analysis:

{
  "Type": "Text",
  "FontSize": 130,
  "Content": "阿里云剪辑",
  "Y": 0.3,
  "Spacing": 2,
  "SizeRequestType": "Nominal",
  "Alignment": "TopCenter",
  "Font": "HappyZcool-2016",
  "FontColor": "#00e6ff",
  "FontColorOpacity": 0.5607843137254902,
  "SubtitleEffects": [{
      "Color": "#1be6ff",
      "Type": "Shadow",
      "Blur": 0.14,
      "XBord": 0.02,
      "YBord": 0.02,
      "XShift": 0.04,
      "YShift": 0.04,
      "Opacity": 1.0
    },
    {
      "Color": "#008c9e",
      "Type": "Shadow",
      "Blur": 0.0,
      "XBord": 0.04,
      "YBord": 0.04,
      "XShift": 0.04,
      "YShift": 0.04,
      "Opacity": 1.0
    },
    {
      "Color": "#29e6ff",
      "Type": "Outline",
      "Blur": 0.0,
      "XBord": 0.02,
      "YBord": 0.02,
      "XShift": 0.04,
      "YShift": 0.04,
      "Opacity": 1.0
    },
    {
      "Color": "#ffffff",
      "Type": "Outline",
      "Blur": 0.0,
      "XBord": 0.02,
      "YBord": 0.02,
      "XShift": 0.0,
      "YShift": 0.0,
      "Opacity": 1.0
    }
  ]
}

According to the above method of customizing flower characters, we can achieve any flower character effect we want to achieve. This is how the timeline of the above store-visiting marketing short video was realized.

Customized fancy word marketing video timeline:


{
  "VideoTracks": [{
    "VideoTrackClips": [{
        "MediaUrl": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/cover.jpg",
        "Width": 1,
        "Height": 1,
        "Type": "Image",
        "AdaptMode": "Cover",
        "ReferenceClipId": "speech_1",
        "Effects": [{
            "Type": "Text",
            "Content": "朋友聚餐",
            "Y": 0.5,
            "FontSize": 100,
            "Angle": "30",
            "Alignment": "TopCenter",
            "FontColor": "#FDC219",
            "FontURL": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/AliHYAiHei.ttf",
            "SubtitleEffects": [{
                "Type": "Outline",
                "Bord": 0.06,
                "Color": "#FDFDFD"
              },
              {
                "Type": "Outline",
                "Bord": 0.02,
                "Color": "#040404"
              }
            ]
          },
          {
            "Type": "Text",
            "Content": "同学聚会",
            "Y": 0.6,
            "FontSize": 100,
            "Angle": "30",
            "Alignment": "TopCenter",
            "FontColor": "#FDC219",
            "FontURL": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/AliHYAiHei.ttf",
            "SubtitleEffects": [{
                "Type": "Outline",
                "Bord": 0.06,
                "Color": "#FDFDFD"
              },
              {
                "Type": "Outline",
                "Bord": 0.02,
                "Color": "#040404"
              }
            ]
          },
          {
            "Type": "Text",
            "Content": "家人团聚",
            "Y": 0.7,
            "FontSize": 100,
            "Angle": "30",
            "Alignment": "TopCenter",
            "FontColor": "#FDC219",
            "FontURL": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/AliHYAiHei.ttf",
            "SubtitleEffects": [{
                "Type": "Outline",
                "Bord": 0.06,
                "Color": "#FDFDFD"
              },
              {
                "Type": "Outline",
                "Bord": 0.02,
                "Color": "#040404"
              }
            ]
          },
          {
            "Type": "Text",
            "Content": "同事团建",
            "Y": 0.8,
            "FontSize": 100,
            "Angle": "30",
            "Alignment": "TopCenter",
            "FontColor": "#FDC219",
            "FontURL": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/AliHYAiHei.ttf",
            "SubtitleEffects": [{
                "Type": "Outline",
                "Bord": 0.06,
                "Color": "#FDFDFD"
              },
              {
                "Type": "Outline",
                "Bord": 0.02,
                "Color": "#040404"
              }
            ]
          }
        ]
      },
      {
        "Comment": "火锅",
        "MediaUrl": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/%E7%81%AB%E9%94%85.mp4",
        "Y": 0.3,
        "Width": 1080,
        "Height": 608,
        "AdaptMode": "Cover",
        "Effects": [{
          "Type": "Background",
          "SubType": "Blur",
          "Radius": 0.1
        }],
        "ReferenceClipId": "speech_2"
      },
      {
        "Comment": "烤羊肉串",
        "MediaUrl": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/%E7%83%A4%E7%BE%8A%E8%82%89%E4%B8%B2.mp4",
        "Y": 0.3,
        "Width": 1080,
        "Height": 608,
        "AdaptMode": "Cover",
        "Effects": [{
          "Type": "Background",
          "SubType": "Blur",
          "Radius": 0.1
        }],
        "ReferenceClipId": "speech_3"
      },
      {
        "Comment": "大鱿鱼",
        "MediaUrl": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/%E7%83%A4%E9%B1%BF%E9%B1%BC.mp4",
        "Y": 0.3,
        "Width": 1080,
        "Height": 608,
        "AdaptMode": "Cover",
        "Effects": [{
          "Type": "Background",
          "SubType": "Blur",
          "Radius": 0.1
        }],
        "ReferenceClipId": "speech_4"
      },
      {
        "Comment": "新鲜蔬菜",
        "MediaUrl": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/%E8%94%AC%E8%8F%9C.mp4",
        "Y": 0.3,
        "Width": 1080,
        "Height": 608,
        "AdaptMode": "Cover",
        "Effects": [{
          "Type": "Background",
          "SubType": "Blur",
          "Radius": 0.1
        }],
        "ReferenceClipId": "speech_5"
      }
    ]
  }],
  "AudioTracks": [{
    "AudioTrackClips": [{
        "Type": "AI_TTS",
        "Content": "周末就来阿云美食城吧",
        "Voice": "zhimi_emo",
        "ClipId": "speech_1"
      },
      {
        "Type": "AI_TTS",
        "Content": "这里有入口醇香的老北京火锅!",
        "Voice": "zhimi_emo",
        "Effects": [{
          "Type": "AI_ASR",
          "Font": "KaiTi",
          "Spacing": 2,
          "Alignment": "TopCenter",
          "Y": 0.65,
          "FontSize": 70,
          "AdaptMode": "AutoWrap",
          "FontColor": "#FFFFFF",
          "SubtitleEffects": [{
              "Color": "#0420B6",
              "Type": "Shadow",
              "XBord": 0.07,
              "YBord": 0.07,
              "YShift": 0.06
            },
            {
              "Color": "#F2213F",
              "Type": "Shadow",
              "XBord": 0.07,
              "YBord": 0.07,
              "YShift": 0.03
            },
            {
              "Color": "#000000",
              "Type": "Shadow",
              "XShift": 0.01,
              "YShift": 0.01
            },
            {
              "Color": "#000000",
              "Type": "Outline",
              "XBord": 0.01,
              "YBord": 0.01
            }
          ]
        }],
        "ClipId": "speech_2"
      },
      {
        "Type": "AI_TTS",
        "Content": "这里有香喷喷的烤羊肉串!",
        "Voice": "zhimi_emo",
        "Effects": [{
          "Type": "AI_ASR",
          "Font": "KaiTi",
          "Spacing": 2,
          "Alignment": "TopCenter",
          "Y": 0.65,
          "FontSize": 70,
          "AdaptMode": "AutoWrap",
          "FontColor": "#FFFFFF",
          "SubtitleEffects": [{
              "Color": "#0420B6",
              "Type": "Shadow",
              "XBord": 0.07,
              "YBord": 0.07,
              "YShift": 0.06
            },
            {
              "Color": "#F2213F",
              "Type": "Shadow",
              "XBord": 0.07,
              "YBord": 0.07,
              "YShift": 0.03
            },
            {
              "Color": "#000000",
              "Type": "Shadow",
              "XShift": 0.01,
              "YShift": 0.01
            },
            {
              "Color": "#000000",
              "Type": "Outline",
              "XBord": 0.01,
              "YBord": 0.01
            }
          ]
        }],
        "ClipId": "speech_3"
      },
      {
        "Type": "AI_TTS",
        "Content": "这里有无比鲜嫩的大鱿鱼!",
        "Voice": "zhimi_emo",
        "Effects": [{
          "Type": "AI_ASR",
          "Font": "KaiTi",
          "Spacing": 2,
          "Alignment": "TopCenter",
          "Y": 0.65,
          "FontSize": 70,
          "AdaptMode": "AutoWrap",
          "FontColor": "#FFFFFF",
          "SubtitleEffects": [{
              "Color": "#0420B6",
              "Type": "Shadow",
              "XBord": 0.07,
              "YBord": 0.07,
              "YShift": 0.06
            },
            {
              "Color": "#F2213F",
              "Type": "Shadow",
              "XBord": 0.07,
              "YBord": 0.07,
              "YShift": 0.03
            },
            {
              "Color": "#000000",
              "Type": "Shadow",
              "XShift": 0.01,
              "YShift": 0.01
            },
            {
              "Color": "#000000",
              "Type": "Outline",
              "XBord": 0.01,
              "YBord": 0.01
            }
          ]
        }],
        "ClipId": "speech_4"
      },
      {
        "Type": "AI_TTS",
        "Content": "还有各种新鲜蔬菜等你来品尝~",
        "Voice": "zhimi_emo",
        "Effects": [{
          "Type": "AI_ASR",
          "Font": "KaiTi",
          "Spacing": 2,
          "Alignment": "TopCenter",
          "Y": 0.65,
          "FontSize": 70,
          "AdaptMode": "AutoWrap",
          "FontColor": "#FFFFFF",
          "SubtitleEffects": [{
              "Color": "#0420B6",
              "Type": "Shadow",
              "XBord": 0.07,
              "YBord": 0.07,
              "YShift": 0.06
            },
            {
              "Color": "#F2213F",
              "Type": "Shadow",
              "XBord": 0.07,
              "YBord": 0.07,
              "YShift": 0.03
            },
            {
              "Color": "#000000",
              "Type": "Shadow",
              "XShift": 0.01,
              "YShift": 0.01
            },
            {
              "Color": "#000000",
              "Type": "Outline",
              "XBord": 0.01,
              "YBord": 0.01
            }
          ]
        }],
        "ClipId": "speech_5"
      }
    ]
  }],
  "SubtitleTracks": [{
    "SubtitleTrackClips": [{
        "Comment": "主标题",
        "Type": "Text",
        "Y": 0.05,
        "FontSize": 200,
        "Content": "阿云美食城",
        "Spacing": 2,
        "SizeRequestType": "Nominal",
        "Alignment": "TopCenter",
        "Font": "HappyZcool-2016",
        "FontColor": "#F688AA",
        "SubtitleEffects": [{
            "Color": "#F688AA",
            "Type": "Shadow",
            "Blur": 0.30,
            "XBord": 0.15,
            "YBord": 0.15
          },
          {
            "Color": "#FFFFA0",
            "Type": "Shadow",
            "Blur": 0.08,
            "XBord": 0.08,
            "YBord": 0.08
          },
          {
            "Color": "#A33952",
            "Type": "Shadow",
            "XBord": 0,
            "YBord": 0,
            "XShift": 0.04,
            "Opacity": 1.0
          },
          {
            "Color": "#F5D2CC",
            "Type": "Shadow",
            "XBord": 0,
            "YBord": 0,
            "XShift": -0.04,
            "Opacity": 1.0
          }
        ]
      },
      {
        "Comment": "副标题",
        "Type": "Text",
        "Y": 0.2,
        "FontSize": 100,
        "Content": "味蕾盛宴",
        "SizeRequestType": "Nominal",
        "Spacing": 2,
        "Alignment": "TopCenter",
        "Font": "HappyZcool-2016",
        "FontColor": "#F9FAFA",
        "SubtitleEffects": [{
            "Color": "#F4DF50",
            "Type": "Shadow",
            "Blur": 15,
            "XBord": 7,
            "YBord": 7
          },
          {
            "Color": "#464120",
            "Type": "Outline",
            "XBord": 2,
            "YBord": 2
          }
        ]
      }
    ]
  }]
}

In the above video production, there is no parameter setting for time interception. Through the track alignment function, the oral broadcast and the video can be aligned to complete the entire process of automated editing. For track alignment example documentation, please refer to:

https://help.aliyun.com/document_detail/2507542.html

Intelligent media service IMS "Cloud Intelligent Editing" is a video editing production service based on cloud computing and artificial intelligence technology. It can provide users with core functions such as live broadcast editing, video editing, template factory, and digital human production, and can use AI to assist editing production. . This product can be widely used in the Internet, cultural media, advertising and marketing, education and finance and other industries to meet the needs of enterprises for large-scale, efficient, convenient and intelligent video content production.

For more product information, please click Alibaba Cloud Smart Editing: https://www.aliyun.com/product/apsaravideo/ice/editor?spm=5176.28055625

Welcome to join the official Q&A DingTalk group for consultation and communication: 31783668

Fined 200 yuan and more than 1 million yuan confiscated You Yuxi: The importance of high-quality Chinese documents Musk's hard-core migration server Solon for JDK 21, virtual threads are incredible! ! ! TCP congestion control saves the Internet Flutter for OpenHarmony is here The Linux kernel LTS period will be restored from 6 years to 2 years Go 1.22 will fix the for loop variable error Google celebrates its 25th anniversary Svelte has built a "new wheel" - runes
{{o.name}}
{{m.name}}

Guess you like

Origin my.oschina.net/u/4713941/blog/10114375