WordPress.org

Ready to get started?Download WordPress

Forums

Youtube shortcode
[resolved] hd option is ignored (5 posts)

  1. Vezado
    Member
    Posted 2 years ago #

    all the other options i've tried seem to be working so far, but even with hd=1 i need to manually select 720p after the video begins to play.

    http://wordpress.org/extend/plugins/youtube-shortcode/

  2. Tubal
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Vezado,

    Thanks for reporting!

    Could you paste a link to the video that shows that behaviour?

    Cheers,

  3. Tubal
    Member
    Plugin Author

    Posted 2 years ago #

    Hi there again,

    You're right, hd=1 has no effect if the size of the embedded video player is smaller than 745 pixels in height.

    Why is this?

    With the new embed method (iframe), Youtube estimates the "best" video quality according to the size (dimensions) of the embedded video player.
    This means you need to set a height of 505px to play a video at 480p by default or a height of 745px to play it at 720p by default (when video starts playing).

    In Youtube's website hd=1 works as expected no matter the video player size...but that works only in http://www.youtube.com

    The only way to force a specific video resolution (quality such as 360p, 480p, 720p...) is through the iframe API (Javascript) but right now, it is still under development and should not be used in production.

    When that API is released, I'll add that feature to the plugin, don't worry, but right now, it is not possible to set a specific video quality for each video since it's determined by the size of the video player.

    As Youtube's official docs suggest:
    hd=1 -> You should ensure your player is large enough to display the video in its native resolution.

    Take a look at this doc for further info:
    http://www.google.com/support/youtube/bin/answer.py?hl=en&answer=178264

    Hope this helps and enjoy the plugin!!

  4. Vezado
    Member
    Posted 2 years ago #

    Thanks for the rapid response and thorough explanation. I'm disappointed that YouTube chose to not implement this option. I'm embedding screen captures on my site (1280x720p) and students will have to enable the option manually for every single video, not a great system. It's kind of assumed that the videos will be watched in full screen mode...

    I don't see that iframe method estimates best video quality on their site, in fact they show the option listed but shouldn't always be used:

    IMAGE

    I love HD, should I always check the "play in HD" box for the videos I embed on my site?

    Short answer: No! Here's why...

    Checking "play in HD" triggers, when available, a video resolution of 1280x720 (referred to as 720p) or 1920x1080 (referred to as 1080p).

    When using the "Play in HD" option, it's best to embed the player at a very large size (at least 1280x745) in order to accommodate the large size of the video. If you play HD video in a small player, the user's computer works overtime to scale down the video to fit within the player, which may result in choppy playback. It's always best to play the video size that best fits the size of the video player. And if you want even better performance when watching HD content, you can choose to watch it in full-screen.

    They do mention that the HD option has no effect on the chromeless player (and the AS3 player), but that doesn't apply here does it?

    http://code.google.com/apis/youtube/player_parameters.html#hd

  5. Tubal
    Member
    Plugin Author

    Posted 2 years ago #

    Unfortunately, yes, it does apply to any kind of embeds (except to the old Flash AS2 embed code).

    You can read this topic where more developers ask the same question:
    http://www.google.com/support/forum/p/youtube/thread?tid=6c44be48d118b529&hl=en

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic