Skip to content

UI: Add YouTube broadcast language selection combobox#13185

Open
cloud2519 wants to merge 1 commit intoobsproject:masterfrom
cloud2519:master
Open

UI: Add YouTube broadcast language selection combobox#13185
cloud2519 wants to merge 1 commit intoobsproject:masterfrom
cloud2519:master

Conversation

@cloud2519
Copy link

@cloud2519 cloud2519 commented Mar 3, 2026

Description

This PR introduces a feature to automatically transmit the broadcast language to the YouTube API when creating a broadcast via the YouTube account integration in OBS Studio.
Changes:

  • Added a checkSendLanguage checkbox in the YouTube broadcast creation dialog.
  • Implemented logic to extract the ISO 639-1 language code from the current OBS Studio UI locale using QLocale.
  • Updated the videos.update API call to include both snippet.defaultLanguage and snippet.defaultAudioLanguage.
  • Added persistent storage of the checkbox state in the OBS configuration.

Motivation and Context

When using the YouTube account integration to start a broadcast, OBS Studio currently does not send any language metadata. Consequently, YouTube defaults the broadcast language to English. This is problematic for non-English streamers because YouTube's automatic live captioning system often fails or defaults to English, requiring manual intervention for every stream. This PR ensures that accessibility features like auto-captions work correctly from the start.

How Has This Been Tested?

  • Added my own YouTube Data API v3 credentials (Client ID and Secret) to CMakePresets.json.
  • Built custom OBS locally.
  • Authenticated with a YouTube test account.
  • Verified that checking "Send OBS Language" correctly populates the language on the YouTube Studio dashboard upon stream creation.
  • OS: Windows 11

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@Fenrirthviti
Copy link
Member

Please properly fill out the PR template instead of replacing it.

@cloud2519
Copy link
Author

cloud2519 commented Mar 4, 2026

I have updated the PR description with the properly filled-out template and adjusted the PR title to follow the commit guidelines.
Also, I've fixed the clang-format CI issue, and all checks have now successfully passed!
Please let me know if there's anything else needed. Thanks!

@cloud2519 cloud2519 changed the title UI: Add option to automatically set YouTube broadcast language from OBS locale frontend: Auto-set YouTube broadcast language Mar 4, 2026
@Warchamp7
Copy link
Member

You can set the default language for your videos/livestreams on YouTube under the Upload defaults section of settings in YouTube Studio.

@Warchamp7 Warchamp7 closed this Mar 4, 2026
@cloud2519
Copy link
Author

cloud2519 commented Mar 5, 2026

You can set the default language for your videos/livestreams on YouTube under the Upload defaults section of settings in YouTube Studio.

Hi there,

Thank you for your feedback.

To clarify, the "Upload Defaults" menu in YouTube Studio settings only dictates the default language for manual uploads. The issue I am addressing specifically concerns the OBS YouTube Live Dashboard (via Google OAuth).

Currently, OBS supports two ways to start a stream:

Stream Key Method: The user manually sets the title, privacy, and language in the YouTube Live Control Room before copying the key to OBS. This works fine because the settings are handled on the YouTube side first.

Google OAuth Method: The user connects their account directly in OBS (File -> Settings -> Stream -> Connect Account). When clicking "Manage Broadcast," a popup appears to set the title, category, and latency.

The Problem:
When using the OAuth method, OBS's integration with the YouTube API does not currently send a language parameter. Because this value is missing in the API call, YouTube defaults the stream language to English, regardless of the user's actual location or account settings.

I have been dealing with this issue for years and have been in extensive communication with Google. I even provided them with a reproduction scenario, which you can see in this video:

https://www.youtube.com/watch?v=6eHL_Qul8zY

In the video, I demonstrate three test cases:

Case 1: Starting a stream via OAuth — Language defaults to English (Incorrect).

Case 2: Starting a stream via Stream Key — Language is correctly applied as set in the dashboard.

Case 3: Reverting to OAuth — Language defaults back to English (Incorrect).

Google’s official stance is that if I want to use external software (like OBS), that software must explicitly call the API with the desired parameters. They have declined to change the API's server-side default behavior, suggesting it is the responsibility of the client application.

The Solution:
Following Google’s recommendation, I have submitted a Pull Request that includes a simple source code modification to send the language parameter when initiating a stream via OBS. I am currently using a custom portable build with this fix, and it works perfectly.

This change would greatly benefit the global community by allowing users to stream in their native language seamlessly while using the convenience of Google OAuth.

I kindly ask you to review this PR once more. Thank you for your time and consideration.

Best regards,

@Kyoungsu-VIRNECT
Copy link

Hi @Warchamp7
I’m experiencing the same issue. This PR looks valid. I’d appreciate it if it could be reviewed again. Thank you.

@Warchamp7 Warchamp7 reopened this Mar 5, 2026
Copy link
Member

@Warchamp7 Warchamp7 left a comment

Choose a reason for hiding this comment

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

My mistake, I was looking at the liveBroadcast API which doesn't have any mention of language settings. I see now that this is something set via the videos API endpoints.

We should add this as a new comboBox underneath Category rather than a checkbox.
Use the i18nLanguages API to get a list of languages YouTube supports for the request.

The dropdown by default can be set to the language that OBS is set to, only if it exists in the list. Otherwise default to English.

@cloud2519
Copy link
Author

Hi @Warchamp7
I have pushed a new commit that replaces the checkbox with a combobox populated by the YouTube i18nLanguages API and falls back to the OBS locale as you suggested. Also, all Korean inline comments have been translated to English. Thanks.

@WizardCM
Copy link
Member

WizardCM commented Mar 6, 2026

Please squash the commits, use the correct commit prefix, and do not include merge commits.

- Replaced the boolean 'Send Language' checkbox with a dynamic 'Language' combobox populated via YouTube's i18nLanguages API.
- Automatically sets the default language based on the OBS interface locale (falling back to 'en' if unsupported).
- Fixed XML formatting artifacts and QFormLayout layout overlapping issues.
- Translated inline Korean comments to English per project guidelines.
@cloud2519 cloud2519 changed the title frontend: Auto-set YouTube broadcast language UI: Add YouTube broadcast language selection combobox Mar 6, 2026
@cloud2519
Copy link
Author

Please squash the commits, use the correct commit prefix, and do not include merge commits.

I have squashed the commits into a single commit and updated the prefix to UI: as requested. Thank you for the guidance.

@cloud2519 cloud2519 requested a review from Warchamp7 March 6, 2026 10:28
@WizardCM WizardCM added the New Feature New feature or plugin label Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Feature New feature or plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants