tags:

views:

31

answers:

2

I want simple PHP class or function to return the URL of the FLV video from a page on YouTube to use this URL in another FLV player to play the video in my own player not with default YouTube player.

+1  A: 

There is a CLI program called youtube-dl that does something similar. You pass it an URL and it will download the FLV for you. I'd have a look at the sources (it should be open source) and see how they do it. Python should be fairly easy to translate to php.

Also perhaps you can find their specification faster. I'd start looking at their support page - you'll find a link to the API definition there.

bitmask
here goes the link http://bitbucket.org/rg3/youtube-dl/wiki/Home
Joe Hopfgartner
A: 

I would be careful with this, and check the youtube TOS first. If you use their bandwidth for videos on your site, and strip out their player, you may find your site suddenly blocked, or you might get a letter from Google's lawyers.

Ryan Gooler
this should go into a comment
Joe Hopfgartner