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

stream url of some youtube video does not play in Video.js #7230

Closed
uhfg123 opened this issue Oct 19, 2015 · 3 comments
Closed

stream url of some youtube video does not play in Video.js #7230

uhfg123 opened this issue Oct 19, 2015 · 3 comments

Comments

@uhfg123
Copy link

@uhfg123 uhfg123 commented Oct 19, 2015

I am using youtube-dl to get the stream url by info.url and send this stream url to video js to play the video on browser. Most of the stream url work fine but there are some stream url which do not work and give 403 forbidden error in console window of browser. How Can i play these not working stream url?
Not working stream url example:
www.youtube.com/watch?v=9wZhiAdQ2RA
www.youtube.com/watch?v=lOSe5SkMCOs
Also, In my country youtube is blocked. when i use a vpn then not working stream url work.But most work without vpn.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 19, 2015

Post the full output of youtube-dl when run with --verbose option.

@uhfg123
Copy link
Author

@uhfg123 uhfg123 commented Oct 19, 2015

1.Here is the --verbose result
/////////////////////////////////////////////////////
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'www.youtube.com/watch?v=lOSe5SkMCOs', u'--verbose']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.10.16
[debug] Python version 2.7.6 - Linux-3.14.13-c9-x86_64-with-Ubuntu-14.04-trusty
[debug] exe versions: ffmpeg 2.4.3-1ubuntu1, ffprobe 2.4.3-1ubuntu1
[debug] Proxy map: {}
WARNING: The url doesn't specify the protocol, trying with http
[youtube] lOSe5SkMCOs: Downloading webpage
[youtube] lOSe5SkMCOs: Downloading video info webpage
[youtube] lOSe5SkMCOs: Extracting video information
[youtube] lOSe5SkMCOs: Downloading DASH manifest
[youtube] lOSe5SkMCOs: Downloading DASH manifest
[debug] Invoking downloader on 'https://r6---sn-25g7snee.googlevideo.com/videoplayback?id=94e49ee5290c08eb&itag=136&source=youtube&requiressl=yes&pl=20&gcr=us&mm=31&mn=sn-25g7snee&ms=au&mv=m&ratebypass=yes&mime=video/mp4&gir=yes&clen=47418108&lmt=1429877014436311&dur=179.279&fexp=9408213,9408710,9413137,9414764,9416126,9416729,9417707,9418185,9418203,9418401,9419444,9420309,9420328,9420629,9420931,9422114&sver=3&signature=54FB40587C12DC15443941539DAA9AAB69088321.10D39C5E1CBEC2B6AD83B31CCCC2ED04989A6CDA&upn=2PNqq92pvs8&mt=1445230996&key=dg_yt0&ip=104.155.18.208&ipbits=0&expire=1445252624&sparams=ip,ipbits,expire,id,itag,source,requiressl,pl,gcr,mm,mn,ms,mv,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: Batista vs Undertaker - TLC 2009 - Highlights HD-lOSe5SkMCOs.f136.mp4
[download] 100% of 45.22MiB in 00:00
[debug] Invoking downloader on 'https://r6---sn-25g7snee.googlevideo.com/videoplayback?id=94e49ee5290c08eb&itag=141&source=youtube&requiressl=yes&pl=20&gcr=us&mm=31&mn=sn-25g7snee&ms=au&mv=m&ratebypass=yes&mime=audio/mp4&gir=yes&clen=5719883&lmt=1429876708806265&dur=179.374&fexp=9408213,9408710,9413137,9414764,9416126,9416729,9417707,9418185,9418203,9418401,9419444,9420309,9420328,9420629,9420931,9422114&sver=3&signature=656E24F2DDBD5CC2C94D8394221A061C4DD48969.5C950417E22C114C89B24F8B83D3C98F13210273&upn=2PNqq92pvs8&mt=1445230996&key=dg_yt0&ip=104.155.18.208&ipbits=0&expire=1445252624&sparams=ip,ipbits,expire,id,itag,source,requiressl,pl,gcr,mm,mn,ms,mv,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: Batista vs Undertaker - TLC 2009 - Highlights HD-lOSe5SkMCOs.f141.m4a
[download] 100% of 5.45MiB in 00:00
[ffmpeg] Merging formats into "Batista vs Undertaker - TLC 2009 - Highlights HD-lOSe5SkMCOs.mp4"
[debug] ffmpeg command line: ffmpeg -y -i 'file:Batista vs Undertaker - TLC 2009 - Highlights HD-lOSe5SkMCOs.f136.mp4' -i 'file:Batista vs Undertaker - TLC 2009 - Highlights HD-lOSe5SkMCOs.f141.m4a' -c copy -map 0✌️0 -map 1🅰️0 'file:Batista vs Undertaker - TLC 2009 - Highlights HD-lOSe5SkMCOs.temp.mp4'
Deleting original file Batista vs Undertaker - TLC 2009 - Highlights HD-lOSe5SkMCOs.f136.mp4 (pass -k to keep)
Deleting original file Batista vs Undertaker - TLC 2009 - Highlights HD-lOSe5SkMCOs.f141.m4a (pass -k to keep)
////////////////////////////////////////////////////
2. Most stream url work in html player but some do not work.
Here is working stream url.
link:www.youtube.com/watch?v=pU9Q6oiQNd0
stream url
https://r5---sn-25g7sne7.googlevideo.com/videoplayback?expire=1445250199&ipbits=0&mm=31&itag=18&ratebypass=yes&requiressl=yes&lmt=1429964183493638&signature=158C27A2F8C975D7A68662C3A9C1A7C01D7D8142.E2F8486C3D4D7F546CB9392E410198BE2054838D&mime=video%2Fmp4&pl=20&id=o-AEKWngfOny_L35xBT4q-B1VcBnIOemcMpYYGR1VsuuJF&dur=784.648&sver=3&mt=1445228497&ms=au&mv=m&source=youtube&sparams=dur%2Cid%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&fexp=9406012%2C9408710%2C9409207%2C9414764%2C9414875%2C9416126%2C9416729%2C9417707%2C9418401%2C9418702%2C9419063%2C9419444%2C9419838%2C9421253%2C9422339%2C9422562&mn=sn-25g7sne7&ip=104.155.18.208&key=yt6&upn=f7kZ2lPoDso

Because In my country youtube is blocked.
so in above stream url, i have to change "googlevideo" with "c.docs.google" and i put this change url in html5/videosjs player and the video starts to play without using vpn like hotspotsheild.
But some stream url do not work.
Not working stream url.
link:www.youtube.com/watch?v=lOSe5SkMCOs
stream url:
https://r6---sn-25g7snee.googlevideo.com/videoplaybackrequiressl=yes&ms=au&mt=1445231321&mv=m&pl=20&id=o-APNZ055KLjGkSwVVArlkNlLpqKm7ZArNo9Jeh1ZA4_Y&dur=179.374&mime=video%2Fmp4&sparams=dur%2Cgcr%2Cid%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&ip=104.155.18.208&mm=31&mn=sn-25g7snee&fexp=9406714%2C9407002%2C9408501%2C9408710%2C9414736%2C9414764%2C9415435%2C9415515%2C9416126%2C9416729%2C9417707%2C9419343%2C9420540%2C9421339%2C9421913%2C9422768&itag=18&lmt=1429876782231859&ipbits=0&ratebypass=yes&upn=XfZY-lqRF9k&gcr=us&source=youtube&signature=C3F83C156733DD63C57F7E64AFFBE6D774F2E1C8.14AACC48C9B893EE95908941505D42F2F0E80345&sver=3&key=yt6&expire=1445252993

For this stream url i tried the above method i.e. i relaced "googlevideo" with "c.docs.google" and put this changed url in html5/videojs player but this does not play the video and the error is 403 forbidden. This stream url work by using vpn like hotspot sheild only.
So, Why stream url for some videos does not work using without using vpn ?
How can I play these not working stream url witout using vpn?

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Oct 19, 2015

How can I play these not working stream url witout using vpn?

If your browser can't play the video from the YouTube page, there's nothing youtube-dl can do (keep in mind that we reproduce what the browser does, so we can't support modifying the video url).

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