Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vrv] Subtitle Extraction #19238

Closed
DaPatch opened this issue Feb 15, 2019 · 3 comments
Closed

[vrv] Subtitle Extraction #19238

DaPatch opened this issue Feb 15, 2019 · 3 comments
Assignees

Comments

@DaPatch
Copy link

@DaPatch DaPatch commented Feb 15, 2019

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

  • I've verified and I assure that I'm running youtube-dl 2019.02.08

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.


Description of your issue, suggested solution and other information

VRV extractor does not always get subs. Bothers me to the extent that I found the path to resolving.
I want to preface that Python is not something I am familiar with.

However I think adding the following to line 182 of vrv.py will increase subtitle extraction rate:

for subtitle in streams_json.get('captions', {}).values():
	subtitle_url = subtitle.get('url')
	if not subtitle_url:
		continue
	subtitles.setdefault(subtitle.get('locale', 'en-US'), []).append({
		'url': subtitle_url,
		'ext': subtitle.get('format', 'vtt'),
	})

Basically your checking for a 'subtitles' key when you should be looking for a 'captions' key for these videos. Not sure if changed, different for different content providers, or what. Think checking for both key's values will suffice for extracting more subs across the site.

@DaPatch DaPatch changed the title VRV Subtitle Extraction [vrv] Subtitle Extraction Mar 26, 2019
@darkhelmet2016
Copy link

@darkhelmet2016 darkhelmet2016 commented May 15, 2019

But it still needs to be able to find subtitles as well since since shows like anime use ass but TV shows would use vtt, so wouldn't it need an argument to find either or?

@DaPatch
Copy link
Author

@DaPatch DaPatch commented May 15, 2019

Could always "attempt" to extract and save all the ones it extracts, as I believe the code I provide does. Shouldn't require a command line argument as long as you are telling youtube-dl to save subs.

@darkhelmet2016
Copy link

@darkhelmet2016 darkhelmet2016 commented May 15, 2019

That line in py you provided is for one kind of sub vtt the argument line for either or would your line only grabs closed caption subs as each provider uses different subtitles, some vtt, some ass and some srt. You are asking it to "get" cc vtt subs. The line you would need would need to as to get all subs but it would need to output vtt,ass,srt ect. the command line argu according to the read me page is ---all-subs Download all the available subtitles of the video. if you were to do something similar in the cmd prompt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.