全部产品
Search
文档中心

Intelligent Media Services:Menghasilkan video setelah pemrosesan data cerdas

更新时间:Nov 12, 2025

Topik ini menjelaskan cara memodifikasi parameter Timeline operasi SubmitMediaProducingJob untuk menghasilkan video menggunakan pemrosesan cerdas.

Catatan penggunaan

  • Produksi cerdas mendukung pengeditan dan komposit, rendering efek, serta templat untuk aliran langsung, file VOD, dan file materi dari Object Storage Service (OSS). Untuk informasi selengkapnya, lihat Ikhtisar produksi cerdas.

  • Anda dapat menghasilkan video dari satu atau beberapa video, file audio, citra, dan materi teks dengan mengonfigurasi parameter Timeline dan memanggil operasi SubmitMediaProducingJob.

  • Timeline dibuat saat Anda menambahkan materi dan mengonfigurasi efek untuk membuat video. Timeline terdiri dari track, materi, dan efek. Untuk informasi selengkapnya, lihat Konfigurasi Timeline.

  • Untuk informasi selengkapnya tentang cara menggunakan SDK IMS untuk mengedit file audio dan video, lihat Persiapan.

Gunakan AI_ASR untuk mengonversi ucapan menjadi teks dan menggabungkan teks tersebut ke dalam video

Tetapkan "Type" ke "AI_ASR" untuk mengonversi ucapan dalam audio atau video menjadi teks. Anda juga dapat mengatur gaya teks, seperti font dan warna.

Catatan

Layanan ucapan-ke-teks hanya tersedia di Wilayah Tiongkok (Shanghai), Tiongkok (Beijing), Tiongkok (Hangzhou), dan Tiongkok (Shenzhen).

Efek

Contoh Timeline

{
  "VideoTracks": [{
    "VideoTrackClips": [{
      "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h5.mp4",
      "Effects": [{
        "Type": "AI_ASR",
        "Font": "AlibabaPuHuiTi",
        "Alignment": "TopCenter",
        "Y": 910,
        "Outline": 10,
        "OutlineColour": "#ffffff",
        "FontSize": 60,
        "FontColor": "#000079",
        "FontFace": {
          "Bold": true,
          "Italic": false,
          "Underline": false
        }
      }]
    }]
  }]
}

Gunakan AI_TTS untuk mengonversi teks menjadi ucapan dan menggabungkan ucapan tersebut ke dalam video

Tetapkan "Type" ke "AI_TTS" untuk mengonversi teks menjadi ucapan. Fitur ini dapat digunakan bersama fitur AI_ASR. Parameter Content menentukan teks yang akan dikonversi. Anda juga dapat mengatur properti ucapan, seperti Voice, SpeechRate, PitchRate, dan Format.

Catatan
  • Layanan teks-ke-ucapan dan ucapan-ke-teks hanya tersedia di Wilayah Tiongkok (Shanghai), Tiongkok (Beijing), dan Tiongkok (Hangzhou).

  • Secara default, AI_TTS membagi kalimat berdasarkan tanda baca bahasa Tiongkok seperti koma dan titik. Pengembang dapat mengontrol gaya teks dan mode jeda baris untuk setiap segmen kalimat.

Efek

Contoh Timeline

{
  "VideoTracks": [{
    "VideoTrackClips": [{
      "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h3.mp4",
      "Effects": [{
        "Type":"Volume",
        "Gain":0
      }]
    }]
  }],
  "AudioTracks": [{
    "AudioTrackClips": [{
      "Type": "AI_TTS",
      "Content": "Do you not see the Yellow River come from the sky, rushing into the sea and never come back? Do you not see the mirrors bright in chambers high, grieve over your snow-white hair though once it was silk-black?",
      "Voice": "sicheng",
      "Effects": [{
        "Type": "AI_ASR",
        "Font": "AlibabaPuHuiTi",
        "Alignment": "TopCenter",
        "Y": 900,
        "FontSize": 80,
        "FontColor": "#ffffff",
        "FontFace": {
          "Bold": true,
          "Italic": false,
          "Underline": false
        }
      },{
        "Type":"Volume",
        "Gain":2
      }]
    }]
  }]
}

Gunakan AI_TTS untuk mengonversi teks menjadi ucapan dan mengontrol ritme atau pelafalan dengan SSML

Bidang Content dalam AI_TTS mendukung Bahasa Markup Sintesis Ucapan (SSML). Gunakan SSML untuk memperbaiki pelafalan istilah teknis, menambahkan jeda, dan menyertakan berbagai efek suara emosional.

Efek

Contoh Timeline

{
  "VideoTracks": [{
    "VideoTrackClips": [{
      "Type": "Image",
      "MediaURL": "https://your-bucket***.oss-cn-shanghai.aliyuncs.com/your-image1.jpg",
      "Duration": 3,
      "Effects": [{
          "Radius": 0.1,
          "Type": "Background",
          "SubType": "Blur"
        },
        {
          "Type": "Transition",
          "SubType": "windowslice",
          "Duration": 0.3
        }
      ]
    }, {
      "Type": "Image",
      "MediaURL": "https://your-bucket***.oss-cn-shanghai.aliyuncs.com/your-image2.jpg",
      "Duration": 3,
      "Effects": [{
          "Radius": 0.1,
          "Type": "Background",
          "SubType": "Blur"
        },
        {
          "Type": "Transition",
          "SubType": "windowslice",
          "Duration": 0.3
        }
      ]
    }, {
      "Type": "Image",
      "MediaURL": "https://your-bucket***.oss-cn-shanghai.aliyuncs.com/your-image3.jpg",
      "Duration": 3,
      "Effects": [{
          "Radius": 0.1,
          "Type": "Background",
          "SubType": "Blur"
        },
        {
          "Type": "Transition",
          "SubType": "windowslice",
          "Duration": 0.3
        }
      ]
    }]
  }],
  "AudioTracks": [{
    "MainTrack": true,
    "AudioTrackClips": [{
      "Type": "AI_TTS",
      "Voice": "zhichu",
      "Content": "PU line, short for Polyurethane line, is a molding made from synthetic PU materials. PU stands for polyurethane, and the molding is made from rigid PU foam.",
      "Effects": [{
        "Type": "AI_ASR",
        "Font": "AlibabaPuHuiTi",
        "Alignment": "TopCenter",
        "Y": 1000,
        "FontSize": 50,
        "FontColor": "#ffffff",
        "AdaptMode": "AutoWrap",
        "Outline": 1,
        "OutlineColour": "#0e0100",
        "FontFace": {
          "Bold": true,
          "Italic": false,
          "Underline": false
        }
      }, {
        "Type": "Volume",
        "Gain": 1
      }]
    }, {
      "Type": "AI_TTS",
      "Voice": "zhichu",
      "Content": "<speak><sub alias=\"Pee You\">PU</sub> line, short for Polyurethane line, is a molding made from synthetic <sub alias=\"Pee You\">PU</sub> materials. PU stands for polyurethane, and the molding is made from rigid <sub alias=\"Pee You\">PU</sub> foam.</speak>",
      "Effects": [{
        "Type": "AI_ASR",
        "Font": "AlibabaPuHuiTi",
        "Alignment": "TopCenter",
        "Y": 1000,
        "FontSize": 50,
        "FontColor": "#ffffff",
        "AdaptMode": "AutoWrap",
        "Outline": 1,
        "OutlineColour": "#0e0100",
        "FontFace": {
          "Bold": true,
          "Italic": false,
          "Underline": false
        }
      }, {
        "Type": "Volume",
        "Gain": 1
      }]
    }]
  }],
  "SubtitleTracks": [{
    "SubtitleTrackClips": [{
      "Type": "Text",
      "X": 0,
      "Y": 200,
      "Font": "AlibabaPuHuiTi",
      "Content": "AI_TTS Standar: Pelafalan istilah teknis \"PU\" tidak akurat.",
      "Alignment": "TopCenter",
      "FontSize": 70,
      "FontColorOpacity": 1,
      "FontColor": "#990000",
      "AaiMotionLoopEffect1": "slingshot_in",
      "Outline": 1,
      "OutlineColour": "#ffffff",
      "TimelineIn": 0,
      "TimelineOut": 13,
      "AdaptMode": "AutoWrap",
      "FontFace": {
        "Bold": true,
        "Italic": false,
        "Underline": false
      }
    }, {
      "Type": "Text",
      "X": 0,
      "Y": 200,
      "Font": "AlibabaPuHuiTi",
      "Content": "AI_TTS dengan tag SSML: Pelafalan istilah teknis \"PU\" diperbaiki.",
      "Alignment": "TopCenter",
      "FontSize": 70,
      "FontColorOpacity": 1,
      "FontColor": "#006633",
      "Outline": 1,
      "OutlineColour": "#ffffff",
      "TimelineIn": 13,
      "AdaptMode": "AutoWrap",
      "FontFace": {
        "Bold": true,
        "Italic": false,
        "Underline": false
      }
    }]
  }]
}

AI_Matting: Pemotongan layar hijau

Tetapkan "Type" ke "AI_Matting" untuk mengekstrak subjek dari latar belakang layar hijau dan menumpangkannya ke video atau citra latar belakang tertentu.

Catatan

Layanan pemotongan layar hijau hanya tersedia di Wilayah Tiongkok (Hangzhou), Tiongkok (Shanghai), dan Tiongkok (Beijing).

Efek

Contoh Timeline

{
  "VideoTracks": [{
    "VideoTrackClips": [{
      "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/background_v2.jpg",
      "Type": "GlobalImage",
      "Width": 1,
      "Height": 1,
      "AdaptMode": "Cover"
    }]
  }, {
    "VideoTrackClips": [{
      "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/green-matting-1.mp4",
      "Effects": [{
        "Type": "AI_Matting",
        "Color": "green",
        "Auto": 1,
        "Thres": 10
      }]
    }]
  }]
}

AI_RealMatting: Penggantian latar belakang

Tetapkan "Type" ke "AI_RealMatting" untuk mengekstrak seseorang dari latar belakang dunia nyata apa pun dan menumpangkannya ke video atau citra latar belakang tertentu.

Catatan

Layanan penggantian latar belakang hanya tersedia di Wilayah Tiongkok (Hangzhou), Tiongkok (Shanghai), dan Tiongkok (Beijing).

Efek

Contoh Timeline

{
  "VideoTracks": [
    {
      "VideoTrackClips": [
        {
          "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/image/03.jpg",
          "Type": "GlobalImage",
          "Width": 0.5,
          "Height": 1,
          "X": 0.5,
          "Y": 0,
          "AdaptMode": "Cover"
        }
      ]
    },
    {
      "VideoTrackClips": [
        {
          "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h6.mov",
          "In": 0,
          "Out": 10,
          "Width": 0.5,
          "Height": 1,
          "AdaptMode": "Cover",
          "X": 0.5,
          "Effects": [
            {
              "Type": "AI_RealMatting",
              "Thres": 8
            },
            {
              "Type": "Crop",
              "X": 0.25,
              "Height": 1,
              "Width": 0.5
            },
            {
              "Type": "Text"
            }
          ]
        }
      ]
    },
    {
      "VideoTrackClips": [
        {
          "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h6.mov",
          "In": 0,
          "Out": 10,
          "Width": 0.5,
          "Height": 1,
          "AdaptMode": "Cover",
          "Effects": [
            {
              "Type": "Crop",
              "X": 0.25,
              "Height": 1,
              "Width": 0.5
            },
            {
              "Type": "Volume",
              "Gain": 0
            }
          ]
        }
      ]
    }
  ]
}

Sorot konten utama secara otomatis dalam teks dengan AI_ASR

Tetapkan "NeedHighlighting": true dalam Efek AI_ASR dan konfigurasikan gaya sorotan. Ini secara otomatis menyorot teks yang dikenali untuk menekankan konten utama.

Efek

Contoh Timeline

{
  "VideoTracks": [
    {
      "VideoTrackClips": [
        {
          "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h4.mp4",
          "Effects": [
            {
              "Type": "AI_ASR",
              "Font": "AlibabaPuHuiTi",
              "Alignment": "TopCenter",
              "Y": 820,
              "FontSize": 60,
              "FontColor": "#FFFFFF",
              "FontFace": {
                "Bold": true,
                "Italic": false,
                "Underline": false
              },
              "NeedHighlighting": true,
              "HighlightingStyle": {
                "FontColor": "F6DD14",
                "OutlineColour": "873600",
                "Outline": 4
              },
              "SubtitleEffects": [
                {
                  "Type": "Box",
                  "Color": "000000",
                  "Opacity": "0.9",
                  "XBord": 30,
                  "YBord": 20
                }
              ]
            }
          ]
        },
        {
          "MediaURL": "https://ice-document-materials.oss-cn-shanghai.aliyuncs.com/test_media/h1.png",
          "Type": "Image",
          "Duration": 12.31,
          "ClipId": "image",
          "Effects": [
            {
              "Type": "Volume",
              "Gain": 0
            }
          ]
        }
      ]
    }
  ],
  "AudioTracks": [
    {
      "AudioTrackClips": [
        {
          "Type": "AI_TTS",
          "Content": "Alibaba Cloud Intelligent Media Services (IMS) adalah layanan satu atap untuk skenario streaming langsung dan video sesuai permintaan (VOD). Layanan ini menyediakan kemampuan untuk ingest media, manajemen aset, produksi konten, dan distribusi.",
          "ReferenceClipId": "image",
          "Voice": "sicheng",
          "Effects": [
            {
              "Type": "AI_ASR",
              "Font": "AlibabaPuHuiTi",
              "Alignment": "TopCenter",
              "Y": 820,
              "FontSize": 80,
              "FontColor": "#ffffff",
              "FontFace": {
                "Bold": true,
                "Italic": false,
                "Underline": false
              },
              "TextWidth": "0.8",
              "AdaptMode": "AutoWrap",
              "NeedHighlighting": true,
              "HighlightingStyle": {
                "FontColor": "F6DD14",
                "OutlineColour": "873600",
                "Outline": 4
              }
            },
            {
              "Type": "Volume",
              "Gain": 2
            }
          ]
        }
      ]
    }
  ]
}

Referensi