1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 YouTube Embedded Speed?

Discussion in 'Troubleshooting and Problems' started by ScottLott, May 29, 2012.

  1. ScottLott

    ScottLott Member

    Hey Guys,
    My members and I have noticed that videos don't load as fast when they are embedded on the forum as when you're playing them on the YouTube site.

    Here is an example thread:
    http://www.rcpowers.com/community/t...ooting-star-or-maybe-a-ufo.13022/#post-130076

    And the Video:


    I'm not sure if it's an issue with XenForo, the server, or YouTube, but I didn't notice the issue when we were running vBulletin 4. Any ideas?
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    This would be 100% down to YouTube.

    Though I haven't noticed any problem here, my own forum or on the link you posted.
     
    ScottLott likes this.
  3. ScottLott

    ScottLott Member

    I assumed as much, thanks for confirming!
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The client browser can also have a big effect on this. I noticed that flash performance increased considerably when I upgraded from FF 3.6 to FF 12.
     
    ScottLott and Yorick like this.
  5. Adam Howard

    Adam Howard Well-Known Member

    Firefox 13 corrects that ;)
     
    ScottLott likes this.
  6. Chris D

    Chris D XenForo Developer Staff Member

    I have to stop assuming that everyone uses a decent browser... because they just don't :D

    Yeah, Jake is spot on. Could definitely be a client browser too - but certainly not a XenForo thing. The YouTube content is rendered in an iframe so your browser just goes to YouTube to get the content.
     
    ScottLott likes this.
  7. ScottLott

    ScottLott Member

    Wow guys, excellent answers. I hadn't considered that the rendering engine of the browser could affect playback speed in an iframe, but that makes perfect sense. Thanks so much!
     
  8. Ingenious

    Ingenious Well-Known Member

    I found this too, viewing any YT video embedded in the forum was quite stuttery compared to viewing it on YT itself. What fixed it for me was upgrading my RAM from 4GB to 8GB and also upgrading Firefox. So I'm now fine, but some of my forum members are not. Anyone running older browsers or slower machines can struggle with video or image heavy posts, but as others have said above, it's not XenForo.
     
  9. Chris D

    Chris D XenForo Developer Staff Member

    Doubling the RAM is very extreme.

    Though having an up to date browser is an absolute must.

    If you check my most recent resource I released there's one that notifies users of their old browsers.

    Another method is YouTube still has available older embed code which is more compatible with older browsers. In theory you could replace the XenForo code that pulls the iframe with the old code that does embedding.

    Though technically, iframe should be better!
     
  10. Chris D

    Chris D XenForo Developer Staff Member

    Here's the code.

    Admin CP > BB Code Media Sites > YouTube

    Replace all code in Embed HTML with:

    Code:
    <object width="500" height="300"><param name="movie" value="http://www.youtube.com/v/{$id}?version=3&amp;hl=en_GB&amp;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/{$id}?version=3&amp;hl=en_GB&amp;rel=0" type="application/x-shockwave-flash" width="500" height="300" allowscriptaccess="always" allowfullscreen="true"></embed></object>
    I haven't tested this, but it is the old embed code and should work.
     
    Ingenious likes this.
  11. Ingenious

    Ingenious Well-Known Member

    PS. I didn't double my RAM just to load videos quicker :) I doubled it for other reasons, but noticed a stark and immediate increase in browsing performance (odd actually, as it's already a Core 2 Duo Macbook Pro, but it wasn't exactly swift at browsing big web pages, until the ram upgrade).

    Good point Yorick about the iframes and old embed code, it might be why some older forum users (including mine from when I ran vB3) reckon Xenforo is slower with video stuff. Be interesting if someone tries this out and sees if it's quicker.
     

Share This Page