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

(Somewhat OT) Issues with viewing/downloading from YouTube (Other sites work fine) #5327

Closed
joeschmoe40 opened this issue Mar 30, 2015 · 5 comments

Comments

@joeschmoe40
Copy link

@joeschmoe40 joeschmoe40 commented Mar 30, 2015

So, I wrote this script to access, view, and, optionally, d/l vids from YouTube and other sites (i.e., anything site that youtube-dl supports). It runs under OSX, and is built around the following tools:

  1. youtube-dl
  2. jq
  3. VLC (Mac OSX version)
  4. wget

Basically, I use "youtube-dl -j" to translate the short URL into the long URL, jq to parse the JSON output to get the "long URL", VLC to view it, and finally, wget to d/l it (if I like it).

This all works fine on other sites, but on YouTube itself, as of sometime in the past few months, two problems arise:

  1. VLC always fails to display the vid, with a typically unhelpful error message like "Failed to access: https://..."
  2. wget tries to download it, but fails with a message like:

Resolving r3---sn-hp57knly.googlevideo.com... 173.194.17.89, 2607:f8b0:4008:3::9
Connecting to r3---sn-hp57knly.googlevideo.com|173.194.17.89|:443... connected.
ERROR: cannot verify r3---sn-hp57knly.googlevideo.com's certificate, issued by /C=US/O=Google Inc/CN=Google Internet Authority G2': Unable to locally verify the issuer's authority. ERROR: certificate common name*.c.docs.google.com' doesn't match requested host name r3---sn-hp57knly.googlevideo.com'. To connect to r3---sn-hp57knly.googlevideo.com insecurely, use--no-check-certificate'.

Note: If I manually re-try this, supplying "--no-check-certificate", then it does, indeed, work.

So, it boils down to: VLC won't play it, wget will download it, but only with --no-check-certificate.

What can I do?

P.S. The exact youtube-dl command I am using is:

youtube-dl.py --prefer-insecure --skip-download --write-info-json --write-description -o tmptmp "$url"

which creates a file called tmptmp.info.json, which I then parse with "jq".

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Mar 30, 2015

This a problem with the certificates (we are getting some similar reports), can those videos be downloaded with youtube-dl itself?

(Note that --prefer-insecure doesn't do anythin for youtube videos, they only use https on their website now)

@joeschmoe40
Copy link
Author

@joeschmoe40 joeschmoe40 commented Mar 30, 2015

Yes, direct downloading via youtube-dl works.
So, the real question remaining is: Why does VLC fail?

P.S. The URL I am using for testing is:

https://www.youtube.com/watch?v=UJkxFhFRFDA

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Apr 2, 2015

It works with VLC and wget on OSX for me, maybe the SSL support is not properly configured (I don't know how to fix it).

@joeschmoe40
Copy link
Author

@joeschmoe40 joeschmoe40 commented Apr 2, 2015

It's probably version-of-VLC related. VLC has a nasty habit of changing stuff (removing features) from version to version, so I try to avoid "upgrading" unless it is absolutely necessary.

Therefore, I'm running a fairly old version of VLC -> VLC media player 2.0.7 Twoflower (revision 2.0.7-3-g51f7bb4). When I find something that works, I stick with it. But I would imagine that version might not support the latest https: foo.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Apr 3, 2015

Since youtube-dl works fine, I'm closing the issue.

@jaimeMF jaimeMF closed this Apr 3, 2015
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
2 participants
You can’t perform that action at this time.