Using Multi Audio Track Playback


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.

Ingestion

  • 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 NameDescriptionMandatorySample Value
typestream typeY"audio" (other values set for future use)
trackIndexthe track index in the original ingest file. Used to indicate the audio track location in the original ingest fileY1 (integer)
language2 letter ISO code (ISO 639) specifying the language of the relative audio track. If not present, ffmpeg audio tagging will be assumed (see above)Nsp (Spanish)
channelIndexthe 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 1N1 (integer)
labelLabel 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 buttonNSpanish
channelLayoutSpecifying the output layout of the audio track.NPossible Values :
  • front-left
  • front-right
  • center
  • rear-left
  • rear-right
  • surround-left (for 7.1)
  • surround-right (for 7.1)
  • 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.

<?xml version="1.0"?>

<mrss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ingestion.xsd">
    <channel>
        <item>
            <action>add</action>
            <type>1</type>
            <userId></userId>
            <name>Hero Ep 1</name>
            <description>Lorim ipsum</description>
            <media>
                <mediaType>1</mediaType>
            </media>
            <contentAssets>
                <content>
                    <dropFolderFileContentResource filePath="HERO_EP01_10MIN_TEST.mov"/>
                    <streams>
                        <stream type="audio" trackIndex="1" language="kor"/>
                        <stream type="audio" trackIndex="2" language="tha"/>
                    </streams>
                </content>
            </contentAssets>
        </item>
    </channel>
</mrss>

Transcode

  • 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

Delivery

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

  1. Select the Universal Studio tab and select the Plugins icon.
  2. Check the box next to Audio Selector.
  3. 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
  1. Select the Universal Studio tab and select the Audio selector dropdown.
  2. In the Default language code field, specify the code of the language to be used as the default.


  3. Click Save Player Settings.

To set the default audio language flashvar

  • Add the defaultLang=<language code> (for example SP) flashvar.
To specify an origin language, e.g., the default language track to play, the two-character language ISO 639-2/3 code should be inserted into the Media Asset Entry record's custom metadata field origin_language. The application layer will utilize this value to select the appropriate track to play when no other language track selection is otherwise specified.


Playout

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.

  • Dash
  • HLS
  • HSS

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.

Was this article helpful?
Thank you for your feedback!
In This Article
Related Articles
Back to top

Never miss a thing!

Subscribe to our customer newsletter and our release notes updates, so you always get the best out of Kaltura.
Newsletter