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
132.35k stars 10.04k forks source link

Feature: Support merging subtitle-s + formats into supported container #21344

Open ghost opened 5 years ago

ghost commented 5 years ago

Checklist

Description

There could be an additional subtitle option/command to pack the subtitles into the final file such as a .mkv, I'm pretty much exclusively downloading DASH/OPUS and merging into MKVs already unless unavailable, it should properly support such downloads which already use merging so that it doesn't merge twice and avoids conflicts. Now it can be a proper subtitle-type command, or it could be a merge type option, like "add this type of subs/formats when doing merging", combined with for example a separate command of forced merging described in #21343 it would then be possible do it for everything, not just those downloads that need to be remuxed.

This kind of approach would make it more flexible and less conflict-prone combining stuff and making sure ffmpeg is feeded proper merging config, should be easier to implement in that regard too, IMO, unless you guys think it's not a big deal. It's less convenient and less obvious that such a possibility exists, so the whole thing is less new-user friendly, if that's a concern, if not then ofcourse no big deal.

--

Also not only multiple subtitle languages, but multiple subtitle FORMATS of the SAME language should be supported for merging as well. They do not appear the same and have a lot of differences and not all players support all formats equally. For example in VLC, a particular TTML english youtube subtitle has a non-transparent black-background which makes subtitles easier to see under, however that blocks the video, but the same english language in VTT format has all-transparent background which revelas more video, but the subtitles may be harder to discern when video in the background is of similar color. Editing the subtitles for hundreds/thousands of files would be tedious, etc., it should be easier to just download/merge both formats.

ghost commented 5 years ago

Unfortunately I've only now noticed the --embed-subs command, sorry about that. However this probably only works currently on the single subtitle format of the same language that is being downloaded, so I don't have practical use of that command right now because I will need to manually embedd one of the sub formats anyway, youtube-dl is probably not going to detect the other already donwloaded format sitting on the local filesystem and embedd that one too is it?

There could be an additional suboption to keep the sub files even after merging, just like with A/V, makes sense, for quick quoting without having to extract from MKV, some odd cases.