XF 1.1 How do I get YouTube embeds in HD?

Booth

Well-known member
Is there anything I can add to the YouTube code that will make all the videos on my site default automatically in 720p? At the moment they are opening in 480p which looks nasty at times compared to the clear HD I've uploaded.
 
Is there anything I can add to the YouTube code that will make all the videos on my site default automatically in 720p? At the moment they are opening in 480p which looks nasty at times compared to the clear HD I've uploaded.
Modify your YouTube media code...

ACP => Home => BB Code Media Sites => YouTube

... and then change all references of "&fs=1" to "&fs=1&hd=1" (there are 3 of them in the default XF code).

After that create a new message and try embedding a video like this one. It should now play back at 720p.

Just watch out there because your visitors on slower connections might not appreciate the videos taking a lot longer to load & play.
 
This is odd, my code only has...

<iframe width="640" height="390" src="http://www.youtube.com/embed/{$id}?wmode=opaque" frameborder="0" allowfullscreen></iframe>

As you can see there's no "&amp;fs=1".

Any ideas?
Sounds like you changed your definition somewhere along the way to use the iframe version. The default XF definition is...
Code:
<object width="500" height="300" data="http://www.youtube.com/v/{$id}&amp;fs=1" type="application/x-shockwave-flash">
<param name="movie" value="http://www.youtube.com/v/{$id}&amp;fs=1" />
<param name="allowFullScreen" value="true" />
<param name="wmode" value="opaque" />
<embed src="http://www.youtube.com/v/{$id}&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" wmode="opaque" width="500" height="300" />
</object>

I am supposed to be heading out the door so I don't have a chance to test this right now but with your modified version try changing the "wmode=opaque" to "wmode=opaque&amp;hd=1" to see if that works.
 
It will work...but not on the iframe player...well not with that method of calling it directly at any rate.

As Kevin pointed out you can throw it on the end of the urls in the bbcode and it will work...mine looks like this.
HTML:
<object width="640" height="380" data="http://www.youtube.com/v/{$id}&amp;fs=1&amp;hd=1" type="application/x-shockwave-flash">
<param name="movie" value="http://www.youtube.com/v/{$id}&amp;fs=1&amp;hd=1" />
<param name="allowFullScreen" value="true" />
<param name="wmode" value="opaque" />
<embed src="http://www.youtube.com/v/{$id}&amp;fs=1&amp;hd=1" type="application/x-shockwave-flash" allowfullscreen="true" wmode="opaque" width="640" height="380" />
</object>
 
Yes I know that...(not the validation thing though) I was responding to kevin's post since he said he had to step away... I was pointing out that you can't throw the hd=1 into the url on the iframe player as it will not except it as I have read on the same link you posted actually.
 
Thanks for the advice everyone. Can't understand why that code was changed, I haven't changed it :confused:

I think YouTube 720p must be higher bitrate than Vimeo because it stutters on my Macbook Pro. So now I'm trying to figure out how to default to 480p.

YouTube defaulting to 360p is o_O
 
I think YouTube 720p must be higher bitrate than Vimeo because it stutters on my Macbook Pro. So now I'm trying to figure out how to default to 480p.
Getting it to default to 480p is a case of good news/bad news.

The good news is that "fmt=22" would default the player to 480p. (y)

The bad news is that it is no longer supported nor functional and so as of the current moment "hd=1" is the only option available to us. (n)
 
AFAIK YouTube is very clever and automatically presents the best quality that can be delivered with your broadband pipe, changing it to default to HD won't really benefit anyone. Those with fast lines should in theory already be getting videos in HD and those with slower line speeds are going to get stuttering.
 
Ciao everyone,
I would like to ask you a bit of your help, cause upon one of my users' suggestions, I've decided to implement this great solution to have YT videos embedded in HD 720 by default.

Please have a look at this discussion on my xenForo instance:
http://timelapseitalia.com/forum/threads/video-youtube-in-hd.1035/

The point is: although the code is perfectly embedded I guess - as per EQNoble code - videos are still starting at lower bitrates... :-/

Any chance you can help me sorting this thing out?

Thanks everyone
Marco
 
Top Bottom