«

»

About Posting Youtubes – You Need To Know This

Youtube has recently changed it’s default embed format.

The older format had a default video embed width of, in most cases, 425 pixels.

The new format, which you now get when you grab “embed” code from a youtube page, has a default width of in most cases 640 pixels, and in some cases even wider, up to about 960 pixels.

If you just copy and paste video embed code from the youtube site to DD, you WILL break the page here.

Youtubes wider than 500 pixels are too wide for the essay column on the pages at DD, and it breaks the sidebars by ‘pushing’ them out to the right to accommodate a youtube wider than the banner at the top which is the width of the essay column.

When you embed a youtube it will be a lot easier on this site, and on your eyes and everyone elses, if you resize it to a something like 500 pixels wide. (see example below)

The DD banner at the top is 580 pixels wide, so you can easily see what will happen to the pages here if you post a youtube wider than that.

Here is youtube embed code obtained today from a youtube page – I’ve highlighted the dimensions in red.

<object width=”960″ height=”745″><param name=”movie” value=”http://www.youtube.com/v/J4kvjp55wPw&hl=en_US&fs=1&rel=0&hd=1″></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”http://www.youtube.com/v/J4kvjp55wPw&hl=en_US&fs=1&rel=0&hd=1″ type=”application/x-shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” width=”960″ height=”745″></embed></object>

You can easily imagine what would happen to the DD page if I posted that youtube embed code here as it is.

What to do is very easy. Simply change the width and height parameters in both places where you see them in the code.

For example, if I alter the above embed code as follows…

<object width=”500″ height=”320″><param name=”movie” value=”http://www.youtube.com/v/J4kvjp55wPw&hl=en_US&fs=1&rel=0&hd=1″></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”http://www.youtube.com/v/J4kvjp55wPw&hl=en_US&fs=1&rel=0&hd=1″ type=”application/x-shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” width=”500″ height=”320″></embed></object>

…and embed it in this essay – it’ll produce a nicely sized youtube that will not break the DD pages, like this:

I’ve also centered that by enclosing the embed code between <center></center> tags.

…………………………

If you want to make a small youtube, say 250 or 300 pixels wide, you can remove the height parameters and make the width smaller. Browsers will then calculate the height automatically, like this…

<object width=”300″><param name=”movie” value=”http://www.youtube.com/v/J4kvjp55wPw&hl=en_US&fs=1&rel=0&hd=1″></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”http://www.youtube.com/v/J4kvjp55wPw&hl=en_US&fs=1&rel=0&hd=1″ type=”application/x-shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” width=”300″></embed></object>

…to produce this:

All of this applies to comments as well as essays, btw…

59 comments

Skip to comment form

  1. Edger

    For reference all of this is also covered in the  HTML Help link, which you’ll find in the sidebar under DharmaDocs.

    If you have any questions about this I’m here… 😉

  2. ek hornbeck

    that in essays the moderators of the site are mostly happy to edit your ‘artistic vision’ into compliance with the limitations of our page, in comments the only solution is to delete the offending comment.

    Permanently.

    width=”500″

    !

  3. ek hornbeck

    while I’m at it, stop with the too long Subjects in Comments.

    If you put more than 15 or 20 characters without a space in the first word you break our second column.

  4. dharmasyd

    …I’ll try to behave!  

    I zero zero one zero u 2 luv!

  5. AmericanRiverCanyon

    ….. what the ****.

    Thanks for the colors. That helps.  

  6. annapaxis

    01110100 01101000 01100001 01101110 01101011 00100000 01111001 01101111 01110101 00100000 01100101 01100100 01100111 01100101 01110010 00100000

  7. Compound F

    Pardon me for being kerfuffled.

    On a related note, does anyone know how to avoid this:

    java.sql.SQLException: Incorrect string value: ‘xCCx81namo…’ for column ‘extendedText’ at row 1

    which comes up after a successful “preview” when trying to “save?”

    I’ve tried various txt formats to strip-out any potentially erroneous and hidden characters, but no luck.

  8. Caribou Barbie

    Now we all have to go conformin’ to Docudharma’s fascist policy on YouTube width?  Just another example of socialism run amok in this great country of ours.

    When our founding fathers printed a pamphlet full of liberty and also patriotism, do you think they gave a gosh-darn heck about how WIDE it was?

    GIVE ME 960 PIXELS OR GIVE ME DEATH!!!

  9. Lady Libertine

    thanks edger.

  10. BruceMcF

    … when you click embed (now), you get options to change the color, with or without a border, etc. … but the smallest box offered standard is now 580 wide for widescreen formats.

    One thing to realize is that the whole “object” stuff can simply be deleted … only the “embed” tag is actually required. Then only one width has to be edited.

    <embed src=”http://www.youtube-nocookie.com/v/aBTZOg6l6cA&hl=en_US&fs=1&rel=0&color1=0x5d1719&color2=0xcd311b&border=1″ type=”application/x-shockwave-flash” width=”300″ height=”200″></embed>

    for:

  11. TomP

    Thank you.  I will use this both here and at dkos.

  12. TMC

    Another bookmarked essay in my tech tips.

  13. curmudgeon

    To ensure that I understand correctly, if we are publishing an essay, the absolute maximum width for a youtube video would be 580 pixels?  The more deeply indented a comment is, the more the width needs to be reduced so it doesn’t extend to the right of the horizontal yellowish-tan bar which appears just above the preview?  

    If we are adding a comment to a thread and there is any question, perhaps its best to start a new comment (making the full width available) rather than attaching a video as part of an indented comment, unless we are very certain that the video has been sufficiently reduced in width?

    Question:  If, despite our most diligent efforts, we accidentally post a comment that includes a video that is too wide, is there anything we can do after the fact to correct our error?  

    Comment:  Although some posting on this site remove the lettering from the photo icon (for instance, if this were done, the verbiage “Doobie Brothers — Takin’ It To The Streets” would be missing in the above example).  I leave the additional information intact on all of my attached videos, probably due to my own tendencies, which might also be the case for others.  

    I have limited time to look through essays and comments, and if a see a video with the explanatory lettering removed, I don’t know what it is ahead of time.  In some cases, I simply pass over it.  If I see a labeled video that is by Stevie Ray Vaughn, I’m 99.99% likely to give it a listen.  Conversely, if it is a song by Neil Diamond, that percentage plummets to single digit territory (sorry, Neil Diamond fans).  Perhaps it is just my own quirk, but then again it seems possible that others (at least some)may apply a similar strategy.

    Final question:  I have occasionally found photos on photobucket which are too wide (i.e., 640 pixels).  Is there an easy way (or any way, for that matter) to reduce the width of those photos?

    Thanks so much for everything you do, Edger.

Leave a Reply