This article describes Kaltura's capabilities for multiple audio track playback.
Audio flavors should be created for the partner prior to ingesting multiple audio tracks. An audio flavor needs to be configured per audio track. The transcoding process will create an audio flavor per audio track for each entry ingested. Configuring your account to enable multi audio tracks requires PS setup; please contact your CSM for assistance.
- Kaltura currently ingests a single file of format MP4 that includes multiple audio tracks and that has langauge notation on every audio track.
- The solution automatically handles sources that comply with ffmpeg definitions, which means that if the channels in the source surround audio stream have the notations that are described there, then the ingestion logic will be able to do the right mixing (into stereo) automatically.
- The Kaltura ingest XML now specifies a section to explicitlly define audio tracks for situations where the tracks cannot be properly defined as above. This section is under the <streams> element and the following parameters that can be set on a per entry level:
|Attribute Name||Description||Mandatory||Sample Value|
|type||stream type||Y||"audio" (other values set for future use)|
|trackIndex||the track index in the original ingest file. Used to indicate the audio track location in the original ingest file||Y||1 (integer)|
|language||2 letter ISO code (ISO 639) specifying the language of the relative audio track. If not present, ffmpeg audio tagging will be assumed (see above)||N||sp (Spanish)|
|channelIndex||the channel index of the original content For instance, if the language is in audio stream track 2, channel 1 (2.1), the trackIndex will be set to 2 and the channel index to 1||N||1 (integer)|
|label||Label specifying the label to use when delivering to player devices. This will be the label used in the player UI of the multi audio selection button||N||Spanish|
|channelLayout||Specifying the output layout of the audio track.||N||Possible Values :
- Audio flavors are tagged with audio only; currently there is no way to retrieve the language via API (unless a tag is configured for it in the flavor params).
- Setting a default language track for playback on the asset level: There is currently no way to specify on ingest /in the asset entry record a default language track among multiple language tracks. A default language track designation must be specified in a custom metadata field, and then custom player logic must coded to use this metadata field to select a default track
XML File Notation
If a video file cannot be amended to change its track notation to the compatible language codes, the track languages can still be identified to the Kaltura Video Platform through the Kaltura bulk ingest XML. The following XML example shows "streams" rows added to the bulk ingest XML for the sample file Hero EP 1. With this notation the language tracks will be identified and matched to the respective language transcode profiles.
- The above assets are transcoded to the regular Kaltura video flavors, with additional audio tracks being transcoded into custom flavors AAC/MP4 of bitrate 64 or 128 kbps.
- One audio file will be created per language.
- The language of the audio flavor is currently saved in the media info object
A manifest will be delivered via the playManifest API, including inband subtitles.
Enabling Multi Audio Tracks using the Audio Selector
To enable multiple audio tracks:
To configure the Audio Selector
- Select the Universal Studio tab and select the Plugins icon.
- Check the box next to Audio Selector.
- Click Save Player Settings.
Setting the Default Audio Language
There are two ways to set the default audio language in the Player:
- Through the KMC
- Using a flashvar
To set the default audio language using the KMC
- Select the Universal Studio tab and select the Audio selector dropdown.
- In the Default language code field, specify the code of the language to be used as the default.
- Click Save Player Settings.
To set the default audio language flashvar
- Add the defaultLang=<language code> (for example SP) flashvar.
The Kaltura Player will play inband multi audio tracks based on the underlying delivery format:The Player will have a button to select an audio track; upon selection, the Player will access the relevant stream per the play manifest. The multi audio track selection button is a plugin, made available in the Player Studio.
The Player will have a button to select an audio track; upon selection, the Player will access the relevant stream per the play manifest. The multi audio track selection button is a plug, which is made available in the Player Studio.