Firefox failing with certain audio channel layout switching

I have created an audio only DASH stream with the Bitmovin Encoding product. It contains 2 AAC tracks within 2 separate AdaptationSets

AAC config track 1 :

    AacAudioConfiguration aacAudioConfiguration0 = new AacAudioConfiguration();
    aacAudioConfiguration0.setBitrate(384000L);
    aacAudioConfiguration0.setChannelLayout(AacChannelLayout.CL_5_1_BACK);

AAC config track 2

    AacAudioConfiguration aacAudioConfiguration1 = new AacAudioConfiguration();
    aacAudioConfiguration1.setBitrate(384000L);
    aacAudioConfiguration1.setChannelLayout(AacChannelLayout.STEREO);

When initializing the player with the track 1, switching to the track 2 causes the player to keep playing for a few seconds and then freeze. When initializing the player on track 2, no issue switching audio tracks.

As a workaround, I’m forcing the player to initialize with the track 2 and then switch to the track 1 in a PLAYING event handler. In this case, no issue anymore with switching tracks back and forth.

        player.load(source).then(function() {
            console.log('Successfully loaded source'); // Success!
            player.setAudio(player.getAvailableAudio()[1].id)
            player.on("playing", function() {
                player.setAudio(player.getAvailableAudio()[0].id)
            })
        }, function() {
            console.log('Error while loading source'); // Error!
        });

Same behaviour with DASH.js
No issue with Chrome
Firefox version : 105.0.3 (64-bit) / macOS
Chrome version : 108.0.5359.124 (Official Build) (x86_64)

Happy to share the workaround and to hear knowledge on what could cause this behaviour

nice work @ludovic.michaud :smiley:

2 Likes

@ludovic.michaud Do you know if there is a fix for this behavior coming soon, or are we forever stuck using the work around?

@halesdk I didn’t hear anything about a fix. Are you confirming that you are still seeing the same issue ? This post is a year and a half old

Yes, we still see this issue in Firefox when switching from surround audio to stereo.