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

youtube language selection for video title/description #27738

Open
3 tasks done
theultramage opened this issue Jan 9, 2021 · 1 comment · May be fixed by #28538
Open
3 tasks done

youtube language selection for video title/description #27738

theultramage opened this issue Jan 9, 2021 · 1 comment · May be fixed by #28538

Comments

@theultramage
Copy link

Checklist

  • I'm reporting a site feature request
  • I've verified that I'm running youtube-dl version 2021.01.08
  • I've searched the bugtracker for similar site feature requests including closed ones

Description

Youtube allows adding translated video titles, descriptions and subtitles using Creator Studio -> Subtitles. These go on top of the video's default title and description in the language specified in the video details. Youtube will then display the video metadata in the appropriate language depending on the viewer's preferences. The translated titles and descriptions also get included into youtube search.

Youtube-dl currently does not seem to provide any means of accessing these translated versions. I have reviewed the listing of commandline options and tried a bunch of things. --sub-lang has no effect, --add-header Accept-Language:en and variants are ignored, --cookies from my current browser session don't influence it. I conclude that the language selection is probably javascript-driven. I have searched for prior discussions and tickets on this issue. I only found question #17131 which was asking the same thing, but was closed as 'incomplete' without giving attention to the issue itself.

I have prepared a testing video at https://www.youtube.com/watch?v=mO13t8aNzQI . Its default video title and description indicate japanese language, and it has english and czech translations. I can toggle between them freely on the youtube website, but youtube-dl only ever sees the default jp one.

My suggestion is to implement commandline knobs for title/description language selection, like the ones for subtitle language selection. In fact, maybe it would be cleaner to elevate the settings for subtitle language selection to a general language selection system. Multiple description files would be disambiguated the same way subtitles are now. There can only be one title for the download filename though. The info.json file would need to be written once for every language as well, or have its structure changed to accomodate translations.

[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v']
[debug] Encodings: locale cp1250, fs mbcs, out cp852, pref cp1250
[debug] youtube-dl version 2021.01.08
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: ffmpeg git-2020-06-28-4cfcfb3
[debug] Proxy map: {}```
@mjsir911 mjsir911 linked a pull request Mar 25, 2021 that will close this issue
10 tasks
mjsir911 added a commit to mjsir911/youtube-dl that referenced this issue Mar 25, 2021
mjsir911 added a commit to mjsir911/youtube-dl that referenced this issue Mar 26, 2021
mjsir911 added a commit to mjsir911/youtube-dl that referenced this issue Mar 27, 2021
@rzfzr
Copy link

rzfzr commented Mar 11, 2022

Why not have an object that contains all available titles, and another that contains all the descriptions? Such as is for subtitles:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants