Dec 14, 2005

HowTo: Google Videos on your website

After I realised that www.downloadgooglevideos.com got shutdown by google, and all the embedded google videos were not working anymore, I decided to come with a new way to put it on your website. I found one, but it’s not that easy as before, but it’s working. I’ll try to explain here how to do it. If anyone finds a better way to do it, please, let me know!

 

The old code I showed in this page wasn’t working on IE, so I re-wrote this to a better way to embed google videos on your website. Any problem let me know! :)

 

First you open the page where is the video you want embed at http://video.google.com, then in Firefox you just click on “View Page Info” under the menu of the right-button of the mouse.

 

Then you go to “Media” tab and copy the link to the flash file, as you can see in the image below:

 

The URL will look something like this:
http://video.google.com/googleplayer.swf?videoUrl=http%3A%2F%2Fvp.video.google.com%2
Fvideoplayback%3Fid%3D25036f0c0ef9bf52%26begin%3D0%26len%3D7160%2
6itag%3D5%26urlcreated%3D1134654406%26docid%3D5651279610882414164%26urlcreated
%3D1134654406%26sigh%3Dj-smBnlHLu4CSvFmXYUrfzgZEn4&autoPlay=true

 

Now that we have the address of the video file, we have to set a flash code and replace “YOUR CODE HERE” with the one we got before:

 

If you want that the movie starts paused, you have to change the last option of the link from “autoPlay=true” to “autoPlay=

 

I figured out how to make the full screen work

30/12/05

 

So, to make the full screen mode works, you need to add the following code before the </head>:

 

<script src="http://video.google.com/jslib/misc.js" type="text/javascript"></script>
<script src="http://ovelha.org/pasteler0/files/videoplay.js" type="text/javascript"></script>

 

I would advice you to download the videoplay.js and save it in another path, because someday I may delete the file. Then you just need to chenge the
<script src="http://ovelha.org/pasteler0/files/videoplay.js" type="text/javascript"></script>
with the new path.

 

Now here you can see a sample video of “Ultra-OverClocking your CPU with Liquid Nitrogen”, from tomshardware.com
And, please DIGG IT! :)

 

 

50 Comments

  • bsd

    to find the url, you can open page info under the tools menu- go to the media tab – you can see all info on multimedia files on th page.

  • Thank Ben, I’ll try other ways to embed this google videos to a home page. :)

  • It does not seem to work in IE and it receizes my page. But it is a great start!

  • Yeah, its not working, I’m re-writing this to a way it works on IE.

  • Great job by the way! I will keep track of your progress.

  • Done, the code is working now, just my website that is not working properly on IE. I’ll take a look in the CSS file and make some changes when I’ve time. Let me know if there is anything wrong.

  • Thanks, is it also possible to stop the auto play? [autoplay=true]

  • Done. To the movie starts paused, you have to change the last option of the link from “autoPlay=true” to “autoPlay=”. :)

  • Thanks, now its perfect

  • Thanks Man! It works! Another question: How should I hack it if I want that the page shows a specific frame from the movie in the browser? Its great but an interesting image from the clip would be better than a black square.

  • Hey thanks!! The demo video on your site doesn’t support full screen. When I click on fullscreen it doesn’t work! Is it possible to add it?

  • This is awesome! Thank you so much! I was trying everything to embed my video. And Yay! Now I am happy. :)

  • This is very cool and will go to good use im sure.

  • it’s like you have you own t.v. station..cool

  • MAN, u saved my life. I was trying to figure out how to link a video to my myspace page for the last 2 hours.
    THANK YOU.

  • sndr: I think there is a limitation of the google’s flash player for that.

    anduser: Just added the information of how to do that. Anything, just say.

    Maxim: I’m happy it helped! :)

  • [...] Edit: There are also other (Eaiser) ways to do this as found on the comments on the site as well as here [...]

  • Just tried the google video code on the bud light magic fridge ad. All i get is a buffering message and NaN:Nan/0:00 in the elapsed time bar

    Here’s what i typed in.

    Any ideas on how to get this to work on Xanga?

  • nuts, can’t type the code.

    Essentially it was the main code with YOUR CODE HERE replaced with the google media object code for Magic Fridge

  • hi…

    i’ve been trying to do what you wrote but it turns out blank and the area where it’s suppose to be in is blue… i really like this video and would love to have it on my myspace page…. can you please help me…. i searched for it on video.google.com and i found it… its called chiefislander…a samoan dance done in carson 2005… your help would be great….

    thanks

    tonuiva

  • Tonuiva, this may happend coz of myspace’s sourcecode!

  • thanks alot, il have to try this at home, is there anyway of getting it to work with myspace then ? seeing as the other guy didnt get it to work, i wana stream a video of my band without using that stupid youtube.

  • Vatican, it works, just I’m not sure about MySpace.
    Now in google videos, there is a button “Put on site”, you could try that code!

  • http://javimoya.com/blog/youtube_en.php

    The site above works great for downloading google vids aswell

  • [...] A quick google search on embedding videos got me to HOW TO Quickie: Embedded Google Videos But he website they were referring to got shut down so someone wrote a new guide on how-to @Step by Step Guide [...]

  • The reason it’s not playing in IE, I think, is because it’s just an embed code and not a corresponding object code. Traditionally to ensure cross-browser compatibility, you code:

    [object]
    [params]
    [embed][/embed]
    [/object]

    Obviously there’s much more to it than that, but that’s how I got it to work.

  • Andrew, thats cool! thanks for helping! =)

  • “The video is currently not availible – Please come back later” – is the answer I get (to all videos on this site) – more inventions needed ! :-)

  • P.O. Yep, there’s this message for some videos. When I’ve time I’ll take a look at this, but sorry that I’m not updating very much this blog coz this year its very important and I’ve to study alot. When this is all over, I’ll come with many nice stuff! =)

  • [...] HOW TO Quickie: Embedded Google Videos – PaulStamatiou.comI wrote a howto explaining how to put this google videos to work, hope its useful. you can see it here: http://www.ovelha.org/pasteler0/2005/12/14/howto-google-videos-on-your-website/Source: http://www.paulstamatiou.com [...]

  • http://video.google.com/googleplayer.swf?docId=-3101836263624326712

    How to substract the main video source from this link? It is a real nice clip and I want to download the clip.

  • Hey, one interesting question – is there a way to Upload a video to google using form on your web-site??

  • I do this :

    http://video.google.es/videoplay?docid=8718728501056290731&q=genre:comedy

    replace with :

    http://video.google.com/googleplayer.swf?docid=8718728501056290731

    I write a script function on the webpage :

    Video picture

    The window size resize the videoplayer and you can watch the video ok.

  • please help me

    how to use in bbcode googlevideo
    my site phpbb pls help

  • THANK YOU VERY MUCH MAN. I can’t express how useful it proved to me. Thank you very much once again. Go to page at http://yerra.trinadh.googlepages.com/ and find out how.
    Thank you very much.
    Thank you very much. If any way I can be helpful then contact me.

  • Trinadh, no problem man! =)

  • How do you make the videos autoplay when the browser loads

    jim

  • please help? i followed the directions on the top page, but everytime i install it on my site
    i get a white box (screen)
    i cant afford to to buy more web space so if anyone can help me thru this.
    thanks.

  • jack, what is your page address?

  • Is it not prohibited by Google’s copywrite to imbed their videos on our sites?

  • adriana, no. =)

  • Good job. The article is very informative.

  • Did something change at google? I’m not seeing the link in firefox of the same format as above, now I see a relative URL.

    /player2.swf?hl=en&video_id=blablablabla

    Anyone know how to work around this one? The old links appear to work. Thanks.

  • please help me i cant seem to get this to work, ive got the proper code from firefox threw the steps you provided above… but when i paste it in my website i get a white square… please help me to figure this out, thank you…

  • there’s a WAY! better way to get it in full screen i dont exsactly know the code but i do have a generator that allows you to have it in a pop-up window just like youTUBE! the url is:
    http://javascript.internet.com/generators/popup-window.html and set the settings to size: 1030 and resizable and have scrollbars and it’s a you-tube version in full screen!

    MSGMXP team,
    http://www.classic2.bravehost.com

  • Hello! Help solve the problem.
    Very often try to enter the forum, but says that the password is not correct.
    Regrettably use of remembering. Give like to be?
    Thank you!

  • Wow! Great tip

  • Will this run on google server?

  • @Kunal, yes :)

Leave a comment