Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ABR logic in video and audio #4492

Open
MardenSSS opened this issue May 29, 2024 · 1 comment
Open

ABR logic in video and audio #4492

MardenSSS opened this issue May 29, 2024 · 1 comment
Labels

Comments

@MardenSSS
Copy link

MardenSSS commented May 29, 2024

Hello,

I'm curious if the ABR logic also applies to audio (selecting the appropriate one among multiple audio bitrates) when playing a video source that contains both sound and images in dash.js, not just video. If so, I want to know if the ABR logic makes decisions and downloads for audio chunks and video chunks synchronously. In other words, will the ABR logic make bitrate decisions and send requests for the i-th audio chunk and the i-th video chunk at the same time? If the i-th audio chunk has been downloaded, but the i-th video chunk has not yet been downloaded, will ABR wait for the audio chunk to be downloaded before synchronously selecting the bitrate for the i+1-th video chunk and the _i+1-th_ audio chunk?

Any help would be much appreciated.

@dsilhavy
Copy link
Collaborator

dsilhavy commented May 31, 2024

  • Yes, the ABR logic is also applied for audio
  • There are two separate instances of the ScheduleController class, one for video and one for audio. The current logic kind of synchronizes them by aiming for an audio buffer that is equal to the video buffer. This is done by checking the current videoBufferLevel and comparing it to the audioBufferLevel. I am linking two functions below that might help to understand the logic:

As a consequence, the request for audio segment i+1 should not be done before the i-th video segment request completed (assuming they have a similar duration)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants