Home > Flash and Actionscript, Macromedia Flex > Constructing YouTube FLV URL on client-side without any server-side script

Constructing YouTube FLV URL on client-side without any server-side script

It seems, there is a easier way of constructing YouTube! FLV URL on client-side without using any server-side script.

We need get the YouTube video_id from any of following places:-

Then, construct a URL like this: http://www.youtube.com/v/V3BsjxDZJM0

Above URL is used in YouTube embed-code. It is basically a server-side redirection that points to YouTube Player (.swf). Above redirects (server-side) to following URL:-
http://www.youtube.com/p.swf?video_id=V3BsjxDZJM0&eurl=&iurl=http%3A//sjc-
static12.sjc.youtube.com/vi/V3BsjxDZJM0/2.jpg&t=OEgsToPDskKzlTMEFZ1jOh40Xc3qOxzQ

As you can see in above URL, it contains “t” param (in red), which is what we need along with video_id to construct YouTube video (FLV) URL, YouTube FLV URL would look like this:-
http://www.youtube.com/get_video.php?video_id=V3BsjxDZJM0&
t=OEgsToPDskKzlTMEFZ1jOh40Xc3qOxzQ

You can check out code below to figure out things your own. You can also check out the example-app.

Flex 2.0/ActionScript 3.0 example:-


<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="onAppCreationComplete ()"
horizontalAlign="left"
width="800"
height="350">
<mx:Script>
<![CDATA[
import flash.net.*;
import flash.events.*;
import flash.display.*;
private var loader:Loader;
private var abortId:uint;
private function onAppCreationComplete ():void
{
loader = new Loader ();
}
private function startLoading ():void
{
var req:URLRequest = new URLRequest ("http://www.youtube.com/v/3IcwG0jUFxU");
loader.contentLoaderInfo.addEventListener(Event.INIT, handlerLoaderInit);
loader.load(req);
logMessage ("Loading YouTube URL..");
}
private function handlerLoaderInit (event:Event):void
{
logMessage ("Loaded, processing: " + loader.contentLoaderInfo.url);
var urlVars:URLVariables = new URLVariables ();
urlVars.decode (loader.contentLoaderInfo.url.split("?")[1]);
logMessage ("Processed:-");
logMessage ("\t\t video_id:" + urlVars.video_id);
logMessage ("\t\t t param:" + urlVars.t);
logMessage ("\t\t thumbnail-url:" + urlVars.iurl);
var flvURL:String = constructFLVURL (urlVars.video_id, urlVars.t);
logMessage ("YouTube FLV URL: " + flvURL);
playVideo (flvURL);
logMessage ("Started Playing Video...");
loader.unload();
}
private function constructFLVURL (video_id:String, t:String):String
{
var str:String = "http://www.youtube.com/get_video.php?";
str += "video_id=" + video_id;
str += "&t=" + t;
return str;
}
private function playVideo (url:String):void
{
player.source = url;
player.play();
}
private function logMessage (message:String):void
{
outputText.text += message + "\n";
trace (message);
}
]]>
</mx:Script>
<mx:HBox width="100%">
<mx:Label text="YouTube Video URL:"/>
<mx:TextInput id="urlText" width="300"/>
<mx:Button label="Submit" click="startLoading ()" id="submitButton"/>
</mx:HBox>
<mx:HBox width="100%">
<mx:VBox height="100%">
<mx:Label text="VideoDisplay:"/>
<mx:VideoDisplay width="320" height="240" id="player"/>
</mx:VBox>
<mx:VBox height="100%" width="100%">
<mx:Label text="Output:-"/>
<mx:TextArea id="outputText" width="100%" height="100%"/>
</mx:VBox>
</mx:HBox>
</mx:Application>

ActionScript 2.0 code-snippet:-


createEmptyMovieClip ("mc", getNextHighestDepth ());
var _mcl:MovieClipLoader = new MovieClipLoader ();
_mclListener = new Object ();
_mclListener.onLoadStart = function (target:MovieClip)
{
trace ("The URL is: " + target._url);
var _lv:LoadVars = new LoadVars ();
_lv.decode (target._url.split ("?")[1]);
trace ("t param: " + _lv.t);
trace ("video_id: " + _lv.video_id);
trace ("thumbnail: " + _lv.iurl);
trace ("flv url: " + constructFLVURL (_lv.video_id, _lv.t));
_mcl.unloadClip (target);
};
function constructFLVURL (videoId:String, t:String):String
{
var str:String = "http://www.youtube.com/get_video.php?";
str += "video_id=" + videoId;
str += "&t=" + t;
return str;
}
_mcl.addListener (_mclListener);
_mcl.loadClip ("http://www.youtube.com/v/3IcwG0jUFxU", mc);

 [1] Flash clients would require server-side proxy because YouTube changed crossdomain.xml sometimes back.

  • kbsdkz
    as3 example works fine :)
    is it possible to run AS2 code with video playback component : myVideoPlayback.contentPath = constructFLVURL (_lv.video_id, _lv.t)?
  • simply brilliant, but can´t be done a function that does everything with one?


    I have modified this so that she takes "target" but, since everything could be made simultaneously?


    createEmptyMovieClip ("mc", getNextHighestDepth ());

    var _mcl:MovieClipLoader = new MovieClipLoader ();
    _mclListener = new Object ();


    _mcl.addListener (_mclListener);


    _mcl.loadClip ("http://www.youtube.com/v/3IcwG0jUFxU", mc);




    _mclListener.onLoadStart = function (target:MovieClip){


    trace ("flv url: " + constructFLVURL (target));


    salida = "oeeeoeoeoeoe: " + constructFLVURL (target);


    _mcl.unloadClip (target);


    };





    //My Modification
    function constructFLVURL (dir):String {


    var _lv:LoadVars = new LoadVars ();


    _lv.decode (dir._url.split ("?")[1]);


    trace ("The URL is: " + target._url);


    trace ("t param: " + _lv.t);


    trace ("video_id: " + _lv.video_id);


    trace ("thumbnail: " + _lv.iurl);


    var str:String = "http://www.youtube.com/get_video.php?" + "video_id=" + _lv.videoId + "&t;=" + _lv.t;


    return str;


    }



  • NeWbY
    It works if you open it from your harddisk, but when I load it from the internet, the values are undefined?
    Also, could you post the source so I (and possible other people) can see how you did it?
    Thanks.
  • I'm using your AS2 example and I can't get the video to load into flash. If I understand your article, I'm supposed to use a PHP proxy for this, but I haven't found one that works. (I tried this one but didn't have any luck) Any help to point me in the right direction is greatly appreciated.
    ..k..
  • @NeWbY: It works online, I checked it...
    You can see the working example: http://www.abdulqabiz.com/files/YouTube_Client_...
    Source for this example is already in this page, check out the post above.
    @Kyle: You don't need a php-proxy if you use the approach mentioned in this post. You can see a working AS2 example here:
    http://www.abdulqabiz.com/files/YouTube_Client_...
    Fla file: http://www.abdulqabiz.com/files/YouTube_Client_...
    Hope that helps...
    -abdul
  • NeWbY
    The working example uses Flex, and apparently that works normally. But using the AS2 code still does not work.
    The example you posted above (youtube_flv_url_test_as2.*) both return 'undefined' (for the parameters) to me when I run it, no matter if I run it from your website, my harddisk or localhost.
    Might be just me that I don't understand the concept though, but I'd be happy when it works here :)
  • @NeWbY:
    Thanks, I just noticed it doesn't work for IE for some reason.. I would check it out..
    I am running it FireFox 2.x and it works fine for me... I think, it should work for you also..
    I got confirmation from a friend that it works for her also..
    Thanks
    -abdul
  • NeWbY
    Could it be that IE only returns 'http://www.youtube.com/v/3IcwG0jUFxU' to the swf file, because thats the actual URL and doesnt waits for the redirect or something?
  • Hey Abdul,
    Thanks for responding :) I can confirm that it DOES work in FireFox 2.x as well as Opera 9. Here's a screenshot of all 3 browsers.
    I ended up using a php proxy, but only because my project required the use of Zinc, which forces you to use IE as the default web browser engine... which has the problems mentioned above.
    Best,
    ..k..
  • Has anyone had luck yet with Internet Explorer and this approach or am I stuck relying on my server side logic to give me my flv stream uri.
    So it seems YouTube will provide the video id and 't' code for videos when requesting by tag (REST api), but they don't have an api call one can use to simply convert a youtube video url, to flv stream url? Seems like that would help everyone out of hacking around (coupled with a reasonable terms of use perhaps)...
    In my particular use case, I wouldn't mind embedding YouTube's stock player, however there is no reliable way (it seems) in Flash to pull the plug on YouTube's NetStream instance. e.g. after embedding their player inside another SWF - when it comes time to unloadClip/removeMovieClip, the audio stream continues. So I'm stuck rendering the flv directly as others are doing on this thread.
  • Pete
    @Corey > I had a look at the youtube player, you stop the audio stream (for example, before loading a new movie into your player) by simply using flash's sound class.
    var soundController:Sound = new Sound();
    soundController.stop();
  • Unfortunately it doesn't appear to be that simple. I use the MovieClipLoader so that I can reliably downscale the YouTube player. But once I do that, I run into this documented issue with the stream not being destroyed properly:
    (http://www.adobe.com/cfusion/knowledgebase/inde...)
    And when using a straight loadMovie, the Sound object does in fact stop playing stream, but within Firefox (MAC at least), attempting to replay the same exact video again in the same session is problematic -- the video, (even upon restarting Firefox) refuses to stream, and will only play again after fully downloading.
    Nothing can ever be simple these days (nor bug free).
    If you have any suggestions feel free to drop me a message on my blog and I'll get back to you. Otherwise, apologies for the off topic digression.
  • Andy
    I cant play video in your AS2 example.
    and is it your YouTubeClientSideDemoFlex is done by flash cs3 or flash 8
  • Andy
    i cannot play video in AS2, its always apper this error:
    *** Security Sandbox Violation ***
    SecurityDomain 'http://www.youtube.com/p.swf?video_id=3IcwG0jUFxU&eurl;=http%3A//www.youtube.com/v/3IcwG0jUFxU&iurl;=http%3A//img.youtube.com/vi/3IcwG0jUFxU/2.jpg&t;=OEgsToPDskJRMVlkIy0HLHFpn8x3JaKu' tried to access incompatible context 'file:///C|/Users/AnDY/Desktop/youtube%5Fflv%5Furl%5Ftest%5Fas2.swf'
  • Dow
    Hey Abdul,
    Thanks for your AS2 code, I was finally able to get it working displaying Youtube videos. Muchos Gracias! (Using Firefox 1.5.0.11 on XP for those whom stated had trouble)
    I did have a question though. How difficult would it be to modify this AS2 code to stream other video flv like Revver, Bliptv, and maybe eventually Joost etc.?
  • Dow
    Hey Abdul,
    Thanks for your AS2 code, I was finally able to get it working displaying Youtube videos. Muchos Gracias! (Using Firefox 1.5.0.11 on XP for those whom stated had trouble)
    I did have a question though. How difficult would it be to modify this AS2 code to stream other video flv like Revver, Bliptv, and maybe eventually Joost etc.?
  • > I did have a question though. How difficult would
    > it be to modify this AS2 code to stream other
    > video flv like Revver, Bliptv, and maybe
    > eventually Joost etc.?
    Revver and BlipTV can be played using AS2 code, you would need to write the logic. You can use Revver API or BlipTV's RSS feed to do that...
    -abdul
  • DoonRothmani
    Abdul:
    testing your code for loading flv from youtube, i got stupid and created an iteration of part of the process, and was able to give one of my youtube videos viewership of 20,000+. It won an honor for most viewed in a 24 hr period.
    Then I gave another video 5,000+ hits. Unfortunately for me, i was logged into youtube at the time and as a result my profile now has me as having viewed 5,000+ videos. now im apprehensive because i dont want google to contact me or, worse, remove the ability to access the t parameter! crime does not pay and let that be a lesson to the kids out there, seriously.
    anyway my real vocation, the one with a future, is to build an RIA video player able to integrate videos from youtube, google video, blinkx, brightcove, and, not least, locally hosted, etc. into the same playlist(s).
    abdul, serious serious thanks because your blog and the concepts you expose in it have been instrumental in my development of this product. pure brilliance.
    Regards,
    Doon Rothmani
  • uri
    hi Andy,
    how did you get by this sandbox violation problem.
    i get the same error
    cheers
    uri
  • @Andy, uri: That security-error can be ignored or you can put a System.security.allowDomain ("youtube.com") in your file.
    I am sure, youtube player doesn't have anything that can cause any damage to your swf, if you do that :)
    @DoonRothmani:
    > anyway my real vocation, the one with a future,
    > is to build an RIA video player able to
    > integrate videos from youtube, google video,
    > blinkx, brightcove, and, not least, locally
    > hosted, etc. into the same playlist(s).
    You can look at the Media RSS standard and do it. We are doing it in Mixercast.com, where you can pull videos from different sources (youtube, google-video, metacafe, digitalmotion, blip.tv etc).
    There are sites which don't provide FLV path which you can find through workaround (like in Youtube case), though I feel these sites can atleast provide preview (shorter length) flv files so I posted something about it here:-
    http://www.abdulqabiz.com/blog/archives/general...
    > abdul, serious serious thanks because your blog
    > and the concepts you expose in it have been
    > instrumental in my development of this product.
    > pure brilliance.
    Glad to know, I could be of some help... Thanks for reading my blog and giving feedback.
    @Corey: Did you find the solution for your problems? Unfortunately, you can not control things inside YouTube player because of crossdomain scripting... Why don't you create your own player to play YouTube videos? You would have more control?
    Thanks
    -abdul
  • Dow
    Is there any truth to what Doon Rothmani is saying about this being a violation of some sort?
    If I am correct, this code is being used for sites like Mixercast.com.
    And how does Mixercast stream video from other sites like Brightcove Bip.tv is it with this same code?
  • @Dow:
    > Is there any truth to what Doon Rothmani is saying
    > about this being a violation of some sort?
    I don't know about violation but we are surely doing things using workaround. YouTube! doesn't give you URL and we are doing working arounds..
    In case of Doon Rothmani, he gamed the system to be among top videos, though I had never thought someone can use my script that way...
    > If I am correct, this code is being used for
    > sites like Mixercast.com.
    Kind of..
    > And how does Mixercast stream video from other
    > sites like Brightcove Bip.tv is it with this
    > same code?
    Blip.tv gives you Media RSS (an API also), they also give the URL for flash-videos (flv), so it's easy. Brightcove doesn't give video-path, so it's tricky to use their videos, infact they have kind of tight DRM thingy in there...
    -abdul
  • Zoran
    Hello Abdul, i've been given a task at my school to create video player same like yours with Adobe Flex that is using URL's from youtube to play videos. I have tried the sample video on the site, but then i tried to play another link (for video) from youtube.com and it wasnt working. I need the complete working source code, so i can use it for school, but i dont know if i have to copy the codes from the begining: Flex 2.0/ActionScript 3.0 example and ActionScript 2.0 code-snippet and use it in Adobe Flex Builder to create the player, because i'm a total Noob about this. How can i get the whole working (fixed) source code so i can present it at school? Thanks kindly in advance
    PS: I have been surfing online for 2 days and your project is the only one i found that could really help me.
  • @Zoran:
    You need to enter the URL in this format:-
    http://www.youtube.com/v/
    Example:-
    http://www.youtube.com//v/b2oegRiaA_0
    That should work fine..
    -abdul
  • Zoran
    Thanks Abdul, it worked fine and i tried couple of videos from youtube. Is there any tutorial how to create this in flex step by step,because i never used Adobe Flex Builder before. I need to create it, put it on cd and present it by Friday, so i don't have much time :(
    Help from anyone will be appreciated.
    Thanks again
  • I have the url for the video, and it played in your player. Now where can I find a player or an embed script to fit the video into a different skin? Do I need a .flv player or a .php player?
  • Will
    I am trying to embed the constructed .flv url into a flash script like this. Is this possible? Do I need a file extension at the end of the constructed url?
    Any help would be much appreciated.
  • Will
    I don't understand how to use the constructed .flv url. Is it possible to use this url to easily package the content into a different flash player, or is this solely a demonstration of how to get and view the video from the various parameters already given by Youtube?
    I tried to insert the url into an embed flash script but I am clearly missing something.
    This is a great demonstration btw, and any help would be appreciated.
  • Zoran
    I've created this so far:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:button label="Play" click="vp.play()" right="70" top="10"/>
    <mx:button label="Stop" click="vp.stop()" right="10" top="10"/>
    <mx:TextInput
    id="inputURL"
    text="http://server/file.flv" left="10" right="129" top="10"/>
    <mx:VideoDisplay
    id="vp"
    autoPlay="true"
    source="{ inputURL.text }" left="10" right="10" top="39" bottom="10"/>
    </mx:Application>
    and when i press run,it says i got errors in the code for building stop and play buttons:
    <mx:button label="Play" click="vp.play()" right="70" top="10"/>
    <mx:button label="Stop" click="vp.stop()" right="10" top="10"/>
    Anyone help about how to add 2 buttons for playing and stopping the video?
    Thanks
    Zoran
  • Zoran
    Error is the same for the two buttons, it says Could not resolve to a component implementation.
  • Zoran
    Actually it wasn't that code, its this: (Sorry for the mistake)
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:button label="Play" click="vp.play ()"/>
    <mx:button label="Stop" click="vp.stop ()"/>
    <mx:TextInput
    id="inputURL"
    text="http://server/file.flv" left="10" right="129" top="10"/>
    <mx:VideoDisplay
    id="vp"
    autoPlay="true"
    source="{ inputURL.text }" left="10" right="10" top="39" bottom="10"/>
    </mx:Application>
  • @Zoran: Your code looks good, it's mx:Button not mx:button...
    Hope that helps..
    -abdul
  • Am i to understand that the "T" value changes regularly? or does it stay the same?
    Cheers..
  • For one video, it might different (I believe it has something to do with CDN stuff).
    BTW! Check out another post of mine, where you don't need "t" param.
    http://www.abdulqabiz.com/blog/archives/general...
  • DoonRothmani
    Abdul,
    Since when do students request "the complete source code" for a project? I though students were given projects to learn how to do things THEMSELVES. things must have changed dramatically since i got my comp sci. degree!
    If I were you (which I am not, and I realize this) I would tell this type of poster to quite frankly bug off.
    Any one who is a student and can't even debug a typo in his code does not deserve to have a project handed to him, much less graduate with a degree in computer technology. He will only grow to be a parasite producing nothing for himself and grabbing credit from others.
    People who can't write (or debug) their own code or who are too lazy to do so, should be doing something else with their time.
    just my humble opinion. sorry, but reading some of these posts really peed me off.
    doon
  • Dow
    Hey Abdul, sometime ago I asked whether this could be used to play videos from sites like Revver. But I checked out their API and was unsure of what to include.
    Could you give me a further point in the right direction as to getting Revver to play like your youtube code.
    Just wanting to take advantage of the higher quality videos from sites like Revver. Thanks!
  • zippeddinosaur
    Hi Abdul,
    Could you give pointers to convert your as3 code to equivalent perl code?
    Regards,
    Neha
  • It works fine in Flex, but not in flash CS3. The flvplayback component just doesn't buffer.. If someone has tried this and succeed, please write back (you can contact me at this adress : stef.schittly--laposte.net). You can find my source files here : http://lab.st-f.net/actionscript/flvPlayer/
  • Arvind Tiwari
    Hey Abdul, Thank You very much. Excellent work. It is very very helpful. I have been searching for this logic for quite some time. I am just not sure whether it is legal to do this. I am hoping yes it is, else google would have blocked such access long back.
  • @Arvind: Glad it helped you, I am not sure of legal aspect of this. As long as I understand, it's a workaround which seems to be used by different sites (brightcove, flektor, mixercast etc).
    -abdul
  • francis
    change _mclListener.onLoadStart to _mclListener.onLoadInit
    and it will work in IE
  • This is great. But I wanted to plug in any URL without having to change it myself and plus the URL was hardwired into the function. I changed the function "startloading" code around so that you can just type/paste any of the Videos URL from YouTube and get instant gratification. I changed the function to this...
    private function startLoading ():void {
    var excludeLink:String = "http://www.youtube.com/watch?v=";
    var lngExclude:Number = excludeLink.length;
    var lngLength:Number = urlText.text.length;
    var txtYouTubeLink:String = urlText.text.slice(lngExclude,lngLength);
    var youTubeLink:String = "http://www.youtube.com/v/" + txtYouTubeLink;
    var req:URLRequest = new URLRequest (youTubeLink);
    loader.contentLoaderInfo.addEventListener(Event.INIT, handlerLoaderInit);
    loader.load(req);
    logMessage ("Loading YouTube URL..");
    }
  • Michael
    First off ,
    Good example here, works great on its own, however when you do use this inside of any other part of the app these type errors occur,
    **
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at /private::startLoading()
    at /__submitButton_click()
    at [mouseEvent]
    Runtime error is at
    loader.contentLoaderInfo.addEventListener(Event.INIT, handlerLoaderInit);
    **
    This is using flex 3,
    Cheers
    Drop me a link if you get this one figured out.....
  • Hi,
    I'm trying to include and play youTube video from with a swf I have prepared but I don't know how to do it. I've read the code but I'm not an expert and I don't really understand it. Sorry.
    I have this information: the target movieChild within the swf is "videoBox" and I want to repace it with the video from youTube so the video is exactly the right size and position.Can this be done? the URL of the video is: "http://www.youtube.com/watch?v=hs94ojVu7t"
  • Allen
    I got it to work with both AS2 and AS3 Flex
    However I need to load a video inside an AS2 project i made, but the youtube player appears inside my as2 project, where in flex ONLY the video appears.
    How would I do this in AS2 ?
  • @Dorian: You can learn how to play a FLV in Flash then you can just replace the FLV url with the YouTube FLV URL which you can construct using different techniques (some mentioned on my blog).
    @Allen: I really didn't get what problem you are facing? Can you please write it again, may be in technical words or with some code you are trying to use?
    Thanks
    -abdul
  • allen
    Hi Abdul,
    Ok let me re-phrase. When I put together the example using AS3 in Flex, it worked perfect, and only the actual video shows.
    But when I tried the AS2 example inside my AS2 project, the YouTube video player appears, just like on the youtube website, with the red srubber bar and the whole youtube video player interface. Thats the problem.
    I hope i explained better this time, and maybe you can point in me the right direction on how to "remove" the youtube player interface from my AS3 project.
    Thanks Abdul!
  • benjamin
    Hey there,
    Has anyone managed to recreate the play/stop button within flash?
  • Guys,
    I have been on vacation hence I couldn't respond to your comments. I would do it very soon, one by one, I would try to answer all queries.
    Thanks
    -abdul
  • Hi everyone,
    i'm sure somes of you will be please to find the equivalent of da ActionScript method in PHP5 ;-)
    I give you my sourcecode tested with success :-)
    don't forget sharing and diversity and everything get your favorites videos with joy ;-)
    greetings from france
    /*
    * @ edited by Nicoweb 2007
    * 12/08/2007 19:13pm
    * youtube-url-source-00.php
    */
    ini_set("max_execution_time","3600");
    $baseUrl = "http://www.youtube.com/v/%s";
    $idVideo = "3IcwG0jUFxU";
    $urlVideo = sprintf($baseUrl,$idVideo);
    $baseVideoUrl = "http://www.youtube.com/get_video.php?%s";
    ob_start();
    // get via CuRL da great library so fine ;-)
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $urlVideo);
    curl_setopt($ch, CURLOPT_HEADER, true);
    curl_setopt($ch, CURLOPT_FOLLLOWLOCATION, true);
    curl_exec($ch);
    curl_close($ch);
    $out = ob_get_clean();
    $strs = explode("&t;=",$out);
    $final = explode("\n",$strs[1]);
    $t = $final[0];
    $finalUrlVideo = getVideoUrl($idVideo,$t);
    $filv = file_get_contents($finalUrlVideo);
    $fo = fopen("file.flv","w+");
    $fw = fwrite($fo,$filv);
    $fc = fclose($fo);
    /* getVideoUrl ( string idVideo , string tValue ) */
    function getVideoUrl ($id,$tval) {
    global $baseVideoUrl;
    return sprintf($baseVideoUrl,"video_id=".$id."&t;=".trim($tval));
    }
  • @benjamin: That's done and thats what you can achieve if you look at the examples on this blog or web... Using different techniques allows you to load, stop, play, rewind etc YouTube videos....
    @Nicoweb: That looks neat, thanks for it..
    -abdul
  • thanks dude....
    i've been looking for this. its sad that such a popular service like youtube has an api that is surrounded by so many hacks... i think they should open up the api a bit more.
    p34c3
  • Iulian
    Hi everyone,
    I've made a player using FLVPlayback component from Flash 8.0 and I don't understand why it does work on Firefox and it doesn't on IE6 and IE7. Could anyone help me? Thanks a lot...
    Iulian
  • I must be missing something really obvious. A few folks have mentioned this already, but I haven't seen a concrete answer.


    Using the AS2 code works just fine for downloading the flv, but not when you try and send it to the FLVPlayback using the contentpath.



    I used:

    FLVPlayback.contentPath = constructFLVURL (_lv.video_id, _lv.t);

    which produces a 1005 Error claiming it must have the .flv extension.



    Can anyone shed some light on this for me?

  • I must be missing something obvious here. When using the AS2 version it works fine, but when I use the constructFLVURL function for the contentPath,I get the 1005: Error which states that I need the .flv extension. Am I the only one with this error? Copying that same string into a browser prompts me to download so I know it isn't the string. Thanks for any help, this will absolutely revolutionize my current project!
  • Hendra
    Hi,
    Can I have the source for your YouTubeClientSideDemoFlex.swf file?
  • @Evian: FLVPlayback checks for flv extension, there is some issue with it. I would check for a workaround...It's weird that FLVPlayback missed a use-case like this, in web-application we do use redirects and not always depends on file-extension...
    @Hendra:- The first code snippet in above post is the source-code of YouTubeClientSideDemoFlex.swf...
    -abdul
  • Is the php script on Youtube's side no longer working? It's returning a 410 Gone code, which tells me that it's a permanent move on their part.
    Which, sorta brings us back to square one. How are the players deriving the subdomain that the .flv is coming from?
  • @Jeffery: I just checked it works, it might not be working for some video_ids?
    -abdul
  • Rabi
    Thanks for wonderful into. I do have a question. I have been using video player that uses, component FLVPlayBack that came with Flash8. How do I supply the youtube path to this component? It asks for contentPath which should be a flv file. Any suggestions would be great. Thanks again.
  • Ah. I see the issue.
    Youtube changed the FlashVar format to a string keyed object. It used to be provided via the url query string.
    var swfArgs = {hl:'en',video_id:'IZfIFzBsDsU',l:'69',t:'OEgsToPDskIIJps_QOHBWRlp-jl8Z66t',sk:'2OO-1MpUsGx0EJkFDrt7SQU'};
    Apologies for the formatting.
    So, I'm using a PHP regular expression to snag it:
    preg_match('/var swfArgs = {hl:\'([^\']+)\',video_id:\'([^\']+)\',l:\'([^\']+)\',t:\'([^\']+)\',sk:\'([^\']+)\'};/', $page, $regs);
    $pass_to_getvideo = $regs[2]."&hl;=".$regs[1]."&l;=".$regs[3]."&t;=".$regs[4]."&sk;=".$regs[5];
  • Rabi
    Use http://cache.googlevideo.com/get_video?video_id...
    where "ffMSy8usAlc" is the youtube id
    Works with FLVPlayback component in Flash 8.
  • Evian
    Has anyone else gotten what Rabi suggested to work?



    I still get a 1005 Error.





    "1005: Invalid xml: URL: "http://cache.googlevideo.com/get_video?video_id=JHUuqsSCn5g&.flv&FLVPlaybackVersion;=1.0.1" No root node found; if url is for an flv it must have .flv extension and take no parameters"





    What is really weird is it auto adds "&FLVPlaybackVersion;=1.0.1" to my URL, I didn't add that.





    Let me know if anyone has found a work around for the FLVPlayback component in Flash 8.
    evian.

  • Hi everyone,
    next to a work on youtube, i saw that Google add a new type of API that make the old one deprecated.
    It may explain the problem encoutered by one of you in the comments below.
    Enjoy sharing and looking videos on youtube ;-)
  • @Nicoweb: You made me lazy, anyway Thanks :)
  • Im trying to figure out how to get my videos to autoplay on You tube... for example...I know the code &autoplay;=1
    But it does work on Myspace but it doesnt work on Youtube....I want my video to play when someone views my Channel....Please help....
  • Hi,
    i am ram prasath.i am created an flash file to play youtube videos using action script 3.
    The following error was return in my console


    VideoError: 1005: Invalid xml: URL: "http://www.youtube.com/get_video.php?video_id=3IcwG0jUFxU&t;=OEgsToPDskK-JSXCoECKg-4KUiDLgOps&FLVPlaybackVersion;=2.0" No root node found; if url is for an flv it must have .flv extension and take no parameters
    at fl.video::SMILManager/http://www.adobe.com/2007/flash/flvplayback/internal::xmlLoadEventHandler()
    at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/flash.net:URLLoader::onComplete()


    i mentioned the full flash script below


    Plz provide some solution for me.I am trying this flash to play in local network not even in html file.

    import flash.events.Event;


    import fl.events.ComponentEvent;


    import fl.events.ColorPickerEvent;


    import fl.controls.RadioButtonGroup;


    import fl.containers.UILoader;


    import flash.net.NetConnection;


    import flash.net.NetStream;


    import fl.video.*;


    import flash.net.*;


    mport flash.display.*;


    var loader:Loader;


    var rbGrp:RadioButtonGroup = RadioButtonGroup.getGroup("fontRbGrp");


    rbGrp.addEventListener(MouseEvent.CLICK, rbHandler);


    txtCp.addEventListener(ColorPickerEvent.CHANGE,cpHandler);


    msgCb.addEventListener(Event.CHANGE, cbHandler);


    var tf:TextFormat = new TextFormat();


    onAppCreationComplete();


    function rbHandler(event:MouseEvent):


    void {
    switch(event.target.selection.name) {
    case "smallRb":
    tf.size = 14;
    break;
    case "largerRb":
    tf.size = 18;
    break;
    case "largestRb":
    tf.size = 24;
    break;
    }
    trace(event.target.selection.name);


    aTa.setStyle("textFormat", tf);
    }


    function cpHandler(event:ColorPickerEvent):void


    {
    tf.color = event.target.selectedColor;
    aTa.setStyle("textFormat", tf);
    }


    function cbHandler(event:Event):void {
    aTa.text = event.target.selectedItem.label;
    }


    function onAppCreationComplete ():void
    {
    trace("Executed on load");


    loader = new Loader ();


    var req:URLRequest = new URLRequest ("http://www.youtube.com/v/3IcwG0jUFxU");


    loader.contentLoaderInfo.addEventListener(Event.INIT, handlerLoaderInit);


    loader.load(req);


    logMessage ("Loading YouTube URL..");
    }


    function logMessage (message:String):void


    {
    //outputText.text += message + "\n";
    trace (message);
    }


    function handlerLoaderInit (event:Event):void


    {
    logMessage ("Loaded, processing: " + loader.contentLoaderInfo.url);


    var urlVars:URLVariables = new URLVariables ();


    urlVars.decode (loader.contentLoaderInfo.url.split("?")[1]);


    logMessage ("Processed:-");
    logMessage ("\t\t video_id:" + urlVars.video_id);


    logMessage ("\t\t t param:" + urlVars.t);
    logMessage ("\t\t thumbnail-url:" + urlVars.iurl);


    var flvURL:String = constructFLVURL(urlVars.video_id, urlVars.t);


    logMessage ("YouTube FLV URL: " + flvURL);


    var my_FLVPlybk = new FLVPlayback();


    my_FLVPlybk.x = 79;
    my_FLVPlybk.y = 130;
    my_FLVPlybk.bufferTime = 0.1;


    addChild(my_FLVPlybk);


    my_FLVPlybk.skin = "file:///c|/Program Files/Adobe/Adobe Flash CS3/en/Configuration/FLVPlayback Skins/ActionScript 3.0/SkinOverPlaySeekMute.swf";
    my_FLVPlybk.source = flvURL;


    my_FLVPlybk.play();
    logMessage ("Started Playing Video...");


    loader.unload();


    }


    function constructFLVURL (video_id:String, t:String):String
    {


    var str:String = "http://www.youtube.com/get_video.php?";
    str += "video_id=" + video_id;
    str += "&t;=" + t;
    return str;
    }

  • Pritam
    Dear Abdul,
    I am creating Video Player using SWFLoader in Flex. I want to load the different videos on clicking of each button. For any first click of button it starts playing video from youtube or google video but as soon as i click on other button for different video it goes in the loading mode and i am not able to see the video. Alos on local my swfLoader size is correct but as soon as i upload on the we server it height and width becomes very large. See my Code below-
  • Ben
    @Pritam
    I am experiencing similar problems in as2.
    I can load one video into a player, but subsequent videos constantly buffer, and never load. I'm stumped as to why this could be.
    I suspect your problem with resizing is one I have already over come. In AS2 I set an onLoadInit handler to resize once the movie is loaded. I'm not familiar with flex, but I imagine you could put the resize in the onImageLoaded listener instead.
  • clayton
    I don't see how the AS2 code posted above could possibly work. The URL is:
    http://www.youtube.com/v/3IcwG0jUFxU
    The code relies on the fact that the following line splits the url into its various pieces:
    _lv.decode (target._url.split ("?")[1]);
    However, there is no '?' in the url, so the above code will return undefined. All subsequent properties will return undefined as a result.
  • @Clayton
    when the given link;
    it is redirected to the link as mentioned below;
    http://www.youtube.com/swf/l.swf?video_id=3IcwG...
    which of course, consists '?' ;
    this procedure is basically done to get the 't' value from the link which in this case is
    I hope now its clear to you;
    Thanks to Abdul for this brilliant crack;
    Regards
  • dEPUTsTERONE
    Hello guys,
    The FLVPlayback-component isn't able to play the parsed files within flash 9.
    I'm searching for a workaround for 2 days now and I'm really helpless...
    How can I force the FLVPlayback to load such a file:
    http://gdata.youtube.com/feeds/api/videos/Zo52T...
    Regards
  • You can use MediaDisplay (or MediaPlayback) component to avoid "VideoError: 1005".
  • Lijo
    I dont know how to do it can someone mail it to me with this video OS3eBdJczn8
  • Susan
    Thanks for this awesome work.
    One question I have is -- once we've constructed an FLV url, I notice that YouTube returns something different, each time the script is run.
    However, the previous url works, at least a few seconds later.
    Do the FLV urls stop working? i.e. do we need to call it again, for the same video, every time we want to use it? or can we save the constructed flv url and reuse it each time we want the youtube video?
  • @Susan:-
    > YouTube returns something different
    >, each time the script is run.
    Yup! It returns the closes or available server
    > Do the FLV urls stop working?
    Not sure of that..
    > Do the FLV urls stop working?
    > i.e. do we need to call it
    > again, for the same video,
    > every time we want to use it?
    > or can we save the constructed
    > flv url and reuse it each time
    > we want the youtube video?
    You can do either of these. Call the code everytime to get the URL or save the URL (returned) and used it later... Latter one might be faster, if your users are in same geography (like USA or Europe etc). If you have users from all over the world, you might want to use former approach (get URL everytime)..
    BTW! Did you check out my other posts of YouTube FLV path using server-side tricks?
    -abdul
  • sam
    the easiest way is to call this webservice http://youtubexml.com/?url=http://www.youtube.c...
  • Rohit
    Hi Abdul, I am able to construct video url but I am unable to find a way to play a video on cross-domain context.
  • @Rohit: FLV should play and there is no crossdomain.xml required for playing flv files, it might be required when you want to capture the bitmap...
    Check this out:-
    1) Go to http://www.abdulqabiz.com/temp/flvPlayer.swf
    2) Paste this url: http://youtube.com/get_video?video_id=gttvfPjLV...
    It works fine..
    -abdul
  • Washiki
    Hey Abdul,
    I am trying to use your AS2 code as part of my player. I keep getting the security sandbox violation, though.




    I tried adding System.security.allowDomain ("youtube.com") at the beginning of the actionscript code but it still pops up. Also, would you know what/where I'd put the code to autoplay?





    Here's my code. I've only started learning actionscript since I started streaming videos so I do not know too much. Perhaps you have any suggestions to make it more efficient, too? I'm just chopping up codes until it works :P





    System.security.allowDomain ("youtube.com")


    createEmptyMovieClip ("mc", getNextHighestDepth ());


    var _mcl:MovieClipLoader = new MovieClipLoader ();


    _mcl.addListener (_mclListener);


    _mcl.loadClip ("http://www.youtube.com/v/oqNMx_1jmlU", mc);


    _mclListener = new Object ();


    _mclListener.onLoadStart = function (target:MovieClip)


    {


    var _lv:LoadVars = new LoadVars ();


    _lv.decode (target._url.split ("?")[1]);


    _mcl.unloadClip (target);





    var connection_nc:NetConnection = new NetConnection();


    connection_nc.connect(null);


    var stream_ns:NetStream = new NetStream(connection_nc);


    my_video.attachVideo(stream_ns);


    stream_ns.play("http://www.youtube.com/get_video.php?video_id=" + _lv.video_id + "&t;=" + _lv.t);


    stream_ns.setBufferTime(15);


    };

  • crucifix
    Thank you very much... This is very useful.
  • lorena
    vorrei mettere dei video su yutube
  • Andy
    >Flash clients would require server-side proxy
    Abdul,
    But your example code in Flex AS3 seems to go to YouTube directly! How does this work?
  • Don't know for sure how off-topic this is, but if you get into some errors, like 100;
    try to handle your php/asp flv source in flash like:
    your-folder/whatever/stream.php/anything-here.flv
  • @Andy: My example in AS3 is not using YouTube RSS feed or API. Both of those operations are crossdomain data loaoding operations and require either a liberal crossdomain.xml on youtube.com or proxy on your server...
    What I am doing above is a hack to get the "t" param and then construct flv url from that. I am not sure, this hack still works, I need to spend sometime updating all my posts/code related to youtube.
    @Robin: Never encountered that error, but thanks for the update.
    -abdul
  • Andy
    Abdul, thanks for your reply. I actually didn't realize that when the docs said "Flash can't load data from another domain without the crossdomain.xml file" that did not include things like reading the FLV file. Thanks for clearing that up.
    I've been trying to get the FLVPlayback control that comes with Flash to use the youtube URL, but for whatever reason it doesn't seem to work. Does it expect an url with a FLV extension or something? Any idea?
    Thanks.
    Great blog. Very helpful.
    -Andy
  • @Andy: FLVPlayback has hardcoded logic for file-extension, it looks for .flv in the end. I have seen people finding out workaround for that..Please read above comments or search, I am sure it has been solved..
    Did you try appending &.flv in the end of URL, see if it works?
    -abdul
  • Danny
    Nice cript, but do you know how to make a video preload?
    thanks
  • can you make the YouTubeClientSideDemoFlex.fla available? I'm a newbie
  • @Pete: There is no .fla file for that code, it's a flex app, and code is there in my post above (the first code box)...
    Sorry, you have to wait and post the comment again..
    -abdul
  • Peter
    Hey Abdul,
    I've having some issues with AS3 (not Flex) and loading .flv from youtube using your technique.
    I can get your technique to work for grabbing the URL but when I tried to play it in the FLVPlayback component I get a security sandbox violation as below:
    *** Security Sandbox Violation ***
    Connection to http://www.youtube.com/get_video.php?video_id=e... halted - not permitted from http://www.gemtowerdefense.com/test.swf
    Now, your example http://www.abdulqabiz.com/temp/flvPlayer.swf works for the URLs I grab, is that example a Flex app or an AS2 app or an AS3 app?
  • @Peter: That's a flex app, I would investigate why it's not working for you.
    Thanks for feedback.
    -abdul
  • mike
    This code works just fine. Can I ask how do you now send this video as an email?
    Thanks,
    Mike
  • Hi Abdul, I've made everythig, I understand that the as2 is for retrieving the flv file but it only works for a download as any other online tools. I tried the app en Flex and obviously works fine too, but how can I play the flv in flash? I'm driving crazy trying to I know how to do that with a static flv address, but I really don't find the way to make it using the string URL. tks.
  • jake
    thank you for that hint!
    the link to the .flv is all i need.
  • sx
    I didn't use your script code, but it's similar and when I unload a YouTube video and then then load a different one, the one that was playing before it loads and plays instead of the new one. what could be the problem? and may I ask for the actual FLA file for your example if it isn't too much of a trouble?? thanks.
  • Thanks for posting this.
    Can you please update the original AS2 code so that is uses onLoadInit rather than onLoadStart?
    onLoadStart does not work in IE.
    That will save others a lot of time troubleshooting and will make this page more popular.
    Thanks
  • nick
    I'm a complete noob so forgive me for asking this.
    I'd like to able to play this video: http://youtube.com/watch?v=gYo2XlgL8pQ
    When I enter the altered url http://youtube.com/v/gYo2XlgL8pQ in the test application the video is played.
    I however don't understand how I can get this to work on my site, what do I need to put in my html ?
    any help is greatly appreciated
  • This is the class which I created using Flash CS3 (Action script 3.0)using Abdul's techniques for playing youtube video . I am posting it coz it might be useful for somebody . it plays hard a movie from this url "http://www.youtube.com/watch?v=KmrdWpXSnoo&feature;=related" which is hard coded
    package{
    import flash.display.Sprite;
    import flash.display.MovieClip;
    import flash.net.*;
    import flash.media.Video;
    import flash.events.*;
    import flash.display.Loader;
    import flash.system.*;
    public class VideoTest extends Sprite
    {
    private var vidLoader:Loader;
    private var flvURL:String;
    private var videoID:String;
    private var vidRequest:URLRequest;
    public function VideoTest()
    {
    flash.system.Security.allowDomain("http://www.youtube.com");
    flash.system.Security.loadPolicyFile("http://www.youtube.com/crossdomain.xml");
    var vidURL:String = normalizeURL("http://www.youtube.com/watch?v=KmrdWpXSnoo&feature;=related");
    var vidRequest:URLRequest = new URLRequest(vidURL);
    vidLoader = new Loader();
    vidLoader.contentLoaderInfo.addEventListener(Event.INIT, onVidRequestLoad);
    vidLoader.load(vidRequest);
    }
    private function onVidRequestLoad(evt:Event):void
    {
    trace("in onVidRequestLoad");
    var vars:URLVariables = new URLVariables();
    vars.decode(vidLoader.contentLoaderInfo.url.split("?")[1]);
    videoID = vars.video_id;
    flvURL = constructFLVURL(vars.video_id, vars.t);
    trace(flvURL);
    trace("out onVidRequestLoad");
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    var ns:NetStream = new NetStream(nc);
    ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
    ns.play(flvURL);
    function asyncErrorHandler(event:AsyncErrorEvent):void
    {
    trace("error");
    }
    var vid:Video = new Video();
    vid.attachNetStream(ns);
    addChild(vid);
    }
    private function constructFLVURL(video_id:String, t:String):String
    {
    var tmp:String = "http://www.youtube.com/get_video.php?";
    tmp += "video_id="+video_id;
    tmp += "&t;="+t;
    return tmp;
    }
    private function normalizeURL(URL:String):String
    {
    var tmp:String = URL;
    tmp = tmp.split("watch?v=").join("v/");
    return tmp;
    }
    }
    }
  • artur
    Your example is NOT WORKING:
    http://www.abdulqabiz.com/files/YouTube_Client_...
    im not able to see any video play..
    although it says:
    Loading YouTube URL..
    Loaded, processing: http://www.youtube.com/swf/l.swf?video_id=3IcwG...
    Processed:- video_id:3IcwG0jUFxUt param:OEgsToPDskK1bXmTe-60W17V4INmB6YC
    thumbnail-url:http://i.ytimg.com/vi/3IcwG0jUFxU/default.jpg
    YouTube FLV URL: http://www.youtube.com/get_video.php?video_id=3...
    Started Playing Video...
    im using FFox , and the latest flashplayer 9
    does this error have to do with the new CrossDomain policy?
    i would like to know if its possible to build a our own flex 3 video player..that feeds from YouTube... is that possible now with their new API?
    thanks.. artur
  • Hey guys! i just found this website and it seems to be the best and simple youtube flash video player /ripper so far. You can even put your own logo in the videos.
    enjoy guys
    http://www.youtubeflashplayer.com
  • abdulla
    how to play yahoo video url in flash (actionscript). i got the example for loading you tube url.so plz help me
  • maloola
    what about using the youtube flvs for capturing the bitmap (bitmap.draw()) ? is this allowed without a proxy? don't want to use one..
  • Mincheol Lee
    Hi!
    I just started to learn flex, and I am working on developing YouTubeWidget. and It looks like this converting feature would be great help to me.
    However, it doesn't work to me. The link generated from here doesn't work with VideoDisplay. Also, your sample also doesn't work.
    Is this out of date formula for converting URL to Flv URL?
    Thank you!
  • rony
    Suddenly we don't get the 't' in the urlVars. does someone know what is the new way to retrieve it?
  • Andy Milburn
    This hack, after working reliably for a year, appears to have been broken by a change in Youtube format. Can anyone else confirm this? Any workarounds yet?
  • Greg
    Yep!
    Seems to no longer work.
    Would be nice to have an update, ... but ...
    Greg
  • Greg
    Yep!
    Seems to no longer work.
    Would be nice to have an update, ... but ...
    Greg
  • Seraphim
    Please! Someone help! What is new format???
  • ural
    help...
    doesn't work now! t urlVars = undefined
  • kay
    Hi It was so useful for me. But since last week the program doesn`t work. I think the U-tube change url method or thet don`t want to acess like this way. I really want to use this program again. so do U have another way to use it?? thank you for you`re kindness Bye :-)
  • gaurav
    Yes it doesn't work now.
  • Brian
    I have found a solution to this issue. Hopefully the following steps will work for you as well.


    <ol>
    <li>Get the URL to the clip you wish to load. This URL must be of the form http://www.youtube.com/watch?v=dMH0bHeiRNg. If you are getting the URLs from the standardfeeds url (http://gdata.youtube.com/feeds/api/standardfeeds/), the URL to the clip is the media:player item
    </li><li>Load this URL and scan the source of the page for the "watch_fullscreen" URL. It will look something like this:</li></ol>

      
    var fullscreenUrl = '/watch_fullscreen?fs=1...
    <li>Take everything after "watch_fullscreen?" and save it to a variable (we'll use params)
    </li><li>Generate your FLV url as follows:
    </li>

      finalURL = "http://www.youtube.com/get_video.php?" + params;





    And there you go. Hope this works for you.

  • jean-marc
    They changed the code on their server.
    Even though I can get the t var and perform a GET on the get_video url, i get a 404 not found on the download.
    But if I use a web browser and view the source, and manually extract the t variable, the download link works.
    Maybe it's something to do with cookies...
  • Yes
    Yes, youtube's broken the "t=" method. Not sure how to resolve this. They're saying that downloading videos breaks the "Terms of Service" agreement.
  • owen
    Hmm... I'm trying to write a workaround for this right now. The AS3 chromeless API might work, as long as you don't mind using the external interface controls for your embedded player.
  • mincheol Lee
    Hi!
    Your blog helped me to develop Youtube widget player. Thank you!
    As other people said, the url format had been changed. Does anyone find the new way of getting flv url?
  • use this way to call the video-url. First call www.youtube.com/watch?video, you should return the result in AS2/3 as a text (html), then search for the text swfargs = and decode the variables in this string, then you can rebuild the right url again, I've got it working on my own site
  • download the html page in as3 (www.youtube.com/watch?v=.....), search for swfargs= and split and decode the parameters behind this string, then you can compose the video-url again, it works on my site
  • Hi Guys
    Sorry for not responding to your comments, seems it's time for an updated post for latest workaround.
    I have been busy with many things, one of those is Chromeless AS3 Player (YouTube) Wrapper - It uses ExternalInterace or LocalConnection (both options would be there).
    Once it's ready, I would post it.
    Thanks
    -abdul
  • This technique to get the FLV URL indeed no longer work. You now have to load the swf web page and extract the parameters from there. I've posted the source code to do that on my blog:
    http://pogopixels.com/blog/getting-the-url-of-a...
  • comment obtenir l'url flv de youtube avec un script php
  • Bora
    Notice: Undefined offset: 1 in dm.php on line 77
    This script is wrong! Anyone know working code?
  • Seems like YouTube is working against this obviously, all new php scrips work for a while then they stop working.
  • Name
    Since August 12 2009 Youtube has changed the htlm source code of their video web pages,,,so this old method doesnt work anymore...

    Does somebody know how to build the the donwload url for the new youtube video pages format?
  • Yup! YouTube has done changes so many times, they kept changing the ways. After a point, it was hard for me to keep track of it, hence no update in my script in long time.

    I always promise to update it but can't, due to various other commitments. I am sure, there are a lot of folks who are taking care of it, i.e. always coming up with new ways to do things.
  • Z
    Tryout http://youtubegrabit.com ... it works perfectly for all videos (including HD!)
blog comments powered by Disqus