llelectronics / videoPlayer

Video player for sailfish os
27 stars 19 forks source link

YouTube : "Ressource Error" on signed copyrighted videos. #6

Closed sebma closed 8 years ago

sebma commented 8 years ago

Hi,

I get a "Ressource Error:

Forbidden The video cannot be played ......" on that stream : https://www.youtube.com/watch?v=OjKssG-YniM.

You can search for : "you are the one don moen"

I can play that stream with Jolla browser or WebCat without being logged in on Youtube.

Can you try and fix this ?

llelectronics commented 8 years ago

I get the same error when trying it in webcat aswell. It has to do with the signature and copyrighted videos. They use different cipher and deciphering methods embedded into the js html5 player of youtube. (which can be different for every video) I found some old deciphering methods but nothing that can decipher this. Youtube-dl also failed for me. I am not sure how to provide a solution for it currently

sebma commented 8 years ago

Hi, Here's what I have on my Jolla (SailFish OS 2.0.0.10) : (yes my PS1 variable takes two lines :) )

nemo @ Jolla : ~ $ youtube-dl --version 2016.04.19 nemo @ Jolla : ~ $ youtube-dl -g https://www.youtube.com/watch?v=OjKssG-YniM https://r5---sn-25ge7nez.googlevideo.com/videoplayback?sver=3&expire=1461780258&ms=au&clen=1189016&mv=m&mt=1461758555&keepalive=yes&mn=sn-25ge7nez&mm=31&requiressl=yes&nh=IgpwcjAxLnBhcjEwKgkxMjcuMC4wLjE&pl=21&source=youtube&initcwndbps=952500&gir=yes&fexp=9406993%2C9408207%2C9416126%2C9416891%2C9416985%2C9419451%2C9422596%2C9428398%2C9428767%2C9431012%2C9431522%2C9431619%2C9431672%2C9431865%2C9432683%2C9433096%2C9433192%2C9433276%2C9433946%2C9434011%2C9434290%2C9434397%2C9434495%2C9434745&sparams=clen%2Cdur%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cnh%2Cpl%2Crequiressl%2Csource%2Cupn%2Cexpire&upn=Kfzl8x9gAkQ&mime=video%2Fmp4&id=o-AJgGGeeVBP939PCbALRCIX6YK4DeaM-MbhdS-qRPvtgO&itag=135&dur=197.934&ipbits=0&lmt=1395497236193616&key=yt6&ip=128.78.236.200&signature=DFBC65A91E790E9C7D83C549032748BB772832BF.8D86A89AF4875A423B8D3ED9CC0E519256C8B014&ratebypass=yes https://r5---sn-25ge7nez.googlevideo.com/videoplayback?sver=3&expire=1461780258&ms=au&clen=4056103&mv=m&mt=1461758555&keepalive=yes&mn=sn-25ge7nez&mm=31&requiressl=yes&nh=IgpwcjAxLnBhcjEwKgkxMjcuMC4wLjE&pl=21&source=youtube&initcwndbps=952500&gir=yes&fexp=9406993%2C9408207%2C9416126%2C9416891%2C9416985%2C9419451%2C9422596%2C9428398%2C9428767%2C9431012%2C9431522%2C9431619%2C9431672%2C9431865%2C9432683%2C9433096%2C9433192%2C9433276%2C9433946%2C9434011%2C9434290%2C9434397%2C9434495%2C9434745&sparams=clen%2Cdur%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cnh%2Cpl%2Crequiressl%2Csource%2Cupn%2Cexpire&upn=Kfzl8x9gAkQ&mime=audio%2Fwebm&id=o-AJgGGeeVBP939PCbALRCIX6YK4DeaM-MbhdS-qRPvtgO&itag=251&dur=198.021&ipbits=0&lmt=1421660010430141&key=yt6&ip=128.78.236.200&signature=868C2AD4217D05D019BF994A47CCB75D25826AB0.A584DBC7FFFABF426B891816FFC100E8E23DBF69&ratebypass=yes

llelectronics commented 8 years ago

None of those seem to work though. I get a 403 on both

sebma commented 8 years ago

nemo @ Jolla : ~ $ rpm -qa | grep -i webcat harbour-webcat-2.2.1-1.armv7hl

sebma commented 8 years ago

What device and OS version do you have ?

llelectronics commented 8 years ago

It has nothing to do with the OS version or device. (I have a Jolla Phone running SailfishOS 2.0.1.7) Like I said its a youtube thing to block out 3rd parties

sebma commented 8 years ago

Ok. Just trying to help figure out why :)

I have installed your application and webcat from Openrepos:

nemo @ Jolla : ~
$ rpm -qa | grep -i videoplayer
harbour-videoPlayer-1.2-1.armv7hl

It could depend on your youtube-dl version or from the country you make the request.

sebma commented 8 years ago

I've installed youtube-dl from Openrepos as well:

nemo @ Jolla : ~
$ rpm -qa | grep -i youtube-dl
youtube-dl-2016.04.19-1.21.1.armv7hl

What release of webcat do you have ?

llelectronics commented 8 years ago

Yes it might have to do with the country you are from. Youtube is known for geoblocking. Thats the only reason it works for you in webcat (I guess cookies are saved there with your location information) as webcat shares the yt.js library for getting the video streams with LLs Video Player.

As I explained already the signature cipher needs to be decyphered. As every protected video like this uses a different html5 js player and thus a different deciphering function I have absolutely no idea currently how to make those videos play. (in webcat or in lls video player for that matter) The video btw. works fine for me in the Sailfish-Browser which has native html5 audio & video support and so is able to use the html5 players js deciphering function.

sebma commented 8 years ago

But If my webcat can find the stream and play the video (I'm in France btw), why then does LLs Video Player not, if they share the same yt.js library ?

llelectronics commented 8 years ago

It finds the same stream. Though the access to the stream is blocked (403 Forbidden) Webcat might have the right cookies (from your youtube login) and so the player is able to open the stream using the same networkaccessManager as the webview.

sebma commented 8 years ago

I never ever entered any youtube credentials on my Jolla.

sebma commented 8 years ago

Sorry, I gave you the wrong adress btw, it is : https://www.youtube.com/watch?v=aaTM85U5JOo which works on webcat.

sebma commented 8 years ago

I was a bit tired last night what I open the issue, sorry.

llelectronics commented 8 years ago

Ok I will recheck that then. Might be a different issue for that then. As for youtube even without entering any credentials cookies are loaded and stored.

sebma commented 8 years ago

I must have been dreaming, webcat can't read this stream either. Only Jolla's browser can.

But on the youtube credentials part, I'm sure I never entered any on my Jolla device.

Maybe this problem is related to "cross-domain requests", because qt5webkit browsers such as webcat (or QupZilla 1.x) cannot do, example:

https://github.com/QupZilla/qupzilla/issues/1821

llelectronics commented 8 years ago

Yeah ok then it seems to be the same problem. Forbidden 403 is what I get. As for the problem itself as I said I know what the problem is. I just don't know how to address this as it is a complicated ciphering and deciphering issue. It has nothing to do with cross domain requests (this is another issue for embedded video players especially)

sebma commented 8 years ago

I have just noticed you are also the developper for webcat, so you DO know what you're talking about :)

sebma commented 8 years ago

And of other applications, that I'm going to install right away: 3ncode and mimer.

Sorry to have wasted your time.

Can you change the error message ("Ressource Error ...") to something like: "Cannot play signed copyrighted videos" ?

Thanks man, keep up the good work.

llelectronics commented 8 years ago

I decided to close this as wontfix as I have more precious time and don't want to deal with ciphers anymore.