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.76k stars 10.08k forks source link

Can't download purchased movies from YouTube (encrypted?) #9148

Closed vtenfys closed 2 years ago

vtenfys commented 8 years ago

Please follow the guide below


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


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

$ youtube-dl 'https://www.youtube.com/watch?v=AEP4zVQGpxk' -u 'david.bailey@archlinux.net' --verbose
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['https://www.youtube.com/watch?v=AEP4zVQGpxk', '-u', 'PRIVATE', '--verbose']
Type account password and press [Return]: 
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.04.06
[debug] Python version 3.5.1 - Linux-4.4.6-1-ck-x86_64-with-arch
[debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] Downloading login page
[youtube] Logging in
Type 2-step verification code and press [Return]: 
[youtube] Submitting TFA code
[youtube] AEP4zVQGpxk: Downloading webpage
[youtube] AEP4zVQGpxk: Downloading video info webpage
[youtube] AEP4zVQGpxk: Extracting video information
[youtube] {60} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {52} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {146} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {197} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {226} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {227} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {145} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {196} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {224} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {225} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {144} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {195} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {220} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {221} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {222} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {223} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {143} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {194} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {142} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {161} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {148} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {149} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {150} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {198} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] {199} signature length 40.42, html5 player en_US-vfllNvdW4
[youtube] AEP4zVQGpxk: Downloading MPD manifest
[youtube] AEP4zVQGpxk: Downloading player https://s.ytimg.com/yts/jsbin/player-en_US-vfllNvdW4/base.js
[youtube] AEP4zVQGpxk: Downloading MPD manifest
WARNING: [youtube] AEP4zVQGpxk: Skipping DASH manifest: ExtractorError("Failed to download MPD manifest: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.",)
[debug] Invoking downloader on 'https://r5---sn-aigllnsy.c.youtube.com/videoplayback?requiressl=yes&mime=video%2Fwebm&gir=yes&keepalive=yes&expire=1460335770&fexp=9416126%2C9416778%2C9416891%2C9417422%2C9420452%2C9422596%2C9422841%2C9423662%2C9426926%2C9427902%2C9428398%2C9428709%2C9429015%2C9429130%2C9431117%2C9431449%2C9431686%2C9432198%2C9432629%2C9433727&pfa=5&lmt=1454036854132099&mm=30&ipbits=8&mn=sn-aigllnsy&pl=16&sparams=clen%2Ccp%2Cctier%2Cdur%2Cgcr%2Cgir%2Chightc%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cnh%2Cpfa%2Cpl%2Crequiressl%2Csource%2Cupn%2Cexpire&cp=U0lVRVNOU19MSkNPNV9LSFdIOmxCX2tJTHF4U2Zn&id=o-APl1-DgzpwBjTzmyiX0GmmXYY9oBTOJsBEq4baDAm-av&mt=1460314055&dur=8178.169&mv=m&initcwndbps=2031250&ms=nxu&itag=197&sver=3&ip=87.113.135.60&ctier=A&hightc=yes&key=yt6&nh=IgpwcjAxLmxocjE0KgkxMjcuMC4wLjE&upn=9Qh79aJevNQ&clen=3301723730&source=youtube&gcr=gb&signature=771846D6EBDC93201839D91C63E6CA504CEFF59C.C7E93C7A9C69C9EA11C08F5897264988E6212CAD&ratebypass=yes'
[download] Resuming download at byte 51772418
[download] Destination: The Matrix-AEP4zVQGpxk.f197.webm
[download]   1.6% of 3.07GiB at 985.82KiB/s ETA 53:37
...
<end of log>

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):


Description of your issue, suggested solution and other information

Explanation of your issue in arbitrary form goes here. Please make sure the description is worded well enough to be understood. Provide as much context and examples as possible. If work on your issue required an account credentials please provide them or explain how one can obtain them.

When I try to download a movie from YouTube that's been purchased on Google Play, it'll appear to be downloaded successfully, but upon opening the file in the player the screen is black and no sound played. The video length on the seeker is correct, however. I'm not sure what the problem is exactly but I suppose it might be that YouTube uses some sort of extra encryption on movies that isn't present for normal videos.

N.b. I cancelled the download in the log given, but I've confirmed this happens each time when downloading in full. I've also tried other formats, none of which seem to work (the default is 1080p webm).

I've tried with the stable 2016.04.06 version, and the git version.

dstftw commented 8 years ago

Most likely they are DRM protected.

vtenfys commented 8 years ago

I'd be happy to donate to the project for somebody to buy some movies to test this out; is there any way I can do so? I can code but don't have any experience in breaking DRM.

dstftw commented 8 years ago

No one had so far (apart from obvious screen capturing and some non practical heuristic sequence based approaches).

vtenfys commented 8 years ago

I tried this again today just to see if I could use any other apps to remove the DRM but now I got the error 'rental videos unsupported' rather than the previous output. So it looks like this is another #359 duplicate... not sure why it worked initially though (not removing the DRM, but downloading the original file at least).

remitamine commented 8 years ago

at least detect that the video or the format are DRM protected. youtube-dl won't extract DASH formats because when they are protected they will contain ContentProtection. this some information that appear in the js code of the player:

needs confirmation if this information can help to detect DRM protection in youtube.

sakanaproductions commented 8 years ago

Is there any update on this? I have numerous movies that are purchased that you can use for testing

tommcintyre commented 7 years ago

@sakanaproductions Just tried this on the latest version (2017.04.11), and it seems to work fine for purchased videos, despite one warning which didn't seem to affect the output. The resulting file was DRM-free. I don't have any "rented" videos, so not sure if those use different DRM.

Semper-discens commented 7 years ago

@tommcintyre what syntax did you use? I am running 2017.04.11 version and I get 2 warnings: WARNING: Unknown codec dtse[youtube] {329} signature length 41.41, html5 player en_US-vfl5-0t5t WARNING: Unknown codec eac3[youtube] {350} signature length 41.41, html5 player en_US-vfl5-0t5t and I have the same issues as the original post.

ghost commented 7 years ago

I could've sworn I had a working drm-free video file from the 4.27 version, but since 4.28 everything's been unable to be properly played back.