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

Subtitle support for CloudFlareStream and videodelivery.net

Open palight opened this issue 2 years ago • 2 comments

Checklist

  • [x] I'm reporting a site feature request
  • [x] I've verified that I'm running youtube-dl version 2021.12.17
  • [x] I've searched the bugtracker for similar site feature requests including closed ones

Description

Hello,

I've tried to download a video on videodelivery with options for subtitles but youtube-dl says that there isn't any subtitles associated with the video. youtube-dl --list-subs https://videodelivery.net/e9b513b0d66329997b0054d20356b02e/manifest/video.m3u8 [CloudflareStream] e9b513b0d66329997b0054d20356b02e: Downloading m3u8 information [CloudflareStream] e9b513b0d66329997b0054d20356b02e: Downloading MPD manifest e9b513b0d66329997b0054d20356b02e has no subtitles

The m3u8 file show that subtitles are possible (below). Please, can you add subtitle support for this provider ?

#EXTM3U #EXT-X-VERSION:6 #EXT-X-INDEPENDENT-SEGMENTS #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_audio",NAME="original",LANGUAGE="en-3f7079ec",DEFAULT=YES,AUTOSELECT=YES,URI="stream_t3f7079ec182d43ff6ba7e6710df4531a_r684792.m3u8" #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="group_subtitle",LANGUAGE="cs",NAME="čeština",DEFAULT=NO,FORCED=NO,URI="stream_tba3e9858d784df665c88d27b4e9f84ef_r95446248.m3u8" #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="group_subtitle",LANGUAGE="en",NAME="English",DEFAULT=NO,FORCED=NO,URI="stream_te634b76d15e4daa9f1df88fc86028587_r161166111.m3u8" #EXT-X-STREAM-INF:RESOLUTION=1280x720,CODECS="avc1.4d401f,mp4a.40.2",BANDWIDTH=3988960,FRAME-RATE=25.000,AUDIO="group_audio",SUBTITLES="group_subtitle" stream_t0cb40671b0d03b23da032945984bb931_r684790.m3u8 #EXT-X-STREAM-INF:RESOLUTION=1920x1080,CODECS="avc1.4d4028,mp4a.40.2",BANDWIDTH=5700960,FRAME-RATE=25.000,AUDIO="group_audio",SUBTITLES="group_subtitle" stream_t0cb40671b0d03b23da032945984bb931_r684791.m3u8 #EXT-X-STREAM-INF:RESOLUTION=854x480,CODECS="avc1.4d401e,mp4a.40.2",BANDWIDTH=2062960,FRAME-RATE=25.000,AUDIO="group_audio",SUBTITLES="group_subtitle" stream_t0cb40671b0d03b23da032945984bb931_r684789.m3u8 #EXT-X-STREAM-INF:RESOLUTION=640x360,CODECS="avc1.4d401e,mp4a.40.2",BANDWIDTH=992960,FRAME-RATE=25.000,AUDIO="group_audio",SUBTITLES="group_subtitle" stream_t0cb40671b0d03b23da032945984bb931_r684788.m3u8 #EXT-X-STREAM-INF:RESOLUTION=426x240,CODECS="avc1.42c015,mp4a.40.2",BANDWIDTH=564960,FRAME-RATE=25.000,AUDIO="group_audio",SUBTITLES="group_subtitle" stream_t0cb40671b0d03b23da032945984bb931_r684787.m3u8

palight avatar Nov 19 '22 13:11 palight

This should be fixed by back-porting the m3u8 processing from yt-dlp.

dirkf avatar Nov 20 '22 20:11 dirkf

@palight

... While waiting for things to be back-ported, you can download "in-manifest" subtitles via your trusted friend ffmpeg 😉 ... From the master HLS manifest you posted,

https://videodelivery.net/e9b513b0d66329997b0054d20356b02e/manifest/video.m3u8

... it emerges that the en subtitles "variant" manifest is:

https://videodelivery.net/e9b513b0d66329997b0054d20356b02e/manifest/stream_te634b76d15e4daa9f1df88fc86028587_r161166111.m3u8

... while the Czech subs one is:

https://videodelivery.net/e9b513b0d66329997b0054d20356b02e/manifest/stream_tba3e9858d784df665c88d27b4e9f84ef_r95446248.m3u8

You should already have an ffmpeg binary to complement your youtube-dl installation (you didn't mention OS specifics), so via an incantation similar to:

ffmpeg -v 8 -stats -i "https://videodelivery.net/e9b513b0d66329997b0054d20356b02e/manifest/stream_tba3e9858d784df665c88d27b4e9f84ef_r95446248.m3u8" "e9b513b0d66329997b0054d20356b02e.cz.srt"

you should be able to grab the cz subs (and similarly for the en ones, if you so desire):

1
00:00:00,054 --> 00:00:02,132
Ahoj mámo, ahoj táto.

2
00:00:02,212 --> 00:00:05,657
Vítej u prvního kurzového audia, 
které tě provede dětskými

3
00:00:05,737 --> 00:00:08,532
prožitky se třemi 
různými rodiči.
...

Kindest regards 😄

Vangelis66 avatar Nov 21 '22 02:11 Vangelis66