Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
video downloads well but its URL does not play in the browser or Media player #2593
Comments
|
hmmm... interesting.... if I run these same commands on my MacPro at home it works... but If I run these commands from Amazon EC2 server. Returned URL fails to play in the browser.... what could be the problem? I have updated youtube-dl to a latest version on both machines. |
|
The urls for some videos may require to use the same cookies that were used to extract them. You can use |
|
@jaimeMF thank you for your reply! I double checked. If I run on local computer it works well. If I run youtube-dl on remote Amazon EC2 instance it does generate urls but then I cannot use then in the browser. The browser is actually just for testing. What I do is I grab one of these urls and run it in iPhone media player. Urls that are generated on local machine works well. Urls that are generated on Amazon EC2 instance do not work. Also I tried runing youtube-dl script in php: ob_start(); I get URLs fine. But none of them works. |
|
Youtube url generate different pattern for different URL. In another word it verifies the ip. So the URL generated at computer A won't work on computer B. |
|
@xanadu Thank you for your reply! This is interesting and challenging.. I need these urls to play on mobile phone. I run youtube-dl on server and wanted to pass back urls to mobile phone so I can play them there. Is there a way you know Mobile Developers can use youtube-dl with their Apps? How to pass generated URLs back to the app? |
|
@xanadu if generated urls cannot be played on a device with a different IP, do you know why VEVO videos do not play even when signature is deciphered using the html5player javascript functions? there must be different functions youtube-dl is using? Do you know which? function cE(a){a=a.split("");a=dE(a,48);a=a.slice(2);a=a.reverse();a=a.slice(1);a=dE(a,4);a=dE(a,35);return a.join("")} So I can decipher signature and make the url play on my mobile device? |
HI guys!
I have downloaded youtube-dl and videos are downloading well when run in command line. However if I run youtube-dl to extract urls only:
./youtube-dl --get-url "https://www.youtube.com/watch?v=iUiTQvT0W_0" --all-formats
and then take one of the urls and try to play in in the browser window I get 403 error code. Video does not play. I tried using same urls with Apple Media player and still the same problem. Video does not play. But It does download if I run:
./youtube-dl
for example. This command will download video well:
./youtube-dl "https://www.youtube.com/watch?v=iUiTQvT0W_0"
This will return url.
./youtube-dl "https://www.youtube.com/watch?v=iUiTQvT0W_0" --get-url
https://r12---sn-q4f7dnsd.googlevideo.com/videoplayback?mv=m&mt=1395347897&gcr=us&ms=au&requiressl=yes&sparams=gcr%2Cid%2Cip%2Cipbits%2Citag%2Cpcm2fr%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&id=o-AJSdxOK99mRfHZzI6v7Xv-MQBzgJm6E40P5K--GYwcb5&expire=1395371990&ipbits=0&ratebypass=yes&sver=3&itag=18&key=yt5&source=youtube&pcm2fr=yes&ip=54.196.172.2&fexp=907725%2C932273%2C929202%2C916612%2C937417%2C913434%2C936910%2C936913%2C934022&upn=dlGhz_Jw8Qg&signature=110070391B456A89B495E5A322859C64847B33F6.F3E5BA4AB8D5E9B3ADAC75CF1AF77183AE00367D
but If used in the browser, video will not play.
Can you advise?