youtube-dl: [Youtube] Downloading of automated captions is not working (or at least very unpredictable)
Checklist
- I’m reporting a broken site support issue
- I’ve verified that I’m running youtube-dl version 2020.12.05
- I’ve checked that all provided URLs are alive and playable in a browser
- I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
- I’ve searched the bugtracker for similar bug reports including closed ones
- I’ve read bugs section in FAQ
Verbose log
$ youtube-dl -v --list-subs https://www.youtube.com/watch?v=48sCx-wBs34
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--list-subs', 'https://www.youtube.com/watch?v=48sCx-wBs34']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.12.05
[debug] Python version 3.7.1 (CPython) - Darwin-20.1.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.3.1, ffprobe 4.3.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] 48sCx-wBs34: Downloading webpage
[youtube] 48sCx-wBs34: Looking for automatic captions
WARNING: Couldn't find automatic captions for 48sCx-wBs34
48sCx-wBs34 has no automatic captions
Available subtitles for 48sCx-wBs34:
Language formats
zh vtt, ttml, srv3, srv2, srv1
en-US vtt, ttml, srv3, srv2, srv1
$ youtube-dl -v --list-subs https://www.youtube.com/watch?v=48sCx-wBs34
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--list-subs', 'https://www.youtube.com/watch?v=48sCx-wBs34']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.12.05
[debug] Python version 3.7.1 (CPython) - Darwin-20.1.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.3.1, ffprobe 4.3.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] 48sCx-wBs34: Downloading webpage
[youtube] 48sCx-wBs34: Looking for automatic captions
Available automatic captions for 48sCx-wBs34:
Language formats
af vtt, ttml, srv3, srv2, srv1
sq vtt, ttml, srv3, srv2, srv1
am vtt, ttml, srv3, srv2, srv1
ar vtt, ttml, srv3, srv2, srv1
hy vtt, ttml, srv3, srv2, srv1
...
yo vtt, ttml, srv3, srv2, srv1
zu vtt, ttml, srv3, srv2, srv1
Available subtitles for 48sCx-wBs34:
Language formats
zh vtt, ttml, srv3, srv2, srv1
en-US vtt, ttml, srv3, srv2, srv1
Description
Hi, I think there is a bug in the way that youtube-dl retrieves if a youtube video has auto captions because if you run --list-subs
on any video with automatic captions, the output is inconsistent. This is also probably related to atleast #27306 and #27292.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 20
The problem is that the structure of
ytplayer.config
has changed, and it can no longer be explicitly obtained from the webpage. So the function_get_ytplayer_config
used for getting automatic captions is no longer valid.My code fetches automatic captions from another object
ytInitialPlayerResponse
. However, I don’t know how to fix the function_get_ytplayer_config
which is still being called elsewhere. So I don’t want to open a PR to submit this incomplete code.For the record, I ran “youtube-dl --list-subs https://www.youtube.com/watch?v=pwcZF12yx4M” 50 times in a loop. youtube-dl reported 42 times that the video had no subs. The other 8 times, it reported that automatic captions were available.
I have been facing the same problem for the past few days. I сan’t download automatically generated subtitles using --wirte-auto-sub option, although in fact they are present. (youtube-dl version 2020.12.07 and earlier). But it seems like the issue isn’t reproducing regularly. Sometimes I can download subtitles, sometimes I can’t. And in some cases, even if it is the same video.