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

YT returns a generic RTMP URL for long videos [was: youtube-dl unable to download video] #343

Closed
willysutopo opened this issue May 7, 2012 · 33 comments
Labels
broken-IE problem with existing site extraction bug

Comments

@willysutopo
Copy link

Hi,

Please help me.
I am using Windows and have downloaded youtube.dl and Python.
From command line, I type :
youtube-dl.py http://www.youtube.com/watch?v=xOjtMxUW0s0

and here is the output :

[youtube] Setting language
[youtube] xOjtMxUW0s0: Downloading video webpage
[youtube] xOjtMxUW0s0: Downloading video info webpage
[youtube] xOjtMxUW0s0: Extracting video information
[youtube] RTMP download detected
[download] Destination: xOjtMxUW0s0.flv

ERROR: unable to download video

I need to download that particular video. I have even used the latest version of youtube-dl that is provided here. And then, I use the latest rtmpdump which is 2.4

Thank you very much.

@them0nk
Copy link

them0nk commented May 11, 2012

Looks like same as Bug #263

@fenollp
Copy link
Contributor

fenollp commented May 13, 2012

Same here with hUHBgqx8YP8 and JYEfJhkPK7o those are RTMP streams.
A URL dump youtube-dl -g … only said that: “rtmpe://v11.nonxt5.c.youtube.com/videoplayback” which I think is wrong, for a start.

@FiloSottile
Copy link
Collaborator

Yeah, that generic URL is the issue. But we are scratching our heads to understand what the hell happens... RTMPE is a damnly encrypted protocol, I am having an hard time with MITM and Wireshark...

@FiloSottile
Copy link
Collaborator

Merged three old duplicates here and changed the issue title to reflect the bug

I tried to do some MITM using a RTMPDump fork that supports version 10.

Here are the full results: https://gist.github.com/3060754

There may be some interesting stuff in rtmpsrv_z.log but probably the main issue is the one reported by rtmpdump when used with the params suggested by rtmpsrv (without the corrupted and useless -o option):

WARNING: HandShake: Type mismatch: client sent 6, server answered 10
INFO: Connected...
ERROR: HandleCtrl: SWFVerification Type 2 request not supported, attempting to use SWFVerification Type 1! Patches welcome...
ERROR: RTMP_ReadPacket, failed to read RTMP packet header

@scarlion1
Copy link

this still issue with latest version, any workaround?

@Technologov
Copy link

+1
Same ERROR here:

user@debian6-vm01:/Downloads$ python ./youtube-dl http://www.youtube.com/watch?v=wcekvQeHS6o&wide=1
[1] 27058
user@debian6-vm01:
/Downloads$ [youtube] Setting language
[youtube] wcekvQeHS6o: Downloading video webpage
[youtube] wcekvQeHS6o: Downloading video info webpage
[youtube] wcekvQeHS6o: Extracting video information
[youtube] RTMP download detected
[download] Destination: wcekvQeHS6o.flv

ERROR: unable to download video

[1]+ Exit 1 python ./youtube-dl http://www.youtube.com/watch?v=wcekvQeHS6o
user@debian6-vm01:/Downloads$
user@debian6-vm01:
/Downloads$ python ./youtube-dl --version
2012.11.29

-Alexey "Technologov", 29.Nov.2012.

@MikeWorth
Copy link

I've been having issues with this for some time trying to download 4oD content (from within the UK, I suspect that people elsewhere will run into issues). I've just updated to the latest version such that:

$ youtube-dl --version
2013.01.13

Now I'm getting a different error:
$ youtube-dl Rl5Dmfhm0u0
[youtube] Setting language
[youtube] Rl5Dmfhm0u0: Downloading video webpage
[youtube] Rl5Dmfhm0u0: Downloading video info webpage
[youtube] Rl5Dmfhm0u0: Extracting video information
ERROR: no known formats available for video

This seems consistent with not being able to obtain the correct url, is this the case?

@MikeWorth
Copy link

I've had a play with the code, and the first problem encountered is a failure to correctly identify the download as requiring RTMP; I've fixed that issue (but not brilliantly well) here: MikeWorth/youtube-dl@92031a2

It still fails to actually download the stream, I think this is because I'm pulling the wrong info out; I'm a bit stuck as I don't know much about RTMP and I've never seen this work so can't figure out what it wants.

This was referenced Jan 28, 2013
@ghost ghost assigned FiloSottile Jan 28, 2013
@FiloSottile
Copy link
Collaborator

YT moved the RTMP data from video_info['conn'] to url_encoded_fmt_stream_map, divided by format, like the standard urls.

Here is some data: https://gist.github.com/4655895

There's even a new format itag: 59. ("quality": "large", "type": "video/mp4; codecs=\"avc1.4D001F, mp4a.40.2\"")

I fear that this means we can precisely extract the stream data, but with that "rtmpe": "yes" rtmpdump might not manage to download it... Let's see.

@FiloSottile
Copy link
Collaborator

We should really show a "KNOWN ISSUE" message on this one.

@VitorFrost
Copy link

Any news about this?
Same error here: http://www.youtube.com/watch?v=GmUef84ybXk

Any sugestion on alternatives, maybe?

@SidKumarSingh
Copy link

Still the same issue
2014.12.14

@suwdo
Copy link

suwdo commented Dec 24, 2014

Same issue

youtube-dl --version
2014.12.01

@moppman
Copy link

moppman commented Dec 31, 2014

Same issue with

2014.12.17.2

message:

ERROR: rtmpe downloads are not supported, see https://github.com/rg3/youtube-dl/
issues/343 for more information.

@prestonconnors
Copy link

This is still an issue with 2015.01.30.2 . Just wanted to ping the bug report. Thanks!

Video this was encountered with:
https://www.youtube.com/watch?v=lTurfn7vvCk

@diffracteD
Copy link

Still an Issue on 26th May 2015... version used: 2015.04.28

@vinayak-mehta
Copy link

Can someone suggest any alternatives?

@phihag phihag mentioned this issue Nov 25, 2015
@Twangist
Copy link

An issue with 2015.11.13 - "ERROR: rtmpe downloads are not supported, see" this page. Is this issue in fact "Closed"? as in, known but it won't be handled? Just asking.

@ltalirz
Copy link

ltalirz commented Feb 4, 2016

Still an issue with 2016.01.27
"ERROR: rtmpe downloads are not supported, see #343 for more information."
Video https://www.youtube.com/watch?v=BI5LCCaMoCo

@TRox1972
Copy link
Contributor

TRox1972 commented Jul 7, 2016

Still affecting some videos as of 2016.07.07: https://www.youtube.com/watch?v=lTurfn7vvCk

@YoonAddicting
Copy link

YoonAddicting commented Jul 11, 2016

I don't know if this is any help, but this video uses RTMPE and the playback is only available in 360p and 720p on desktop (Mozilla 47), but on mobile devices it is available in everything from 144p to 1080p.
So YouTube most keep a non-encrypted copy as well, the question is just about how to obtain it.

EDIT: Seems like it plays in the HTML5 player now in Firefox as @yan12125 says..

@yan12125
Copy link
Collaborator

Hmm https://www.youtube.com/watch?v=0V-5vxpsFFg plays without flash on my Firefox, and other videos mentioned above can't be played on my phone.

@lilydjwg
Copy link

https://www.youtube.com/watch?v=0V-5vxpsFFg plays without flash on my Firefox too, and all resolutions are available. Also it's downloadable by youtube-dl here.

@remitamine
Copy link
Collaborator

remitamine commented Jul 12, 2016

I don't know if this is any help, but this video uses RTMPE and the playback is only available in 360p and 720p on desktop (Mozilla 47), but on mobile devices it is available in everything from 144p to 1080p.
So YouTube most keep a non-encrypted copy as well, the question is just about how to obtain it.

i've checked the url when it first posted, it ask's me to activate flash plugin, but it changes today to be available with HTML5.
i checked also using the android app and it's true the videos are available as direct http links(tried some urls posted in this issue).
if we want to use extract them we will need to use the api(https://www.googleapis.com/youtubei/v1/player) but there are some difficulties:

  • the api uses protobuf in both POST data and the response(maybe it's possible to change the output to json or xml using query or data passed in the request).
  • the api provide more info but most of the keys are just numbers, it's like they convert a dict into array which make the keys disappear so you need to figure out what's the meaning of every number:

some parts are obvious:

  2 {
    1: 18
    2: "https://r5---sn-hgn7zn7k.c.youtube.com/videoplayback?sparams=clen%2Cdur%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cm
ime%2Cmm%2Cmn%2Cms%2Cmv%2Cnh%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&mime=video%2Fmp4&upn=SRD8CwST-po&fexp=11200629%2C94
05988%2C9415293%2C9416164%2C9416891%2C9422596%2C9428398%2C9428595%2C9429003%2C9430993%2C9431012%2C9433096%2C9433380%2C9433584%2C9433704
%2C9433946%2C9434822%2C9434889%2C9435526%2C9435876%2C9436835%2C9437122%2C9437552%2C9438220%2C9438293%2C9438371%2C9438926%2C9439013%2C94
39409%2C9439652%2C9440025%2C9440048%2C9440386%2C9440608%2C9440635%2C9440674&lmt=1281778430483569&dur=1459.002&key=yt6&ip=105.110.33.113
&itag=18&id=o-AB7ND9YMnh26L7AGkStu11zNRO7cXtJfrpbBl7Ra5Ami&mm=30&mn=sn-hgn7zn7k&ipbits=0&signature=CC1431578937082F526FA56557F91BC75C66
C766.6D78443ED7CE09E0BCCFB6DFB07ADF366DA99AEF&requiressl=yes&sver=3&expire=1468353898&mt=1468332065&mv=m&clen=122666319&ms=nxu&source=y
outube&pl=17&ratebypass=yes&initcwndbps=52500&gir=yes&nh=IgpwcjAzLm1yczAyKgkxMjcuMC4wLjE"
    5: "video/mp4; codecs=\"avc1.42001E, mp4a.40.2\""
    6: 672844
    31: 672603
    7: 480
    8: 360
    11: 1281778430483569
    12: 122666319
    16: "medium"
    26: "360p"
    27: 1
  }

and some are not:

  74642932 {
    1: 1
    2: 1
    3: 1
    4: 0
    5: 0
    6: 0
  }

the response is similar to the one returned by google play movies api.

@BenasPaulikas
Copy link

Any news on this :) ?

@ck-on
Copy link

ck-on commented Aug 9, 2016

example of rtmpe locked video that is passed through https so tools like urlsnooper, etc. cannot extract the uri from the stream and inspector will not show anything but http/s protocols

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

so even if youtube-dl could just dump the real rtmpe url even if it cannot download it, would be helpful

@yan12125 yan12125 mentioned this issue Oct 13, 2016
Closed
8 tasks
@yan12125
Copy link
Collaborator

I just tried all videos listed here. Some of them are gone, and others are re-encoded into un-encrypted HTML5 formats. I guess this issue can be closed?

@ivan
Copy link
Contributor

ivan commented Mar 16, 2017

I am told that RTMPE on YouTube went away completely a few weeks ago.

@2017-05-1200-11-20
Copy link

sudo apt install linuxbrew-wrapper
sudo wget https://yt-dl.org/downloads/latest/youtube-dl.sig -O youtube-dl.sig

@ytdl-org ytdl-org locked as resolved and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
broken-IE problem with existing site extraction bug
Projects
None yet
Development

No branches or pull requests