Open lfer94 opened 2 years ago
This is currently not possible with yt-dlp directly. The only way you can do this right now is to download the infojson with --write-infojson
, remove the es-419
sub u dont want and then load it back with --load-info
This is currently not possible with yt-dlp directly. The only way you can do this right now is to download the infojson with
--write-infojson
, remove thees-419
sub u dont want and then load it back with--load-info
This is a nice suggestion, thanks.
I personally filter the json file with jq '.subtitles |= ([ path(.[][]) as $p | {"key": $p | join("_"), "value": [getpath($p)]} ] | from_entries)'
(or jq '.subtitles |= . as $s | reduce path(.[][]) as $p ({}; . + { ($p | join("_")): [ $s | getpath($p) ] })'
, it works equally).
This should modify a list of subtitles in a same language like this one:
Language Formats
en vtt, vtt, mp4
de vtt, vtt
to separate subtitle entries for each format, like this:
Language Formats
en_0 mp4
en_1 vtt
en_2 vtt
de_0 vtt
de_1 vtt
allowing them to be easily downloaded separately or all at once.
If you have to do this often, it can come in more handy than editing the file manually, at least until the feature gets implemented.
Checklist
Verbose log
Description
Hi. I have been trying to download a webtt subtitle from
H*O M*X
. When I run the command posted in verbose log, yt-dlp shows that there's two availables subtitles in spanish (complete and forced) but it only downloads one.ffmpeg also shows that every subtitle has their own ID, but it can't download any of them because of... you know.
I've used the following commands, but the result is always the same:
yt-dlp --skip-download --allow-unplayable-formats --write-subs --sub-langs es-419 --sub-format vtt "https://cmaf.lln.latam.hbomaxcdn.com/videos/GYPGKMQjoDkVLBQEAAAAo/1/1b5ad5/1_single_J8sExA_1080hi.mpd"
yt-dlp --skip-download --allow-unplayable-formats --write-subs --sub-langs all --sub-format vtt "https://cmaf.lln.latam.hbomaxcdn.com/videos/GYPGKMQjoDkVLBQEAAAAo/1/1b5ad5/1_single_J8sExA_1080hi.mpd"
I need to download the second one. Any suggestion?