Customize your YouTube video
November 15th, 2006
So how did I get this crap image as the first frame of a YouTube video? Well I will show you so you can do the same thing!
- Find a video you want to embed. For this example I will use http://www.youtube.com/watch?v=U0FAaah8jgY
- Note and copy its “video_id”, which in this case is “U0FAaah8jgY” from http://www.youtube.com/watch?v=U0FAaah8jgY
- Get the video’s “t-code”. This can be done by doing a view source of the video page and looking for the code between “&t=” and the next “&” in a section that has this. In our example, this “t-code” would be “OEgsToPDskJXsoy4CQ56hZR-A204DL4a” from id=U0FAaah8jgY&l=209&t=OEgsToPDskJXsoy4CQ56hZR-A204DL4a&s=21556AB
- Now create the image you want to use and upload it to your site or an image hosting site. I would recommend using a JPG with dimensions of 425 x 325. Anything with a proportion that is away from that will look stretched out and not so nice. Copy the URL for your image.
- You are now ready to produce the code. In the following piece of code, replace
with your video_id from step 2, with your t-code from step 3, and with your image from step 4. Note that your image URL should NOT have the http:// in there. <object width="425" height="350">
<param name="movie" value="http://www.youtube.com/v/<video_id>"></param><param name="wmode" value="transparent"></param>
<embed src="http://www.youtube.com/p.swf?video_id=<video_id>&eurl=&iurl=http%3A//<image>&t=<t-code>" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>
- Finished! Now simply copy your new code from above into the HTML of your site and you have a YouTube video with a custom first frame. Enjoy!
Leave a Reply