This guide will walk you through the process of creating a multi-subtitles task using the provided API parameters. Multi-subtitles tasks allow you to include multiple subtitle 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.source_file
: URL of the subtitle file.source_type
: Type of source (e.g., "webvtt"
or "srt"
).selector_name
: Name of the caption selector.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.selector_name
: Name of the caption selector.language
: Language of the subtitle track.description
: Description of the subtitle track.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_file": "https://example.com/audio/english.wav","source_type": "file","selector_name": "eng","codec": "aac","bitrate": 64000,"sample_rate": "44.1k","channels": 2,"language_code": "eng"},{"source_file": "https://example.com/audio/tamil.wav","source_type": "file","selector_name": "tam","codec": "aac","bitrate": 64000,"sample_rate": "44.1k","channels": 2,"language_code": "tam"},{"source_file": "https://example.com/audio/telugu.wav","source_type": "file","selector_name": "tel","codec": "aac","bitrate": 64000,"sample_rate": "44.1k","channels": 2,"language_code": "tel"}],"caption_selector": [{"source_type": "webvtt","file_setting": {"source_file": "https://example.com/captions/english.srt"},"selector_name": "eng"},{"source_type": "webvtt","file_setting": {"source_file": "https://example.com/captions/tamil.vtt"},"selector_name": "tam"},{"source_type": "webvtt","file_setting": {"source_file": "https://example.com/captions/telugu.vtt"},"selector_name": "tel"}]},"output_groups": [{"outputs": {"audio_description": [{"selector_name": "eng","codec": "aac","bitrate": 64000,"sample_rate": "44.1k","channels": 2,"group_id": "english_group","language_code": "eng","language_code_control": "use_configured"},{"selector_name": "tam","codec": "aac","bitrate": 64000,"sample_rate": "44.1k","channels": 2,"group_id": "tamil_group","language_code": "tam","language_code_control": "use_configured"},{"selector_name": "tel","codec": "aac","bitrate": 64000,"sample_rate": "44.1k","channels": 2,"group_id": "telugu_group","language_code": "tel","language_code_control": "use_configured"}],"caption_description": [{"selector_name": "eng","language": "en","description": "English"},{"selector_name": "tam","language": "ta","description": "Tamil"},{"selector_name": "tel","language": "te","description": "Telugu"}]}}]}}
Q: Can I include more than three subtitle tracks in a multi-subtitles task? A: Yes, you can add additional audio and caption selectors as needed in the input configuration.
Q: How do I ensure the correct alignment between audio and subtitle tracks? A: Make sure
to specify the language code for each audio and caption 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 code examples for common use cases when creating multi-subtitles tasks using the provided API parameters. Follow the outlined examples to efficiently configure and generate tasks according to your requirements.