0
votes

I want to play youtube videos on my website in a simple video tag. I am able to to extract encoded url of video from the video page source and IDM download video perfectly from the extracted URL, but when I provide this URL as a source to HTML5video` tag it's unable to play it. I am building my site in PHP so is there any programming tricks that can solve the problem?

The extracted url looks like this:

https://r4---sn-p5qlsns6.googlevideo.com/videoplayback?source=youtube&pl=19&ipbits=0&expire=1432153664&ip=39.32.249.193&id=o-AEEupYK88pgG4gIQsJWYzKaY0HIlq_OL_cBhQIkv6HjX&clen=28144129&lmt=1431757350238974&dur=127.327&requiressl=yes&fexp=906394,936120,9405194,9406003,9407806,9408142,9408589,9408705,9408710,9408734,9409172,9410706,9413005,9413148,945137,948124,952612,952637,952642&key=cms1&mime=video/mp4&gir=yes&upn=-2WTH-cn9eI&keepalive=yes&itag=136&signature=24A201BFCD6635313FEEB3F24C5221E64BDD00B9.6323BECAF51F631BE8E5043FFB41DD7EFAB0A009&sparams=clen,dur,expire,gir,id,ip,ipbits,itag,keepalive,lmt,mime,mm,mn,ms,mv,nh,pl,requiressl,source,upn&sver=3&redirect_counter=1&req_id=6e9a47dec8a4a3ee&cms_redirect=yes&mm=30&mn=sn-p5qlsns6&ms=nxu&mt=1432132295&mv=m&nh=IgpwcjAxLmlhZDA3KgkxMjcuMC4wLjE

1
There is an parameter ip and a parameter expire. Would not work as wished I think. - Richard
Maybe you know this already, but youtube provides a way the embed video, it might help. - Mostrapotski
It has been some time and I don't know if you solved your problem, but try replacing "googlevideo.com" with "c.docs.google.com" - Pancake_M0nster

1 Answers

-1
votes

Use Media Element Js and you can treat the embedded youtube as an html5 element. Actually taking the video source and putting it into a new player is against youtube's terms of service, but this fix should allow you to do everything (except remove youtube's branding, which they do not want).