Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
[Crunchyroll?] Only extract requested subtitles #6264
Comments
|
i propose 2 solution for this:
|
|
@remitamine both flawed as well as current approach. The reasonable solution would be a customizable extraction behavior (in particular for crunchyroll - subtitles decryption) that will be used by subtitles extractor or even a postprocessor. |
|
I had a similar problem while writing #6144. I ended up solving it with a few kludges to plug the downloader infrastructure into subtitle downloading (commit acbc6d38660092e90c4ab36110b30355d26c4363), but I'm not particularly proud of it. |
|
Seems to be an issue not just with subtitles but with resolutions too. At least on my connection, it takes half-a-dozen seconds for each "media info" page to download, even if I just request one resolution. |
|
I'm having a similar problem: youtube-dl don't download just requested subtitles. Take a look at this example running:
But if I list the subtitles, they appear:
Thanks! |
|
You need |
|
@wiiaboo thanks a lot! It worked! I think it shouldn't be necessary to add that option, it doesn't make sense for me :) |
|
There's another way to associate the language names with the codes by reading the page language selection. Example: languages = {k: v for (v, k) in re.findall(r';([a-z]{2}[A-Z]{2})[^ ]+ data-language="([^"]+)', webpage)}Is there any way for _get_subtitles or _extract_subtitles to know which languages were requested? |
Problem
Using --sub-lang to request one or two subtitles from Crunchyroll doesn't just extract the requested subtitles, but instead extracts all of them, leading to big delays before starting the stream, whether you use
--all-subsor just--sub-lang enUS.In the case of sites where the subs just point to a certain URL, the extraction seems faster, so it's probably more of a problem for sites like Crunchyroll where you extract the full subtitles.
Solution 1
At least for sites like Crunchyroll, just extract the requested languages.
Solution 2
Add an option that just extracts the requested languages?
I should probably also mention that this is mostly useful when you want to stream the resulting URL, like through mpv. When you're just using youtube-dl directly to download the video the time extracting the subs is probably not an issue either.