Youtube blocking mp4's?
|
Anya Ristow
Vengeance Studio
Join date: 21 Sep 2006
Posts: 1,243
|
04-04-2009 20:02
Seems a lot of youtube players are broken. Some outside services that provide an mp4 link are also broken. Ron Khondji provided a php script he says is still working: /327/04/315043/1.html#post2380179That script works from my desktop but not from my web server. I needed to change it a bit to get it to run (replace fopen/fgets with curl), and the modified version also works from my desktop, but not from my web server. Here's my modified version: <?PHP /* input = "nRGnDxqVdZQ" (YouTube video id)
output = "http://www.youtube.com/get_video?video_id=nRGnDxqVdZQ&t=OEgsToPDskKbDYZCzvvEY6P-is0Z3r5G&fmt=18" (YouTube mp4 url)
Only signature 't' changes with each call on YouTube. */
if(isset($_GET["video"])) { $url = "http://www.youtube.com/watch?v=" . trim($_GET["video"]);
$len = strlen($url); $video_id = substr($url,31,$len-31);
$userAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1"; $ch = curl_init(); curl_setopt( $ch, CURLOPT_USERAGENT, $userAgent); curl_setopt( $ch, CURLOPT_URL, $url); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true); $html = curl_exec( $ch); if ( !$html) { echo "<br />cURL error number:" . curl_errno( $ch); echo "<br />cURL error:" . curl_error( $ch); exit; }
$swfArgs = strstr($html,"var swfArgs"); $start = strstr($swfArgs,'"t":'); $end = strpos($start,","); $sig = substr($start,0,$end); $t = substr($sig,6,-1);
$URL = "http://www.youtube.com/get_video?video_id=" . $video_id . "&t=" . $t . "&fmt=18"; echo $URL; } else echo "No video URL posted!"; ?>
The copy on my webserver returns strings that are the same length and form as the ones returned from my desktop, but the former don't work as media URLs. SL doesn't recognize them as mp4's. Can anyone get this to work on a web server somewhere? To use it, give it a "video" parameter, like this... www.yourhost.com/youtube2mp4.php?video=nRGnDxqVdZQNote that this usage also differs from Ron's script. It should return a URL you can paste into the media dialog in SL. It looks to me like youtube is returning bogus keys if it doesn't like the source of the request, but I have no clue how it's differentiating a call from my desktop from a call from my webserver.
_____________________
The Vengeance Studio Gadget Store is closed! 
|
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
|
04-04-2009 21:32
My inworld youtube TV player (based on Day Oh's youtube player) also is busted at this time...
Kind of ironic, because for the last week I've been working on furnishing out my theatre.
_____________________
 ● Inworld Store: http://slurl.eclectic-randomness.com ● Website: http://www.eclectic-randomness.com ● Twitter: @WinterVentura
|
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
|
04-04-2009 21:58
|
Keira Wells
Blender Sculptor
Join date: 16 Mar 2008
Posts: 2,371
|
04-04-2009 22:03
Ignore this post
_____________________
Tutorials for Sculpties using Blender! Http://www.youtube.com/user/BlenderSL
|
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
|
04-04-2009 22:11
From: Sindy Tsure Are y'all in the UK?? no
_____________________
 ● Inworld Store: http://slurl.eclectic-randomness.com ● Website: http://www.eclectic-randomness.com ● Twitter: @WinterVentura
|
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
|
04-04-2009 22:43
Hm.. Yeah.. Guess that wouldn't make sense with the OPs stuff working locally but not thru a webserver.
/me wonders if it's somehow related anyway..
|
ElQ Homewood
Sleeps Professionally
Join date: 25 Apr 2007
Posts: 280
|
04-05-2009 05:37
yeah, I'm having the same problem inworld, but was assuming it was the same as my requests that were getting blocked last week, the problem was that one of SL's IPs was being blocked at the receiving end, actually inadvertently. Doesn't seem to be the case here though, because we are all having the problem, and we're not all on the same server. Can't find anything yet in the forums over at YouTube either, still looking though..
Edit = Okay, I've got mine working again, I guess they've changed the entire hash setup or whatever, but each time I've gotten the qt url and used the new one inworld, it works now. The old ones still don't work.
|
Phonema Pelous
Registered User
Join date: 19 Aug 2007
Posts: 11
|
Did you have found a solution ?
04-05-2009 12:20
Could you share your solution ? Thank you
|
ElQ Homewood
Sleeps Professionally
Join date: 25 Apr 2007
Posts: 280
|
04-06-2009 02:35
From: Phonema Pelous Could you share your solution ? Thank you Yeah, I just went to YT and got the new URLs..they are different from the other ones that worked before, so my assumption is they changed something in the coding of it or whatever, they just didn't bother to tell anybody lol..I also noticed that the inworld quality of the videos now is better than before.
|
Marianne McCann
Feted Inner Child
Join date: 23 Feb 2006
Posts: 7,145
|
04-06-2009 14:17
From: ElQ Homewood Yeah, I just went to YT and got the new URLs..they are different from the other ones that worked before, so my assumption is they changed something in the coding of it or whatever, they just didn't bother to tell anybody lol..I also noticed that the inworld quality of the videos now is better than before. In what way do the URLs differ? Have an example?
_____________________
  "There's nothing objectionable nor illegal in having a child-like avatar in itself and we must assume innocence until proof of the contrary." - Lewis PR Linden "If you find children offensive, you're gonna have trouble in this world  " - Prospero Linden
|
Phonema Pelous
Registered User
Join date: 19 Aug 2007
Posts: 11
|
HASH calculating changed
04-06-2009 16:29
From: Marianne McCann In what way do the URLs differ? Have an example? The difference is in the HASH calculation. BEFORE YT calculate the HASH of mp4 link WITHOUT considering the IP where the request coming from. NOW YT STILL USE the IP where request coming from to calculate the HASH. Take as example this YouTube link : http://www.youtube.com/watch?v=glEBYFsz7mcfrom my machine and from my IP the mp4 link will be http://www.youtube.com/get_video?fmt=18&video_id=glEBYFsz7mc&t=vjVQa1PpcFPyx888SCmD9FjnIUXa4XDm9QnwBIEzm9A=form a machine located in USA the mp4 link is http://www.youtube.com/get_video?fmt=18&video_id=glEBYFsz7mc&t=vjVQa1PpcFMNVAR-i4o9DkaPrp1MW2AEzV6RiqFZWVc=the hash is the part after t= My IP t=vjVQa1PpcFPyx888SCmD9FjnIUXa4XDm9QnwBIEzm9A= USA IP t=vjVQa1PpcFMNVAR-i4o9DkaPrp1MW2AEzV6RiqFZWVc= The request comes from the same time but the HASH is different. What mean ? When you set parcel to mp4 ONLY the IP who request the link could be decode the HASH beacouse the IP is used to calculate the hash. In my case i WILL NEVER SEE the link request from the USA beacouse YouTube calculate the HASH from MY IP but the HASH was codified using the USA IP : for this motivation HASH could not to be resolved, the keys are NOT equal. For the same reason USA machine could NOT decode my mp4 link. BEFORE the IP address WAS NOT used to calculate the HASH that could be used from everybody in the world. NOW this is no more possible and the YouTube SL TV used this method WILL NEVER LONGER WORK... Damned........
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
04-06-2009 16:41
is the hash different if you grab it for the embed code? obviously they aren't going to want to disable embedding in other webpages... if nothing else this should give a proxy server enough to use for anyone...
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
Phonema Pelous
Registered User
Join date: 19 Aug 2007
Posts: 11
|
04-06-2009 17:16
From: Void Singer is the hash different if you grab it for the embed code? obviously they aren't going to want to disable embedding in other webpages... if nothing else this should give a proxy server enough to use for anyone... In the embedde code the IP address still appear and if you manually change DOESN'T WORK. Restoring the IP , the mp4 file is yours. Using a proxy server is not a solution. Everybody inworld to see the video must set the proxy address in QuickTime. Wich machine could be a proxy server for 10 or more avatar who requesting streaming video ? Teorically it works, but is absolutely not for the masses. There's actually A UNIQUE solution : (1) You need a server (2) server retrieve from youtube the mp4 video and store in HIS HDD (3) a script set the parcel media URL to YOUR server specifically to the MP4 files retrieved from YouTube. In this case your streaming DO NOT COMES from YouTube but from your server and this may be exceed often your bandwidth limit... Youtube 'stard.....
|
ElQ Homewood
Sleeps Professionally
Join date: 25 Apr 2007
Posts: 280
|
04-07-2009 02:51
yeah, I have just seen this..this is a problem
|
Molly Montale
Blumfielder
Join date: 3 Nov 2005
Posts: 80
|
04-07-2009 07:26
Cuppycake, community manager of MetaPlace, acknowledges that Youtubes are broken there, too.
YouTube Video Player Down on 4/3/2009 at 6:59 pm Hey everyone, We're experiencing an issue with YouTube videos, and the behavior is not working. We will be working on getting this resolved, but the YouTube behavior will be broken until we update this thread.
Re: YouTube Video Player Dow non 4/6/2009 at 3:38 pm Update: We are working on resolving our issues with YouTube. Basically, what occured is that YouTube has changed the way their video hosting service worked which caused our code to stop working. We're in the process of fixing this and will be implementing their standard player as a result. We're working on having this fixed up by the end of the week. We apologize for the inconvenience.
|
Sylvio Runo
Software Engineer
Join date: 14 Apr 2008
Posts: 12
|
Youtube working better than ever
04-07-2009 12:33
Sorry, but the YouTube works better than ever. Youtube didnt block any video type, only changed the way to access them. You can watch YouTube videos on this address: http://slurl.com/secondlife/NHC/128/128/29/ and try our service : NHC MEDIA CENTER. Have a nice day 
|
Anya Ristow
Vengeance Studio
Join date: 21 Sep 2006
Posts: 1,243
|
04-07-2009 13:47
From: Sylvio Runo Sorry, but the YouTube works better than ever. Youtube didnt block any video type, only changed the way to access them. You can watch YouTube videos on this address: http://slurl.com/secondlife/NHC/128/128/29/ and try our service : NHC MEDIA CENTER. Have a nice day  Are you sure about that? You might want to try it signed in as an alt. It didn't work for me. BTW, this forum is called "scripting tips". Generally it's for asking questions and giving answers about scripting. Unhelpful "Nanner nanner nanner" posts don't really belong, and ads go in the new products forum. Thanks.
_____________________
The Vengeance Studio Gadget Store is closed! 
|
Sylvio Runo
Software Engineer
Join date: 14 Apr 2008
Posts: 12
|
04-07-2009 14:00
From: Anya Ristow Are you sure about that? You might want to try it signed in as an alt. It didn't work for me. BTW, this forum is called "scripting tips". Generally it's for asking questions and giving answers about scripting. Unhelpful "Nanner nanner nanner" posts don't really belong, and ads go in the new products forum. Thanks. Yes, i am sure about this, and works like a charm  Here is my TIP : Youtube didnt block any video type, only changed the way to access them.
|
Anya Ristow
Vengeance Studio
Join date: 21 Sep 2006
Posts: 1,243
|
04-07-2009 14:00
Has anyone made any progress they want to share? In the RA thread it was suggested that the "real" URL is some cache domain address with lots of encoding strings. Does anyone know how to create those or intercept the forwarding?
My current understanding is that a non-SL server must take the video html URL and create a new URL from the info in the html, but that *that* URL is not the final destination. Furthermore, the "real" URL contains hashing based on the non-SL server's IP address, and it won't work for the user even if we manage to get the "real" URL.
Anyone pursuing any promising techniques?
_____________________
The Vengeance Studio Gadget Store is closed! 
|
Anya Ristow
Vengeance Studio
Join date: 21 Sep 2006
Posts: 1,243
|
04-07-2009 14:02
Grow up, Sylvio. If you have nothing to contribute, please keep it to yourself.
_____________________
The Vengeance Studio Gadget Store is closed! 
|
Anya Ristow
Vengeance Studio
Join date: 21 Sep 2006
Posts: 1,243
|
Need in-world help testing now
04-08-2009 07:48
From: Anya Ristow Has anyone made any progress they want to share? In the RA thread it was suggested that the "real" URL is some cache domain address with lots of encoding strings. Does anyone know how to create those or intercept the forwarding? I found an answer to this. Use opera to view the video in mp4 form, like this... http://www.youtube.com/watch?v=kIf2l_UMLYk&fmt=18The "fmt=18" forces it to use an mp4 rather than flv. Now Tools -> Advanced -> Cache. At the top of the list will be the URL of the mp4 file. It will contain your IP address. There is some disagreement about whether the IP address restricts who can view it. To test that, IM me in-world soon so I can TP you and you can see if you can view the video on my parcel.
_____________________
The Vengeance Studio Gadget Store is closed! 
|
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
|
04-08-2009 08:15
Well okay... I'm testing a new script that seems to work, you can grab a tv for free here if you want to give ti a shot  The listing says the first 10 are free, but in reality I'm gonna head to bed and not sweat it
|
Anya Ristow
Vengeance Studio
Join date: 21 Sep 2006
Posts: 1,243
|
04-08-2009 08:20
Day, Oh, your TV plays the video I've already set for the parcel, but it doesn't change it to anything else. Yes, I've deeded it.
What is it supposed to do?
_____________________
The Vengeance Studio Gadget Store is closed! 
|
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
|
04-08-2009 08:25
From: Anya Ristow Day, Oh, your TV plays the video I've already set for the parcel, but it doesn't change it to anything else. Yes, I've deeded it.
What is it supposed to do? Just paste url's in chat, e.g. http://www.youtube.com/watch?v=Yr09fYxQXMU
|
Anya Ristow
Vengeance Studio
Join date: 21 Sep 2006
Posts: 1,243
|
04-08-2009 08:31
Okay, I figured that out. It works. Are you willing to share how you did it?
_____________________
The Vengeance Studio Gadget Store is closed! 
|