2

I am trying to download the subtitles for this stream (https://live.performa.intio.tv/media/30e671d3-0bd2-46db-b70d-6fb4cb6be350/master-allsubs.m3u8), using youtube-dl.

In the m3u8 file subtitles are listed as a media resource

#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="German",DEFAULT=YES,AUTOSELECT=YES,FORCED=NO,LANGUAGE="deu",URI="subs-deu.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="eng",URI="subs-eng.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Italian",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="ita",URI="subs-ita.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="French",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="fra",URI="subs-fra.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Japanese",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="jpn",URI="subs-jpn.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Russian",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="rus",URI="subs-rus.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Spanish",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="spa",URI="subs-spa.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Chinese",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,LANGUAGE="zho",URI="subs-zho.m3u8"

however any attempt to download them fails, such as youtube-dl --write-sub --skip-download "https://live.performa.intio.tv/media/30e671d3-0bd2-46db-b70d-6fb4cb6be350/master-allsubs.m3u8" No error is returned, but no subtitle file is created either. Any idea?

1 Answer 1

1

Use ffmpeg for each subtitle playlist (subs-XXX.m3u8 link), then add them to your downloaded video.

e.g. for English subtitles:

  1. Download: ffmpeg -i "https://live.performa.intio.tv/media/30e671d3-0bd2-46db-b70d-6fb4cb6be350/subs-eng.m3u8" subs-eng.srt

  2. Add them to your video: ffmpeg -i downloaded.mp4 -i subs-eng.srt -c copy -c:s mov_text outfile.mp4

Unfortunately, with this approach you have to repeat this for each of the 8 languages you linked to; a bash script with a for loop is probably the way to do this.

2
  • Ideally, youtube-dl would support this natively -- it seems like this was raised quite a while ago, but no progress has been made? github.com/ytdl-org/youtube-dl/issues/6106 Commented May 13, 2020 at 3:56
  • Thanks Jason, it works perfectly!
    – James
    Commented May 14, 2020 at 6:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .