Skip to content

Conversation

@nsprenkle
Copy link
Contributor

Description

Some HLS video sources, when performing a level switch from default starting bitrate to a different bitrate encounter an error which causes garbled audio.

Defining a default audio codec seems to reduce this occurrence. See the docs which note that omitting a default value can cause issues.

NOTE that the real fix is probably to update our now five years out-of-date HLS library version but that is a whole other conversation for a different day and can probably just be deferred to extraction of the video block.

Testing instructions

  1. Load a known broken video. These are often from outside sources like private YouTube videos or CloudFront hosted files.
  2. Before fix, at the 10 second mark the video should perform a level switch and cause broken audio.
  3. After fix, there should be no breakage to audio.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a default audio codec configuration for the HLS video player to prevent garbled audio issues that can occur during bitrate level switches. The change sets mp4a.40.5 (HE-AAC) as the default audio codec when not explicitly provided in the configuration.

  • Sets a default audio codec (mp4a.40.5) for HLS playback to reduce audio corruption during level switches
  • Implements the fix as a temporary measure while acknowledging that updating the outdated HLS.js library (v0.14.17) would be the proper long-term solution

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

This seems to reduce instances of audio garbling when
switching levels during HLS video streaming.
@nsprenkle nsprenkle force-pushed the nsprenkle/video-default-audio-codec branch from 1b791fd to 5030e78 Compare October 29, 2025 17:19
@nsprenkle nsprenkle merged commit 6b0af90 into master Oct 29, 2025
53 checks passed
@nsprenkle nsprenkle deleted the nsprenkle/video-default-audio-codec branch October 29, 2025 19:24
nsprenkle added a commit to edx/edx-platform that referenced this pull request Oct 29, 2025
This seems to reduce instances of audio garbling when switching levels during HLS video streaming.
nsprenkle added a commit to edx/edx-platform that referenced this pull request Oct 30, 2025
haftamuk pushed a commit to haftamuk/edx-platform that referenced this pull request Nov 3, 2025
This seems to reduce instances of audio garbling when switching levels during HLS video streaming.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants