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

The Pluralsight video subtitles are missing the first phrase (cut off) #11118

Closed
AOne-T opened this issue Nov 4, 2016 · 5 comments
Closed

The Pluralsight video subtitles are missing the first phrase (cut off) #11118

AOne-T opened this issue Nov 4, 2016 · 5 comments

Comments

@AOne-T
Copy link

@AOne-T AOne-T commented Nov 4, 2016

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.11.02. 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 2016.11.02

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

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

The problem was encountered on several videos from Pluralsight coures. First of all I download complete courses, by if I download the single video the problem stays.

youtube-dl.exe -u username -p password -i -v --all-subs -o "%(playlist_title)s (by %(creator)s)/%(chapter_number)s. %(chapter)s/%(playlist_index)s - %(title)s.%(ext)s" "https://app.pluralsight.com/player?course=domain-driven-design-in-practice&author=vladimir-khorikov&name=domain-driven-design-in-practice-m1&clip=0&mode=live" 
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-u', 'PRIVATE', '-p', 'PRIVATE', '-i', '-v', '--all-subs', '-o', '%(playlist_title)s (by %(creator)s)/%(chapter_number)s. %(chapter
)s/%(playlist_index)s - %(title)s.%(ext)s', 'https://app.pluralsight.com/player?course=domain-driven-design-in-practice&author=vladimir-khorikov&name=domain-dri
ven-design-in-practice-m1&clip=0&mode=live']
[debug] Encodings: locale cp1251, fs mbcs, out cp1251, pref cp1251
[debug] youtube-dl version 2016.11.02
[debug] Python version 3.4.4 - Windows-7-6.1.7601-SP1
[debug] exe versions: none
[debug] Proxy map: {}
[pluralsight] Downloading login page
[pluralsight] Logging in as username
[pluralsight] domain-driven-design-in-practice-m1-0: Downloading JSON metadata
[pluralsight] domain-driven-design-in-practice-m1-0: Downloading mp4-high-widescreen viewclip JSON
[pluralsight] domain-driven-design-in-practice-m1-0: Waiting for 2 seconds to avoid throttling
[pluralsight] domain-driven-design-in-practice-m1-0: Downloading captions JSON
[info] Writing video subtitles to: NA (by vladimir-khorikov)\NA. NA\NA - Introduction - Getting Started.en.srt
[debug] Invoking downloader on 'http://vid20.pluralsight.com/clip-videos/vladimir-khorikov/domain-driven-design-in-practice-m1/domain-driven-design-in-practice-m1-01/1280x720mp4/20160121175752.mp4?DL7IPDlpH8_Ij-xA-JoOTZRnIRSIAsnTspRGuZJRsq6QikqUvQnp6amw0Hu7T174oouPZM4IKIYhrXozutZEO5ILnLQmPyhRFXr71xpXYwynA0MFQkt9Yvp8L6ETOP-3yJUCQgEW_Rex73TzknCw7swwAQs7zBKc0n3Uf9X24YsfcqWzGqPTrmD1d1Te8ci2TJREc66haQ3CZa5jlScKS6Nl6-BiVcfVYpgcFxwvQRA12WFg8RzdE-bdgGZntt0F5ISt8377'
[download] Destination: NA (by vladimir-khorikov)\NA. NA\NA - Introduction - Getting Started.mp4

[download]   0.1% of 1.86MiB at Unknown speed ETA Unknown ETA
[download]   0.2% of 1.86MiB at Unknown speed ETA Unknown ETA
[download]   0.4% of 1.86MiB at Unknown speed ETA Unknown ETA
[download]   0.8% of 1.86MiB at  7.32MiB/s ETA 00:00         
[download]   1.6% of 1.86MiB at 15.14MiB/s ETA 00:00         
[download]   3.3% of 1.86MiB at  2.37MiB/s ETA 00:00         
[download]   6.7% of 1.86MiB at  2.43MiB/s ETA 00:00         
[download]  13.4% of 1.86MiB at  3.04MiB/s ETA 00:00         
[download]  26.8% of 1.86MiB at  3.72MiB/s ETA 00:00         
[download]  53.6% of 1.86MiB at  4.67MiB/s ETA 00:00         
[download] 100.0% of 1.86MiB at  5.65MiB/s ETA 00:00         
[download] 100% of 1.86MiB in 00:00

The issue is that subtitles are not full. The first phrase is cut off, which usually starts from 00:00:00. So the subtitles only start from the second phrase at 06:00:00

1
00:00:06,000 --> 00:00:12,000
and you struggle to understand how to start applying its concepts in your own project?

2
00:00:12,000 --> 00:00:18,000
Or maybe you had a hard time to combine them with other well-known practices, such as unit testing
...
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Nov 4, 2016

Can you watch complete subtitles in browser in the first place?

@AOne-T
Copy link
Author

@AOne-T AOne-T commented Nov 4, 2016

Yes, of course.

@shanyuen
Copy link

@shanyuen shanyuen commented Sep 7, 2017

It still not yet fixed.

@50csent
Copy link
Contributor

@50csent 50csent commented Dec 22, 2017

This first phrase cutoff only occurs if "displayTimeOffset" is 0.0

Because the code on #L174:
https://github.com/rg3/youtube-dl/blob/c94427dd60f9836e3752077977cae3b4d0da47d1/youtube_dl/extractor/pluralsight.py#L173-L177

calls the method dict_get and this method returns None, because d["displayTimeOffset"] produces value 0.0, i.e. falsy value; and thus the subtitle line is skipped.

Issue can be fixed with a modified call to dict_get on #L174

float_or_none(dict_get(current, TIME_OFFSET_KEYS, skip_false_values=False)),

But I don't know if it breaks some other use cases.

@50csent
Copy link
Contributor

@50csent 50csent commented Dec 23, 2017

I noticed, that this issue is tagged with "cant-reproduce" and "account-needed".

In fact, this issue: first phrase (when it starts at offset 0) is skipped when doing conversion from json to srt; can be reproduced without an account and with a "free" course overview video, for example, with this: https://app.pluralsight.com/player?name=python-getting-started-m0&clip=0&course=python-getting-started&author=bo-milanovich

Example file: captions.json.txt

@50csent 50csent mentioned this issue Dec 29, 2017
4 of 9 tasks complete
@dstftw dstftw closed this in 6d0f7b4 Dec 29, 2017
dstftw added a commit that referenced this issue Dec 29, 2017
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
4 participants
You can’t perform that action at this time.