Skip to content

Make MWEB return the original audio track#7846

Merged
FreeTubeBot merged 1 commit intoFreeTubeApp:developmentfrom
absidue:mweb-original-audio
Aug 15, 2025
Merged

Make MWEB return the original audio track#7846
FreeTubeBot merged 1 commit intoFreeTubeApp:developmentfrom
absidue:mweb-original-audio

Conversation

@absidue
Copy link
Member

@absidue absidue commented Aug 14, 2025

Pull Request Type

  • Bugfix

Related issue

too many to link...

Description

YouTube's mobile website doesn't have an audio track selector so they try to be helpful and pick an audio track based on your display language. Which is a nice idea although in practice that means it frequently picks an AI-generated dubbing. As FreeTube has to parse many language specific strings to extract information such as published dates and view counts, it requests everything in American English (en-US), however as we only need the streaming data from the MWEB request we are not limited to just English.

This pull request finds the original audio track in the WEB response (we can't currently use it for playback because of SABR) and uses its language as the request language for the MWEB /player request, which makes it a lot more likely that YouTube will pick the original audio track as the audio track to include in the response.

Testing

Example taken from the FreeTube General Matrix chat: https://youtu.be/j8aDCBODy3A

Desktop

  • OS: Windows
  • OS Version: 10

@FreeTubeApp FreeTubeApp locked and limited conversation to collaborators Aug 14, 2025
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Aug 14, 2025
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) August 14, 2025 17:25
@FreeTubeBot FreeTubeBot merged commit ece0cd9 into FreeTubeApp:development Aug 15, 2025
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Aug 15, 2025
@absidue absidue deleted the mweb-original-audio branch August 15, 2025 05:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants