Open gogo9th opened 2 years ago
The routine that extracts the media links from the m3u8 manifest URL ignores the subtitles. A newer version in yt-dlp is able to extract subtitles as well, but the extractor for EllenTube doesn't use it (identical code in both versions).
Thanks for your comment. Does that mean currently it is not possible to extract subtitles for EllenTube?
Not automatically.
You may be able to extract the manifest_url
(eg, https://videos.ellentube.com/8705aef2-7f80-4dad-8915-96e635dedbc5/h264/playlist.m3u8) from the -j
output (with yt-dlp, --print manifest_url
-- soon yt-dl too) and manually parse the m3u8 manifest, like this:
#EXTM3U
#EXT-X-VERSION:3\n#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-STREAM-INF:BANDWIDTH=8105626,AVERAGE-BANDWIDTH=6476224,CODECS="avc1.640028,mp4a.40.2",RESOLUTION=1920x1080,FRAME-RATE=29.970,SUBTITLES="subs"
playlist_1920x1080_7436kbps.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2325296,AVERAGE-BANDWIDTH=1552496,CODECS="avc1.64001f,mp4a.40.2",RESOLUTION=1280x720,FRAME-RATE=29.970,SUBTITLES="subs"
playlist_1280x720_3436kbps.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1411438,AVERAGE-BANDWIDTH=916313,CODECS="avc1.4d401f,mp4a.40.2",RESOLUTION=1280x720,FRAME-RATE=29.970,SUBTITLES="subs"
playlist_1280x720_2036kbps.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1019427,AVERAGE-BANDWIDTH=517051,CODECS="avc1.66.30,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,SUBTITLES="subs"
playlist_640x360_1116kbps.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=949131,AVERAGE-BANDWIDTH=513904,CODECS="avc1.66.30,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,SUBTITLES="subs"
playlist_640x360_836kbps.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=740480,AVERAGE-BANDWIDTH=498569,CODECS="avc1.66.30,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,SUBTITLES="subs"
playlist_640x360_536kbps.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=500833,AVERAGE-BANDWIDTH=330310,CODECS="avc1.42c015,mp4a.40.2",RESOLUTION=426x240,FRAME-RATE=29.970,SUBTITLES="subs"
playlist_426x240_336kbps.m3u8
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English",DEFAULT=YES,AUTOSELECT=YES,FORCED=NO,LANGUAGE="eng",URI="playlist_webvtt.m3u8
So your subs URL (combine the URL of the manifest with the URI from the last line), which you can open in your browser or download with curl or wget, would be https://videos.ellentube.com/8705aef2-7f80-4dad-8915-96e635dedbc5/h264/playlist_webvtt.m3u8:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:301
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:301,
/8705aef2-7f80-4dad-8915-96e635dedbc5/closedcaption_hls.vtt
#EXT-X-ENDLIST
Then the actual subs https://videos.ellentube.com/8705aef2-7f80-4dad-8915-96e635dedbc5/closedcaption_hls.vtt:
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:183240
00:00:00.000 --> 00:00:01.860 align:middle line:84%
Man, thank you so much
for being here, man.
00:00:01.860 --> 00:00:02.735 align:middle line:90%
It's good to see you.
00:00:02.735 --> 00:00:03.625 align:middle line:90%
It's good to be here.
00:00:03.625 --> 00:00:04.500 align:middle line:90%
It's good to be here.
00:00:04.500 --> 00:00:05.000 align:middle line:90%
Yeah.
...
Wow, this is deep stuff; I can't wait for the rest.
Wow, this is great, thanks very much!
BTW, where can I find yt-dlp or youtube-dlp? Could not directly find it from your Github repo other than bin/youtube-dl
...
Did you actually mean yt-dlp.sh
in https://github.com/yt-dlp/yt-dlp?
Checklist
Question
I am trying to download subtitles for video clips in https://www.ellentube.com/, but couldn't. For example, I ran the following command:
$ youtube-dl --list-subs [%url%](https://www.ellentube.com/video/tyler-james-williams-hopes-to-validate-black-male-experience-with-abbott-elementary-role.html)
However, it prints the following:
17721270-f453-4a2b-b1e2-18a9ee41fc72 has no subtitles
Do you know why the subtitles are not detected?