youtube-dl
youtube-dl copied to clipboard
Using both "--write-auto-sub" and "--write-sub" results in file overwritting
Checklist
- [x] I'm reporting a feature request
- [x] I've verified that I'm running youtube-dl version 2021.06.06
- [x] I've searched the bugtracker for similar feature requests including closed ones
Description
I want to download both the automatic caption and the subtitle when available, I tried with a video that has both, but if I use both parameters "--write-auto-sub" and "--write-sub" it will result in a single file. If I run one after the other, I can see that it overwrittes the file as they have the same name.
I checked the -o option but there's no subtitles specific format to differentiate the captions from the subtitles.
It would be nice if we have:
- automatic differentiate the name like adding "cap" or "sub" when using "--write-auto-sub" and "--write-sub" params
- Or at least add specific OUTPUT TEMPLATE for subtitles to the -o parameter
I've run into this exact same problem, which unfortunately led me to not try to capture the auto subs. It wasn't clear what I was getting when I used both, so I was forced to choose which to archive.
The command below gets auto captions when no subtiles are available
The
--skip-download
gets only the subtitles/captions but not the video
yt-dlp --write-auto-sub --write-sub --sub-lang en --convert-subs=srt --skip-download -o '%(channel)s/%(playlist_index)s-%(title)s' --batch-file=downloads.txt