Skip to content

Support for auto-translated YouTube closed-captions #8023

@trizen

Description

@trizen

Checklist

  • I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I'm aware that this is a request for NewPipe itself and that requests for adding a new service need to be made at NewPipeExtractor.
  • I have taken the time to fill in all the required details. I understand that the feature request will be dismissed otherwise.
  • This issue contains only one feature request.
  • I have read and understood the contribution guidelines.

Feature description

Support for auto-translated YouTube closed-captions.

This can be achieved by adding the tlang=LANG URI parameter to the provided closed-captions URLs (including the auto-generated ones), where LANG is the language code in which we want to translate the closed-caption into.

The list of accepted language codes, is:

      af am ar az be bg bn bs ca ceb co cs cy da de el en eo es et eu fa fi fil
      fr fy ga gd gl gu ha haw hi hmn hr ht hu hy id ig is it iw ja jv ka kk km
      kn ko ku ky la lb lo lt lv mg mi mk ml mn mr ms mt my ne nl no ny or pa pl
      ps pt ro ru rw sd si sk sl sm sn so sq sr st su sv sw ta te tg th tk tr tt
      ug uk ur uz vi xh yi yo zh-Hans zh-Hant zu

Example (auto-generated closed-caption in English):

https://www.youtube.com/api/timedtext?v=HiMaSrXaFz0&asr_langs=de,en,es,fr,id,it,ja,ko,nl,pt,ru,tr,vi&caps=asr&exp=xctw&xoaf=5&hl=en&ip=0.0.0.0&ipbits=0&expire=1647400208&sparams=ip,ipbits,expire,v,asr_langs,caps,exp,xoaf&signature=1D31C0E268469B8454678AE346B6AE2B040B02EB.7924D7A5830FB2DDFB22F1CE281AB155BD82ACEA&key=yt8&kind=asr&lang=en&fmt=srv1

Closed-caption auto-translated into Romanian:

https://www.youtube.com/api/timedtext?v=HiMaSrXaFz0&asr_langs=de,en,es,fr,id,it,ja,ko,nl,pt,ru,tr,vi&caps=asr&exp=xctw&xoaf=5&hl=en&ip=0.0.0.0&ipbits=0&expire=1647400208&sparams=ip,ipbits,expire,v,asr_langs,caps,exp,xoaf&signature=1D31C0E268469B8454678AE346B6AE2B040B02EB.7924D7A5830FB2DDFB22F1CE281AB155BD82ACEA&key=yt8&kind=asr&lang=en&fmt=srv1&tlang=ro

This feature can be added as a settings option, where the user inserts the language code that he wants the closed-captions to be translated into, and the closed-caption menu would display an option for selecting the auto-translated caption(s) with the language-code(s) provided by the user.

Why do you want this feature?

This feature is useful for people that do not understand the English language. As most YouTube videos have auto-generated captions, providing auto-translated captions allows people that do not understand the language spoken into the video to be able to understand (to some extent) what is being said in the video.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssue is related to a feature in the appplayerIssues related to any player (main, popup and background)requires extractor changeThis issue requires a change to the extractoryoutubeService, https://www.youtube.com/

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions