How to add frames to youtube videos?

  • Author
    Posts
  • #465589

    arzan86
    Member

    I have an image of a customized frame on my computer and I want it to be the frame of a youtube video on my wordpress blog. How do I do this? The frame has been created keeping in mind the dimensions of the video and I have also created the frame in such a way that the center of the frame and the center of the video will be the same. Please help me with this.
    Thank you.

    The blog I need help with is arzan86.wordpress.com.

    #465737

    Interesting question… Please upload the image and paste its URL here, also give me the dimensions of the video.

    #465903

    arzan86
    Member

    640×385

    #465905

    Paste this into the html post editor:

    <p style="background-image:url('http://arzan86.files.wordpress.com/2010/04/frame.jpg');width:778px;height:402px;padding-top:16px;">
    YOUTUBE SHORTCODE HERE
    </p>

    One reservation: it’s ok in Firefox, Safari, Opera and Flock, but I can’t check it in the wretched IE at the moment. Can you?

    #465906

    arzan86
    Member

    i can get the frame but at the same time when i am trying to fit the video in it, the image is repeating itself which i don’t want. Also i want the frame image at the centre because the video by default appears at the centre. What do i do?

    #465908

    To ensure there’s no repeat, you can add this to the code:

    background-repeat:no-repeat;

    But the numbers I put were tailored to the objects you gave me. Since I specified a fixed width, there should be no repeat unless you’re trying to change things. What exactly are you trying to do? The video you’ve got on your post now is 425×350, not 640×385.

    In my opinion a centered video doesn’t look good in Rubric. Anyway, if you want the whole thing centered, use this:

    <div class="aligncenter" style=
    [etc.]
    </div>

    #465909

    andrew
    Member

    @pan, you are a hero. “it’s ok in Firefox, Safari, Opera and Flock, but I can’t check it in the wretched IE at the moment.”
    I’m not sure what’s more heroic: checking in 4 different browsers; or being willing to check it in IE :)

    #465910

    arzan86
    Member

    I tried to do as you directed but i can only stop the repeatation and cant control the alignment. so according to your reply, i am sending you another URL of the image according to the video size you mentioned above (425×350). can u please send me the entire code as i am not at all good at codes. Also i want to make sure that in future whenever i attach a video i would be able to use the same frame.what should i do?

    #465911

    arzan86
    Member

    as you can see in the blog the size is fitting but there is no alignment. please help

    #465912

    @andrew: Thanks, but there’s nothing heroic in opening 4 browsers! I’m using Safari and Firefox anyway, and I just click the buttons on my dock for the other two (I’ve set my tests blog as their start page).

    As for IE, you’re right I guess, but you know that more than 50% of internet users use it (for no better reason than that it happens to be the browser planted in their PCs), so you can’t ignore the damn thing. There’s no telling how many tricks and workarounds I’ve trashed because the creature wouldn’t understand…

    #465913

    @arzan86:

    <div class="aligncenter" style="background-image:url('http://arzan86.files.wordpress.com/2010/04/frame3.jpg');width:500px;height:356px;padding-top:6px;padding-left:1px;">
    YOUTUBE SHORTCODE HERE
    </div>

    (But as I said, I don’t agree with centering in Rubric.)

    To use this with other 425×350 videos, you just change the video shortcode. For different dimensions and images, note that the width I’m specifying is the width of the image, and the height is the height of the image minus the top padding.

    #465914

    1tess
    Moderator Emeritus

    re: centering in rubric
    curious why?

    #465915

    Curious why arzan wants it or why I don’t like it?

    #465916

    1tess
    Moderator Emeritus

    you!

    #465917

    arzan86
    Member

    Thank you for solving my problem

    #465920

    @arzan86: You’re welcome.

    @tess: Because it’s a flexible-width theme. As you know, resizing the browser window horizontally will make the video slide about, and I find that quite unnatural.

    #465922

    Hi arzan86 here.

    M trying to place that same video with the same code that you gave but due to some reason the frame and the video are going out of the area. why is this happening and how do i solve this problem?

    Also i want to know that if different themes have different measurements than how can i get the accurate measurement of my blog area and also when i place a video, what should i keep in mind?

    #465926

    arzan86
    Member

    how can i control the size of a youtube video inorder to fix it in the same frame?

    #465927

    myninjaway
    Member
    #465928

    @compactdestinationexperts: Please paste the URL of your blog when asking questions here, or link your username to your blog (as explained in the Sticky 8 Things to Know Before Posting). We can’t help without that.

    @arzan86: You modify the shortcode this way (replacing WWW and HHH with numbers, of course):
    [youtube=URL HERE&w=WWW&h=HHH]
    Or just
    [youtube=URL HERE&w=WWW]
    (Specifying width only will change the height too in proportion.)

    @myninjaway: You posted, and got replies, here:
    https://en.forums.wordpress.com/topic/my-freinds-biomedical-blog-suspended?replies=4
    Don’t hijack irrelevant threads.

The topic ‘How to add frames to youtube videos?’ is closed to new replies.