Skip to content

feat: Add default audio selector - #9642

Open
burikoni wants to merge 1 commit into
FreeTubeApp:developmentfrom
burikoni:default-audio-language
Open

burikoni wants to merge 1 commit into
FreeTubeApp:developmentfrom
burikoni:default-audio-language

Conversation

@burikoni

@burikoni burikoni commented Aug 13, 2026

Copy link
Copy Markdown

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

open #4291

Description

Add an option to set the default audio language

Screenshots

2026-08-12-233205_1407x651_scrot

Testing

Select a language and open a video with multiple audio tracks. For example, one of MrBeast’s recent videos.

It was also tested with the Invidious API using a locally hosted server, since the online instances either don’t expose the API or are offline.

Desktop

  • OS: GNU/Linux
  • OS Version: Linux debian 6.12.95+deb13-amd64
  • FreeTube version: v0.25.2 Beta

Additional context

The list of languages and their codes was obtained using the YouTube API through the i18nLanguages.list endpoint, and the values zh-Hans for Simplified Chinese and zh-Hant for Traditional Chinese were added, as indicated in the relevanceLanguage section of search.list.

@FreeTubeBot
FreeTubeBot enabled auto-merge (squash) August 13, 2026 02:46
@github-actions github-actions Bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Aug 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@absidue absidue left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The biggest issue with this pull request is that most people will want to keep using the original audio track on most videos and this pull request overrides it to something else every time. So this would be a breaking change that most people wouldn't want.

@absidue absidue added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Sep 14, 2026
@efb4f5ff-1298-471a-8973-3d47447115dc

Copy link
Copy Markdown
Member

Im not sure if the following is a good idea at all but I would personally be more comfortable with following youtube's flow

That would essentially mean the following:
User that watches a video for the first time and hears original audio track -> user changes audio track to e.g. Spanish -> next video, it checks if Spanish audio track is available, if yes then use it, if no use original.

Not sure if this is a good idea either but in addition to that we could store last used one track when you close FreeTube. So when you come back to it, it will try to find Spanish first and then switch to original if it cant find it. When close FreeTube it will store original because thats the last one used

@burikoni

Copy link
Copy Markdown
Author

hi @absidue I understand what you're saying. It's more a matter of preference; for people who aren't fluent in the original language, the alternative audio is preferable.
Ultimately, it's more about convenience, so you don't have to select the language for each video.

@efb4f5ff-1298-471a-8973-3d47447115dc On YouTube, it depends on the account preference; if you have the language set to Spanish, all videos will default to that language (if the track is available).

@absidue

absidue commented Sep 15, 2026

Copy link
Copy Markdown
Member

While it is a matter of preference, the way that the setting is currently implemented is a breaking change that goes against what most FreeTube users probably want, as this pull request always selects a language, it does not provide an option to disable it/use the actual original audio track, which means it is actually an inconvenience for most users as they'll have to manually select the original audio track on every video.
So in its current state this pull request is definitely not mergeable, if it were improved maybe we could consider it.

@burikoni

Copy link
Copy Markdown
Author

While it is a matter of preference, the way that the setting is currently implemented is a breaking change that goes against what most FreeTube users probably want, as this pull request always selects a language, it does not provide an option to disable it/use the actual original audio track, which means it is actually an inconvenience for most users as they'll have to manually select the original audio track on every video. So in its current state this pull request is definitely not mergeable, if it were improved maybe we could consider it.

Thanks for clarifying; I understand the issue you're describing now. Could a "prefer original audio" checkbox be checked by default, such that unchecking it enables the combo box for selecting the alternative audio? That way, it wouldn't break during updates.

@absidue

absidue commented Sep 15, 2026

Copy link
Copy Markdown
Member

The dropdown should contain an entry to use the original audio track (explicitly track not language, as videos can also have audio descriptions in the original language which are not the original audio track), which should be the default value for that setting.

@absidue

absidue commented Sep 15, 2026

Copy link
Copy Markdown
Member

Also reminds me that you should implement the audio track selection yourself instead of relying on shaka-player's preferred languages setting as you also need to ensure that you don't select an audio description or secondary audio track with this new setting and ideally this setting should only pick a different language if it was uploaded by the person that uploaded the video and avoid the AI/machine learning dubs created by YouTube.

@burikoni

Copy link
Copy Markdown
Author

The dropdown should contain an entry to use the original audio track (explicitly track not language, as videos can also have audio descriptions in the original language which are not the original audio track), which should be the default value for that setting.

Why add "original audio" to the dropdown? It would make sense if that option were set as the default instead of using the checkbox.

Also reminds me that you should implement the audio track selection yourself instead of relying on shaka-player's preferred languages setting as you also need to ensure that you don't select an audio description or secondary audio track with this new setting and ideally this setting should only pick a different language if it was uploaded by the person that uploaded the video and avoid the AI/machine learning dubs created by YouTube.

It is established that if the preferred audio isn't available, the original track is used—ignoring "Stable Volume" or "Voice Boost" variants; this would also apply to the descriptive audio track.

I don't understand the need to distinguish between user-uploaded dubbing and AI-generated dubbing. It could be a preference setting to avoid loading AI dubbing, but generally speaking, I don't see why they need to be separated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants