How to modify default manifests?

The Bitmovin encoding API essentially offers to create the manifests in two different way :

This option offers a great deal of flexibility, however, it essentially requires to add each rendition and tracks (audio, subtitles etc.) manually, which multiplies the amount of API calls.

Using the default Manifest API
This option allows the manifest creation from a very limited set of calls to the API. The default Manifest generator essentially parses the different tracks from the encoding job and adds them to the manifest.

To have more flexibility with this option, you could possibly delete or add tracks from the default manifest. It can be helpful in order to make minor changes such as the language of your audio tracks.

In order for this process to work, you have to create (not start) the manifest before starting the encoding job, wait for the encoding job to be completed, modify the manifest as needed and finally start the manifest creation.

Example : change the name and language of the audio tracks.

The below example can be ran by the Bitmovin Java SDK.
You can use one of our code examples as a basis to get started and then use the instructions shared in this post to modify the manifest.

1/ Create the manifest

        HlsManifestDefault hlsManifestDefault  = new HlsManifestDefault();
        EncodingOutput encodingOutput = new EncodingOutput();
        hlsManifestDefault = bitmovinApi.encoding.manifests.hls.defaultapi.create(hlsManifestDefault);

2/ Start the encoding job and wait for it to be finished


3/ Modify the Default manifest
From there, you can add or delete tracks. In the following example, 2 audio tracks have been created, however, the manifest generator cannot “guess” which language the tracks are supposed to be and will therefore use “en” as default.

In order to change the audio tracks language, let’s store the 2 existing ones (MediaInfo) into variables, delete them from the Manifest on the bitmovin API, change the name of the tracks and then add them again to the manifest.

        AudioMediaInfo audioMediaInfo =;
        AudioMediaInfo audioMediaInfo2 =;,;,;

        audioMediaInfo2.setName("de");, audioMediaInfo);, audioMediaInfo2);

4/ Once this is done, the very last step is to start the manifest generation and monitor it

        SoftAssertions softAssertions = new SoftAssertions();
        waitForHlsManifestToFinish(hlsManifestDefault.getId(), softAssertions);

Feel free to share your experience or ask questions here.

1 Like