streamlink / streamlink

Streamlink is a CLI utility which pipes video streams from various services into a video player
https://streamlink.github.io/
BSD 2-Clause "Simplified" License
10.11k stars 1.12k forks source link

plugins.pluto: support for subtitles #5270

Open f-o opened 1 year ago

f-o commented 1 year ago

Checklist

Description

Pluto.tv offers subtitles for most of their episodes. Currently Streamlink is not capable of downloading these subtitles, even though they are freely accessible through the web-client.

Adding the possibility of downloading subtitles from Pluto.tv, would help users with hearing disabilities, as well as non-native English speakers.

If this was to be implemented, the existing flag --mux-subtitles could be set to enable this feature. However, there should also be a way to only download the subtitles, so that already-downloaded collections could manually mux the subtitles in the future. (--download-subtitles / --only-subtitles)

Given the nature of this project, I believe this feature request fits the scope very well. Not being able to gather every piece of the show, that's being provided by Pluto to its users, means that users of Streamlink will not be utilizing the full potential of the Pluto platform that's available.

I have tried given it a shot of my own, but unfortunately this task is beyond my level of knowledge. The subtitles are provided as segments in a playlist.m3u8 playlist, but it seems only for the specific timeslot before an ad-break. If there was a way to manually get the full .vtt files, I could find my way home from there.

Thank you for taking this into consideration.

bastimeyer commented 1 year ago

there should also be a way to only download the subtitles

This is not what Streamlink is intended for. Muxing subtitles into the output is okay, if they are available, but this has to be supported by the plugin. This requires finding the subtitle stream and returning a MuxedStream instance in that case.

mkbloke commented 1 year ago

I don't think Streamlink supports these HLS subtitles at the moment?

#EXTM3U
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English",DEFAULT=NO,FORCED=NO,URI="subtitle/en/playlist.m3u8?terminate=false&etc",LANGUAGE="en"
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=997452,SUBTITLES="subs"
997452/playlist.m3u8?terminate=false&etc
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1539795,SUBTITLES="subs"
1539795/playlist.m3u8?terminate=false&etc
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2142297,SUBTITLES="subs"
2142297/playlist.m3u8?terminate=false&etc
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=3063648,SUBTITLES="subs"
3063648/playlist.m3u8?terminate=false&etc
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=572723,SUBTITLES="subs"
572723/playlist.m3u8?terminate=false&etc
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:5
#EXT-X-DISCONTINUITY-SEQUENCE:0
#EXT-X-MEDIA-SEQUENCE:24
#EXT-X-KEY:METHOD=NONE
#EXTINF:5,
https://siloh-sp.plutotv.net/c6009f_pluto/clip/5bb556a81b861b853c1e9d98_Duck_Dynasty_Duck_Be_a_Lady_S3E8/720p/20181003_165416/hls/en/en.m3u8_0000000024.vtt
#EXTINF:5,
https://siloh-sp.plutotv.net/c6009f_pluto/clip/5bb556a81b861b853c1e9d98_Duck_Dynasty_Duck_Be_a_Lady_S3E8/720p/20181003_165416/hls/en/en.m3u8_0000000025.vtt
#EXTINF:5,
https://siloh-sp.plutotv.net/c6009f_pluto/clip/5bb556a81b861b853c1e9d98_Duck_Dynasty_Duck_Be_a_Lady_S3E8/720p/20181003_165416/hls/en/en.m3u8_0000000026.vtt
#EXTINF:5,
https://siloh-sp.plutotv.net/c6009f_pluto/clip/5bb556a81b861b853c1e9d98_Duck_Dynasty_Duck_Be_a_Lady_S3E8/720p/20181003_165416/hls/en/en.m3u8_0000000027.vtt
#EXTINF:5,
https://siloh-sp.plutotv.net/c6009f_pluto/clip/5bb556a81b861b853c1e9d98_Duck_Dynasty_Duck_Be_a_Lady_S3E8/720p/20181003_165416/hls/en/en.m3u8_0000000028.vtt
#PLUTO-SESSION-ID:[dd14cc01-d136-11ed-a2e6-e2bedf1c65f1]
#PLUTO-VERSION:2.68.2-production-stitcher-blue