38
17
How do I download videos from YouTube with subtitles / captions?
I'd tried by using youtube-dl, with --write-srt --str-lang
flags but I always get:
WARNING: video has no closed captions
.
38
17
How do I download videos from YouTube with subtitles / captions?
I'd tried by using youtube-dl, with --write-srt --str-lang
flags but I always get:
WARNING: video has no closed captions
.
55
Make sure the video you're trying to download has actual subtitles uploaded from the owner.
You can then use, for example:
youtube-dl --write-srt --sub-lang en 'http://www.youtube.com/watch?v=RHy9_RQbrnQ'
There is also an option to download the automatically generated subtitle files, using --write-auto-sub
.
See the youtube-dl
documentation.
2@Jack: youtube-dl has since added an option "--write-auto-sub" (at least in version 2014.09.22.1). I didn't try it, but that may be what you were looking for. – Tim Landscheidt – 2014-11-11T01:11:06.857
This doesn't work as of August 2015, please fix. – George Chalhoub – 2015-08-02T08:17:18.710
1This worked for me just now with youtube-dl version 2015.08.16.1. – Jeff Allen – 2015-11-02T06:03:07.950
2Is there no way to download the one translated by youtube? – Jack – 2013-10-27T21:11:58.543
Not that I'm aware of, no. There appear to be some programs for downloading subtitles (like Google2SRT mentioned in the other answers), but those are all for the "real" closed captions. – slhck – 2013-10-27T22:01:08.900
9
If you want a free, easy-to-use program with a simple GUI, there's Google 2 SRT.
It detects all the available languages and converts to SRT, SSA or SUB.
It doesn't convert properly check with this video https://www.youtube.com/watch?v=XJGiS83eQLk
– csharpwinphonexaml – 2015-12-18T13:50:25.593
Quite interesting is to check subtitles with
--list-subs
. – pevik – 2016-02-20T12:54:47.5031if you're on a LTS distribution, ensure you use an uo-to-date version of youtube-dl, the TLS apt package on ubuntu:14.04 for example, does not work with generated closed captions, but that current pip release version does (
sudo pip install -U youtube-dl
) – ThorSummoner – 2016-04-24T06:43:44.317https://www.4kdownload.com/howto/howto-download-youtube-subtitles I have tested this method, it's work! – Saksith Jaksri – 2017-08-16T10:19:01.490
1
Well, does the video have closed captions? I cannot reproduce this issue for videos that have the
– slhck – 2012-10-07T20:31:51.673CC
sign available. Which video are you trying to download? Does it work with this one?Yes. Have the
– Jack – 2012-10-08T00:29:46.467CC
sign. For video that you have posted it worked fine. But for all that I had tried before it does not work, e.g for this video: http://www.youtube.com/watch?v=RHy9_RQbrnQ I get:WARNING: video has no closed captions
unlike as you can see into youtube page. `See exaclty what I have tried:
python youtube-dl --write-srt --srt-lang en http://www.youtube.com/watch?v=RHy9_RQbrnQ [youtube] Setting language [youtube] RHy9_RQbrnQ: Downloading video webpage [youtube] RHy9_RQbrnQ: Downloading video info webpage [youtube] RHy9_RQbrnQ: Extracting video information [youtube] RHy9_RQbrnQ: Downloading video subtitles WARNING: video has no closed captions
– Jack – 2012-10-08T00:31:51.287