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
131.94k stars 10.01k forks source link

Unable to download purchased movie #1774

Open notjames opened 10 years ago

notjames commented 10 years ago

Attempted to download a purchased movie to see if I could download it via youtube-dl

Unfortunately, the following trace occurred with the run args:

$ youtube-dl --verbose -ct -u 'username@domain.com' -p 'password' 'z4l7OZLIh9w'

[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', '-ct', '-u', '<PRIVATE>', '-p', '<PRIVATE>', 'z4l7OZLIh9w']
[debug] youtube-dl version 2013.11.15.1
[debug] Python version 2.7.3 - Linux-3.2.0-55-generic-x86_64-with-Ubuntu-12.04-precise
[debug] Proxy map: {}
[youtube] Setting language
[youtube] Logging in
[youtube] Confirming age
[youtube] z4l7OZLIh9w: Downloading video webpage
[youtube] z4l7OZLIh9w: Downloading video info webpage
[youtube] z4l7OZLIh9w: Extracting video information
[youtube] z4l7OZLIh9w: Encrypted signatures detected.
[youtube] encrypted signature length 85 (40.44), itag 60, html5 player vflqSl9GX
[youtube] encrypted signature length 85 (40.44), itag 52, html5 player vflqSl9GX
ERROR: no known formats available for video; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
Traceback (most recent call last):
  File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 348, in extract_info
    ie_result = ie.extract(url)
  File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 125, in extract
    return self._real_extract(url)
  File "/usr/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 1452, in _real_extract
    video_url_list = self._get_video_url_list(url_map)
  File "/usr/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 1189, in _get_video_url_list
    raise ExtractorError(u'no known formats available for video')
ExtractorError: no known formats available for video; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.

Also tried specifying mp4. I'll try other formats.

HalosGhost commented 10 years ago

Might I recommend you obfuscate that password?

jaimeMF commented 10 years ago

It seems that they use itags 60 and 52 for those movies, could you try to run it from source after modifying youtube_dl/extractor/youtube.py? it should look like this:

_available_formats = ['38', '37', '46', '22', '45', '35', '44', '34', '18', '43', '6', '5', '36', '17', '13',
                          # Apple HTTP Live Streaming
                          '96', '95', '94', '93', '92', '132', '151',
                          # 3D
                          '85', '84', '102', '83', '101', '82', '100',
                          # Dash video
                          '138', '137', '248', '136', '247', '135', '246',
                          '245', '244', '134', '243', '133', '242', '160',
                          # Dash audio
                          '141', '172', '140', '171', '139',
                          # Rented movies
                          '60', '52', # <= Modification
                          ]

If you prefer I can open a branch with that modification so that you can directly download the source and run it.

notjames commented 10 years ago

Wow! Apologies that this has taken so long to respond. I will make the change and let you know later this evening. Thank you!

snafuxnj (snafoo-Ex-en-jay)


From: Jaime Marquínez Ferrándiz notifications@github.com To: rg3/youtube-dl youtube-dl@noreply.github.com Cc: Jim Conner snafuxnj@yahoo.com Sent: Wednesday, November 20, 2013 11:11 PM Subject: Re: [youtube-dl] Unable to download purchased movie (#1774)

It seems that they use itags 60 and 52 for those movies, could you try to run it from source after modifying youtube_dl/extractor/youtube.py? it should look like this: _available_formats = ['38', '37', '46', '22', '45', '35', '44', '34', '18', '43', '6', '5', '36', '17', '13', # Apple HTTP Live Streaming '96', '95', '94', '93', '92', '132', '151', # 3D '85', '84', '102', '83', '101', '82', '100', # Dash video '138', '137', '248', '136', '247', '135', '246', '245', '244', '134', '243', '133', '242', '160', # Dash audio '141', '172', '140', '171', '139', # Rented movies '60', '52', # <= Modification ] If you prefer I can open a branch with that modification so that you can directly download the source and run it. — Reply to this email directly or view it on GitHub.

notjames commented 10 years ago

I added the following in the listed source (though it seemed quite different, which I suppose is because of the lapsed time since the question was asked)

232 # Rented movies 233 '52': {'ext': 'mp4', 'height': 1080, 'resolution': '1080p', 'format_note': 'Purchased video', 'preference': -40}, 234 '60': {'ext': 'mp4', 'height': 1080, 'resolution': '1080p', 'format_note': 'Purchased video', 'preference': -40},

$ sudo cp /usr/bin/youtube-dl /usr/bin/youtube-dl-orig $ make pandoc -f markdown -t plain README.md -o README.txt pandoc -s -f markdown -t man README.md -o youtube-dl.1 python devscripts/bash-completion.py $ sudo cp youtube-dl /usr/bin $ youtube-dl --verbose -ct -u 'user@domain.com' -p '' 'z4l7OZLIh9w' [debug] System config: [] [debug] User config: [] [debug] Command-line args: ['--verbose', '-ct', '-u', '', '-p', '', 'z4l7OZLIh9w'] [debug] Encodings: locale 'UTF-8', fs 'UTF-8', out 'UTF-8', pref: 'UTF-8' [debug] youtube-dl version 2014.02.05 [debug] Python version 2.7.3 - Linux-3.2.0-58-generic-x86_64-with-Ubuntu-12.04-precise [debug] Proxy map: {} [youtube] Setting language [youtube] Downloading login page [youtube] Logging in [youtube] Confirming age [youtube] z4l7OZLIh9w: Downloading webpage [youtube] z4l7OZLIh9w: Downloading video info webpage [youtube] z4l7OZLIh9w: Extracting video information [youtube] z4l7OZLIh9w: Encrypted signatures detected. [youtube] encrypted signature length 90 (46.43), itag 60, html5 player vfle-mVwz [youtube] z4l7OZLIh9w: Downloading js player mVwz [youtube] encrypted signature length 90 (46.43), itag 52, html5 player vfle-mVwz [download] Destination: White House Down-z4l7OZLIh9w.mp4 [download] 11.0% of 627.33MiB at 642.59KiB/s ETA 14:49

Success! Just FYI. However, I'm hoping that the dictionary elements I used (guessed) are mostly accurate. Please verify.

notjames commented 10 years ago

Oh, please note that the numbers in the front of the pasted lines are my editors line numbers, not the source I used.

notjames commented 10 years ago

One thing to note is that the video that successfully downloaded was not decrypted. I will need to attempt to re-dl the movie, unless the reason that it isn't decrypted is because of the options I used in the _available_formats dictionary.

notjames commented 9 years ago

I tried the fix as mentioned above but as memory serves, it did not work. I haven't really messed with it since, however, it would be nice to download the movie I purchased. If I get time, I'll look into it again.

ghost commented 8 years ago

Ping. Any updates on this?

T0071 commented 6 years ago

Any updates on this?

Fabian42 commented 5 years ago

Version 2018.10.05 downloads the movie and the resulting video is multiple GBs big, but corrupt after exactly 11 seconds. Tried with a lot of movies. Has anyone experienced the same? Can it be restored somehow or is it just multiple GB of data garbage?

ealgase commented 5 years ago

@Fabian42 Yes. The movie is encrypted with some sort of DRM. A good movie to try is https://www.youtube.com/watch?v=s7_qI6_mIXc, as it is free to watch.

Fabian42 commented 5 years ago

@ealgase Not in Germany. :/

Fabian42 commented 5 years ago

Confirmed for 2019.03.01. Has there been any research into the DRM since 2013?

ealgase commented 5 years ago

Doesn't appear to be much research. It should probably be easy to reverse engineer though.

joshobrienau commented 5 years ago

Still interested to see if there has been any further progress on this, as above after exactly 11 seconds the video turns to grey due to DRM protection.

Unfortunately only avenue to purchase a TV show was via YouTube, assuming I'd be able to save it using yt-dl :(

ealgase commented 5 years ago

Unfortunately, nope, that's the same experience everyone faces here.

antdude commented 5 years ago

For free official YouTube movies, you can use any from https://www.youtube.com/playlist?list=PLHPTxTxtC0ibVZrT2_WKWUl2SAxsKuKwx to test. I ran into the same problem today. :(

Fabian42 commented 5 years ago

The behaviour has changed in the lastest version, it now outputs this error message:

ERROR: Watch this video on YouTube. Playback on other websites has been disabled by the video owner.

That's a weird way to word it for a YouTube downloader (if I use it, I obviously do not want or can not watch it on YouTube), but it's better than downloading 20 minutes and producing data garbage, I guess.

jdbodker commented 4 years ago

I'm downloading a purchased tv show, something I grew up on in the 80's, and i'm able to use my credentials to download the file through user and password, but about 8-10 seconds in, the audio cuts out and the video gets super corrupted. Any changes or solutions??? Thanks

vivalamovie commented 4 years ago

I'm downloading a purchased tv show, something I grew up on in the 80's, and i'm able to use my credentials to download the file through user and password, but about 8-10 seconds in, the audio cuts out and the video gets super corrupted. Any changes or solutions??? Thanks

Same here.

notjames commented 2 years ago

Out of curiosity, what does the "Account Needed" label mean?

zhengliw commented 2 years ago

Any update? I am looking for a way to download my purchased movies but I am not sure if this would work or not.

KevDoy commented 2 years ago

If the movie free, then we just need someone to provide example URL. Otherwise someone would need to share account for testing

YouTube provides movies for free that have the same DRM as purchased content.

https://youtube.com/movies see the "free to watch" section.

zhengliw commented 1 year ago

I'm not exactly sure, but the famous "Never Gonna Give You Up" video from Rick Astley seems to be copyrighted and therfore DRM-protected. I am going to try to download that video later (essentially rickrolling myself :/) and report back.

Here is the link if you want to try: https://youtu.be/dQw4w9WgXcQ

zhengliw commented 1 year ago

Yep, totally works, but just not sure if this is actually DRM-protected, as said.

zhengliw commented 1 year ago

Sorry... Is there any other way I can help?