youtube-dl icon indicating copy to clipboard operation
youtube-dl copied to clipboard

Using both "--write-auto-sub" and "--write-sub" results in file overwritting

Open ricardofunke opened this issue 3 years ago • 2 comments

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:

  1. automatic differentiate the name like adding "cap" or "sub" when using "--write-auto-sub" and "--write-sub" params
  2. Or at least add specific OUTPUT TEMPLATE for subtitles to the -o parameter

ricardofunke avatar Jun 22 '21 22:06 ricardofunke

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.

jblaufuss avatar Jun 23 '21 16:06 jblaufuss

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

joshuakawalya766 avatar Dec 08 '22 06:12 joshuakawalya766