Quick start for transcoding tasks

Updated at:

This topic shows you how to start using transcoding tasks in Intelligent Media Service.

Process overview

The following diagram shows how to start a transcoding task in Intelligent Media Service. For detailed instructions, see the following sections.

image
  1. Activate a storage service and configure a storage location: Intelligent Media Service can use Object Storage Service (OSS) or ApsaraVideo for VOD for storage. You can activate the service that meets your storage requirements.

    Note
    • ApsaraVideo for VOD storage: ApsaraVideo for VOD provides a one-stop audio and video solution that includes video storage, media asset management, and CDN-based playback services. When you store files in ApsaraVideo for VOD, Intelligent Media Service enhances its capabilities, letting you rapidly develop and launch video services using the ApsaraVideo for VOD APIs.

    • Object Storage Service (OSS): OSS is a cloud storage service provided by Alibaba Cloud that offers massive capacity, high security, low cost, and high durability. You can develop audio and video services for various use cases using Intelligent Media Service and OSS.

  2. Upload media files: You can upload audio, video, image, or auxiliary media asset files to Intelligent Media Service for transcoding.

  3. (Optional) Create a transcoding template: Intelligent Media Service provides preset transcoding templates. If these do not meet your requirements, you can create a custom one.

  4. Create a transcoding task: You can select a transcoding template and configure settings such as the output location for the transcoding task.

  5. View transcoding results and status: After you submit a task, you can view its execution status.

Billing

For information about billing for transcoding in Intelligent Media Service, see VOD Media Processing.

Prerequisites

Intelligent Media Service is activated. For more information, see Activate Intelligent Media Service.

Start a transcoding task in the console

Step 1: Activate and configure storage

  1. Activate Object Storage Service (OSS) or ApsaraVideo for VOD.

  2. Configure a storage location.

    1. Log on to the IMS console.
    2. In the left-side navigation pane, choose Settings > Storage Management to go to the Storage Management page.

    3. Click Add Storage Location and select the storage location for the resource you want to upload. If you have multiple storage locations, the default location is selected. For more information about how to configure a default storage location, see Configure a storage location.

      Important

      The storage region must be the same as the service region of Intelligent Media Service. Otherwise, the upload fails.

  3. Optional: Configure categories.

    Before you upload media files, you can modify their titles and categories. You can set the category for a single media asset or for multiple media assets at once. You can also modify the title and category on the details page of the media asset after you upload it. To configure category templates, see Category Management.

Step 2: Upload media files

This section uses an audio or video file upload as an example. The steps for uploading images and auxiliary media assets are similar. For more information, see Upload files by using the console.

Note

A single media file can be up to 48.8 TB. If you attempt to upload files in unsupported formats or non-media files, the unsupported files are automatically filtered out, and the supported files are displayed in the console with a status of "waiting for upload". For a list of supported formats, see Upload files by using the console.

  1. Log on to the Intelligent Media Service console and go to the Upload Audio/Video page.

  2. Select an upload method.

    • Local Upload: Uploads audio and video files from your local computer.

    • URL Upload: Uploads audio and video files from a URL. This method is supported only for ApsaraVideo for VOD storage.

      Important

      To pause an upload in progress, click Cancel.

      You cannot resume a paused or failed upload. You must restart the upload.

    • Import from OSS: If your files are already in OSS, you can directly import the file information into Intelligent Media Service.

      Note

      If your files are already in OSS, you do not need to upload them again. You only need to import the file information into Intelligent Media Service to register a media ID.

  3. Configure upload parameters.

    • Select a storage location. OSS and ApsaraVideo for VOD are supported.

      Note

      In the console, M3U8 files can be uploaded only by using the URL Upload method. The Local Upload method is not supported.

    • If you select Import from OSS, you must select a bucket and a file path.

    • (Optional) Media Processing: After a file is uploaded, you can choose whether to process it immediately. If you want to process the media asset, select a workflow. After the upload is complete, Intelligent Media Service automatically runs the specified workflow to process the media.

      Media processing incurs storage and processing fees. For more information, see VOD Media Processing.

  4. Click OK to start the upload.

    Optional: In the file list, you can modify the Audio/Video Name and Category as needed. If no changes are required, skip this step.

(Optional) Step 3: Create a transcoding template

Intelligent Media Service provides preset transcoding templates that you can use directly. For more information about preset templates, see Preset templates. If the preset templates do not meet your transcoding requirements, you can follow the steps in this section to create a custom transcoding template.

Note

This section uses the creation of a standard transcoding template as an example. The steps for creating other templates, such as for subtitle burn-in, audio/video enhancement, and watermarks, are similar. For detailed steps and parameter descriptions, see Transcoding.

  1. In the left-side navigation pane, choose VOD Media Processing > Template Management to go to the Template Management page.

  2. On the Transcoding tab, select Standard, and then click Create Standard Transcoding Template.

  3. Configure the transcoding template parameters as needed.

    • When you configure video parameters, take note of the following:

      • If you select Disable Video, the video parameters become unavailable.

      • For Resolution, enter values that are multiples of 2. The other dimension scales automatically to maintain the aspect ratio. Values must be between 128 and 4,096. Unit: px.

      • If you enable Adaptive Resolution, the width of the output video is set to the length of the long side of the source video, and the height of the output video is set to the length of the short side of the source video.

    • When you configure audio parameters, take note of the following:

      • If you select Disable Audio, the audio parameters become unavailable.

      • For Codec, the default is AAC.

        Note
        • If the audio codec is MP3, a sample rate of 96000 is not supported.

        • If the container format of the transcoding template is mp3, you must select MP3 as the codec. Otherwise, the transcoding task fails.

  4. Click Save to create the standard transcoding template.

Step 4: Create a transcoding task

  1. In the left-side navigation pane, choose VOD Media Processing > Task Management to go to the Task Management page.

  2. On the Transcoding tab, click Create Transcoding Job.

  3. Configure the transcoding parameters as needed.

    • If you set File Source to Media Asset Management and the drop-down list is empty, you must first create a storage location. For more information, see Configure a storage location.

    • For Transcoding Template, you can use a preset template or a custom template.

      Note

      For more information about preset templates, see Preset templates. To create a custom template, see Transcoding.

    • Subtitle Burn-in: If no subtitle burn-in templates are available, create one first. For more information, see Transcoding.

    • Watermark: You can switch between Image Watermark and Text Watermark. If no watermark templates are available, create one first. For more information, see Transcoding.

    • Output Settings: You can set the output location to Original Storage Location or Custom.

      • Original Storage Location: The processed file is saved to the original storage location by default.

        Note

        If File Source is set to Object Storage Service (OSS), you cannot output the file to the original storage location.

      • Custom: You can configure parameters such as Output Location and Output Filename.

        Note

        If the Output Location drop-down list is empty, create a storage location first. For more information, see Configure a storage address.

  4. Click Save to create the transcoding task.

Step 5: View the transcoding task results

After you submit the task, you can view its execution status and configuration details on the Transcoding tab of the Task Management page. To receive timely progress and status updates, you can configure callback events. For more information, see Set up callback events.

Start a transcoding task by using API

You can also create a transcoding task by calling the SubmitMediaConvertJob operation.