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

Incorrect audio language on some videos #3439

Open
1 task done
jim3692 opened this issue Mar 4, 2024 · 1 comment
Open
1 task done

Incorrect audio language on some videos #3439

jim3692 opened this issue Mar 4, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jim3692
Copy link
Contributor

jim3692 commented Mar 4, 2024

Official Instance

Describe the bug

It looks like that in some videos there is (mistakenly?) a second English audio track. In the case of the video in the reproduction steps, one has the following info in its API response (filtered output):

{
  "audioTrackId": "en-US.4",
  "audioTrackName": "English (United States) original",
  "audioTrackType": "ORIGINAL"
}

and the other English track has this info:

{
  "audioTrackId": "en.3",
  "audioTrackName": "English",
  "audioTrackType": "DUBBED"
}

Trying in official YouTube, it seems that the non-original English audio track is indeed not English. However, in Piped only one of those tracks appear in the list. After some digging, I found this part of the code, which should prioritize the original, over the dubbed track and/or not use substr(0, 2) as it results to "en" for both tracks:

const adapSet = {
_id: mimeAudioObj.audioTrackId,
_lang: mimeAudioObj.audioTrackId?.substr(0, 2),
_mimeType: mimeAudioObj.mimeType,
_startWithSAP: "1",
_subsegmentAlignment: "true",
Representation: [],
};

To Reproduce

  1. Go to https://piped.video/watch?v=iWWWyG5ZwG8
  2. Select the English language
  3. It's not English

Expected behavior

It should be English

Logs/Errors

No response

Browser, and OS with Version.

Firefox 122.0.1 on Debian 12

Additional context

No response

@jim3692 jim3692 added the bug Something isn't working label Mar 4, 2024
@arisuv
Copy link
Contributor

arisuv commented May 17, 2024

substr(0, 2) should prevent duplication of audio not prioritize the original audio, as I understood.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants