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.
Before proceeding, ensure you have the following:
"input"
field."output"
field."storage_id"
field."template_name"
field."extra_options"
section.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.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.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.
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.