How to Create a Multi-Audio Task User Manual

1. Overview

This user manual provides instructions on creating a multi-audio task using the provided API parameters. Multi-audio tasks allow you to include multiple audio tracks in your video output.

2. Prerequisites

Before proceeding, ensure you have the following:

  • Access to the API documentation.
  • Necessary permissions to create tasks.
  • Understanding of audio formats and configurations.

3. Operation Steps

3.1 Step One: Input Configuration

  • Provide the URL of the video file you want to process in the "input" field.
  • Specify the desired output path in the "output" field.
  • Assign a unique identifier to the storage location in the "storage_id" field.
  • Choose a template for video encoding in the "template_name" field.

3.2 Step Two: Audio Configuration

  • Define the input sources for audio tracks in the "extra_options" section.

3.2.1 Audio Selector Configuration

  • Configure audio selectors for each language track by specifying:
    • source_file: URL of the audio file.
    • source_type: Type of source (e.g., "track" or "file").
    • selector_name: Name of the audio selector.
    • codec: Audio codec (e.g., "aac").
    • bitrate: Bitrate of the audio track.
    • sample_rate: Sample rate of the audio track.
    • channels: Number of audio channels.
    • language_code: Language code of the audio track.
    • language_code_control: Language code control configuration.

3.3 Step Three: Output Groups

  • Define output groups to organize audio descriptions.

3.3.1 Audio Description Configuration

  • Specify audio descriptions for each language track within an output group, including:
    • selector_name: Name of the audio selector.
    • codec: Audio codec.
    • bitrate: Bitrate of the audio track.
    • sample_rate: Sample rate of the audio track.
    • channels: Number of audio channels.
    • group_id: Unique identifier for the audio group.
    • language_code: Language code of the audio track.
    • language_code_control: Language code control configuration.

4. Examples and Use Cases

Example 1: Creating a Multi-Audio Task with Three Audio Tracks

Scenario: You want to create a multi-audio task for a video with three audio tracks in English, Tamil, and Telugu languages.

API Parameters:

{
"input": "https://example.com/sample_video.mp4",
"output": "output/sample_output.m3u8",
"storage_id": "unique_storage_id",
"template_name": "h264_hls_1080p",
"extra_options": {
"inputs": {
"audio_selector": [
{
"source_type": "track",
"index": 1,
"selector_name": "original"
},
{
"source_file": "https://example.com/audio/tamil.wav",
"source_type": "file",
"selector_name": "tam"
},
{
"source_file": "https://example.com/audio/telugu.wav",
"source_type": "file",
"selector_name": "tel"
}
]
},
"output_groups": [
{
"outputs": {
"audio_description": [
{
"selector_name": "original",
"codec": "aac",
"bitrate": 64000,
"sample_rate": "44.1k",
"channels": 2,
"group_id": "original",
"language_code": "eng",
"language_code_control": "use_configured"
},
{
"selector_name": "tam",
"codec": "aac",
"bitrate": 64000,
"sample_rate": "44.1k",
"channels": 2,
"group_id": "tam",
"language_code": "tam",
"language_code_control": "use_configured"
},
{
"selector_name": "tel",
"codec": "aac",
"bitrate": 64000,
"sample_rate": "44.1k",
"channels": 2,
"group_id": "tel",
"language_code": "tel",
"language_code_control": "use_configured"
}
]
}
}
]
}
}

Explanation: In this example, the API request body specifies a video input, output path, storage ID, template name, and three audio tracks in English, Tamil, and Telugu languages.

Expected Outcome: The resulting task will generate a video with three audio tracks in English, Tamil, and Telugu languages, each encoded with the specified settings.

5. Frequently Asked Questions (FAQs)

Q: Can I include more than three audio tracks in a multi-audio task? A: Yes, you can add additional audio selectors as needed in the input configuration.

Q: How do I ensure the correct alignment between audio tracks and video? A: Make sure to specify the language code for each audio track, ensuring proper synchronization during playback.

Q: Is it possible to customize the bitrate and sample rate for audio tracks? A: Yes, you can adjust the bitrate and sample rate parameters according to your requirements in the audio description settings.

This user manual provides detailed steps for creating multi-audio tasks using the provided API parameters. Follow the outlined instructions to efficiently configure and generate tasks with multiple audio tracks.