ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
129.94k stars 9.8k forks source link

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

Open ricardofunke opened 3 years ago

ricardofunke commented 3 years ago

Checklist

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

jblaufuss commented 3 years ago

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.

joshuakawalya766 commented 1 year ago

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