ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.41k stars 10.04k forks source link

Hotstar.com subtitles not detected #14659

Open ktkchn opened 7 years ago

ktkchn commented 7 years ago

Please follow the guide below


Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.10.29. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

Before submitting an issue make sure you have:

What is the purpose of your issue?


The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--list-subs', u'-v', u'https://www.hotstar.com/movies/beautiful/1000105371']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.10.29
[debug] Python version 2.6.6 - Linux-2.6.32-504.16.2.el6.x86_64-x86_64-with-redhat-6.6-Carbon
[debug] exe versions: ffmpeg N-87043-gf0f48884b0-static, ffprobe N-81400-g15dd56c-static
[debug] Proxy map: {}
[HotStar] 1000105371: Downloading JSON metadata
[HotStar] 1000105371: Downloading JIO JSON metadata
[HotStar] 1000105371: Downloading m3u8 information
1000105371 has no subtitles

While trying to list subtitles for the following url in youtube-dl using --list-subs no subtitles are found but when playing on chrome the english subtitles can be activated using CC button on their flash player.

https://www.hotstar.com/movies/beautiful/1000105371

I am not sure if subtitle downloads worked before for hotstar ever in youtube-dl. It would be great if someone can add/fix the subtitle support on hotstar.

Thank you

enigmaquip commented 7 years ago

Looks like the subtitle info is in the m3u8 which the common.py m3u8 parser does not handle

ktkchn commented 7 years ago

Thanks enigmaquip I was able to google on m3u8 and download the subtitles outside of youtube-dl. The process was long; downloading webvtts merging them and converting to srt, it would be great if this happened automatically in youtube-dl.

therohanchawla commented 5 years ago

Thanks enigmaquip I was able to google on m3u8 and download the subtitles outside of youtube-dl. The process was long; downloading webvtts merging them and converting to srt, it would be great if this happened automatically in youtube-dl.

I would be thankful if you point me in the direction, How you got the subs from hotstar? I would be really thankfull.

ktkchn commented 5 years ago

I would be thankful if you point me in the direction, How you got the subs from hotstar? I would be really thankfull.

It looks like they have changed things now. In chrome please open developer tools --> network-->XHR. then load any hotstar video. In the "Name" column we are looking for either

a)something that either ends with a .vtt - in this case the response tab on the right will have all the subtitles, right click and copy-> copy response. Save this in a text file and rename to .vtt

or b) has pattern like subtitle.m3u8 -- if lucky this should have list of URLS in the response, u will have to extract the URLS using regex or some scripting then batch download all URLS and then merge all their contents stripping off the headers again with some scripting. I did everything with python If u could share the Hotstar URL I can try fetching the subs for you.

therohanchawla commented 5 years ago

I would be thankful if you point me in the direction, How you got the subs from hotstar? I would be really thankfull.

It looks like they have changed things now. In chrome please open developer tools --> network-->XHR. then load any hotstar video. In the "Name" column we are looking for either

a)something that either ends with a .vtt - in this case the response tab on the right will have all the subtitles, right click and copy-> copy response. Save this in a text file and rename to .vtt

or b) has pattern like subtitle.m3u8 -- if lucky this should have list of URLS in the response, u will have to extract the URLS using regex or some scripting then batch download all URLS and then merge all their contents stripping off the headers again with some scripting. I did everything with python If u could share the Hotstar URL I can try fetching the subs for you.

Gladly The first way worked for the video I was wanting the subs for, Thanks a lot for the insanely quick response. Really Huge Thanks.

xabayx commented 4 years ago

Hello @ktkchn, firstly thank you very much for having shared the two ways how one could download subtitles from hotstar. And secondly, I'd like to kindly ask you how exactly is it possible to do the b) option you mentioned? if you could share the code it'd be awesome! Thanks in advance :)