7

When I download a video with youtube-dl and the --all-subs, --write-sub, --write-auto-sub options, I get a mixture of prewritten subtitles and autogenerated ones.

For example, this video: https://www.youtube.com/watch?v=kHYZDveT46c has prewritten English subtitles and autogenerated ones. When using the aforementioned switches, I only end up with the prewritten ones. I want the autogenerated ones too. Is there any way for me to do that?

2 Answers 2

2

The other answer is wrong and actually misleads and wastes people's time with this "latest version" thing which is an issue on his end and has nothing to do with the question...

The actual answer is that youtube-dl names its subtitle files only with the language in it (ex: file.en.vtt), which means that a potential auto-en would be named the same way as en, hence the resulting rule that real subtitles will always be prioritized over auto subtitles if both are asked for in the command. This is something that needs to be asked of the devs if we want to be able to do it with youtube-dl alone.

Source :

https://github.com/ytdl-org/youtube-dl/issues/1412

Done, but currently --write-sub --write-auto-sub --all-sub would download en, fr, auto-es. Downloading both en and auto-en would require creating a new field in info dicts for automatic captions.

1

I had same problem with your video. When I used the --write-auto-sub switch (which writes automatically generated subtitle file) I ended up with this:

[youtube] kHYZDveT46c: Looking for automatic captions
WARNING: Couldn't find automatic captions for kHYZDveT46c

Then I update youtube-dl to the latest version and problem solved!

sudo pip install -U youtube-dl

so make sure you are using the latest version.

[Edited]

As discussed here before, manually created subtitles are preferred over automatic captions, because the automatic captions come from translating manual subtitles or from translating audio/speech recognition of the audio sources.

so for example, if the available subtitles are en, fr, automatic-caption-en, automatic-caption-es:

--write-sub --sub-lang en: Download en
--write-sub --write-auto-sub --sub-lang en: Download en
--write-sub --all-sub: Download en, fr
--write-sub --write-auto-sub --all-sub: Download en, fr, automatic-caption-es
4
  • i already am using the newest, which is 20180403 Commented Apr 9, 2018 at 16:34
  • and i can download both automatic captions and prewritten ones just fine, its just that i want to keep both versions (i.e. prewritten english and autogenerated english). it always seems to only give me the prewritten ones over the automatic ones if there available Commented Apr 9, 2018 at 16:37
  • i am aware that manual ones are preferred over automatic ones. i would assume most people would want that too. but for me id like everything. is there any possible way for me to do this? Commented Apr 9, 2018 at 18:41
  • I'm afraid there is no way to do this. And please consider that automatic captions, especially when the manual subtitles are already existed, come from translating them, so they are literally the same. Commented Apr 9, 2018 at 18:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .