Page 1 of 1

YouTube HTML5 videos play poorly after installing Perian

Posted: Mon Sep 19, 2011 5:36 am
by iDude
I don't have Flash installed and have enabled 'HTML5' option on youtube.com/html5.

After installing Perian 1.2.3 many HTML5 YouTube videos play extremely poorly.
There's a significant delay before playback starts, lots of dropped frames, the whole browser freezes and videos look more like slideshows. Audio plays fine, though.

Turns out, when Perian is installed, YouTube prefers WEBM codec over H.264. It seems that WEBM video plays without any hardware acceleration — Activity Monitor shows CPU usage of 'QTKitServer-(1836) Safari Web Content' exceeding 100%.

If I uninstall Perian, youtube.com/html5 shows that WEBM codec is not supported, I receive H.264 video and everything works fine.

However, I'd like to keep Perian to play Xvid movies. Is there a way to disable just the WEBM codec and keep Xvid enabled?

My configuration:
MacBook Pro 13" (9400M)
Lion 10.7.1
Safari 5.1
Perian 1.2.3

No Flash, no other 3rd party QT components.

Re: YouTube HTML5 videos play poorly after installing Perian

Posted: Mon Sep 19, 2011 1:52 pm
by gbooker
iDude wrote:It seems that WEBM video plays without any hardware acceleration

That's because it can't be accelerated since no one makes any hardware to decode the thing.

The responsibility for this really belongs on YouTube. Google needs to get off of their political agenda and serve the best content for the situation. Even among those capable of playing WebM, a majority don't want it for precisely the reason you stated, but Google doesn't care since they own WebM and are trying to make it the primary format on the web. Perian and Safari are behaving properly in reporting capabilities; it is the content provider's responsibility to select the best codec to use. Google's choice of WebM is always better than MP4 is entirely wrong, especially for HD content.

Re: YouTube HTML5 videos play poorly after installing Perian

Posted: Mon Sep 19, 2011 2:06 pm
by zac
Is there a mechanism for reporting hardware acceleration support? It sounds like Google is doing the "right thing" if you can't report it.

Re: YouTube HTML5 videos play poorly after installing Perian

Posted: Mon Sep 19, 2011 2:27 pm
by iDude
Thanks for the explanation, gbooker. Seems just as we almost forgot the horrors of WMV and Real, another vendor cooks up its own format and forces it down everyone's throats.

So when the browser reports that it can play a video format, it's a boolean condition: "mp4=yes, webm=yes". Maybe a weighted list would be a better solution, for example: "mp4=1.0; flv=0.2; webm=0.2" meaning that the server should preferably send MP4 if available, or either FLV or WEBM otherwise. Unfortunately, at this point it's unlikely that browser makers would adopt anything like that, and it doesn't have anything to do with Perian anyway.

I think though that hardware acceleration is only part of the problem, because it occurs even with 360p videos. The FAQ says:
Why does it take so long for MKV to load?

QuickTime expects to know the location of every single frame in a movie in order to play it. This is easy with its native format, MOV/MP4, but more difficult for several others, including MKV. Perian has to read in the entire file in order for seeking and playback to work.


As WEBM is based on MKV, perhaps that is the cause of the problem? If so, then wouldn't it be better just to disable WEBM in Perian if it cannot provide satisfactory experience, and leave it to Google to provide a decent WEBM codec for Safari like they do for IE9?

Re: YouTube HTML5 videos play poorly after installing Perian

Posted: Mon Sep 19, 2011 11:25 pm
by gbooker
zac wrote:Is there a mechanism for reporting hardware acceleration support? It sounds like Google is doing the "right thing" if you can't report it.

The "right thing" is for the user to be able to specify which format they prefer and to default to H.264 due to the fact that it's hardware decoding is quite prevalent and WebM's is completely non-existant. As far as I know, there is no mechanism for reporting the presence of hardware acceleration, but I haven't looked at the spec.

Re: YouTube HTML5 videos play poorly after installing Perian

Posted: Sun Mar 04, 2012 11:58 am
by drdoom567
exact same problem here. play delay on loading of a youtube video. safari laggs extremely on higher youtube-video resolutions than 360p. qtkitserver uses all the cpu time. i have read through this thread. so why don't you just add a switch in the pref-pane to turn WebM support on or off. that would solve the problem for all the people out there, struggling with that problem. i have a windows-history so i need perian. i rely on it to play all my media.

Re: YouTube HTML5 videos play poorly after installing Perian

Posted: Sun Mar 04, 2012 4:07 pm
by gbooker
drdoom567 wrote:i have read through this thread.

Then I shouldn't have to repeat myself. For the third time, this is not the responsibility of a codec and thus is not the responsibility of Perian.

Re: YouTube HTML5 videos play poorly after installing Perian

Posted: Tue Mar 06, 2012 8:40 pm
by drdoom567
gbooker wrote:
drdoom567 wrote:i have read through this thread.

Then I shouldn't have to repeat myself. For the third time, this is not the responsibility of a codec and thus is not the responsibility of Perian.


for me as end-user it doesn't matter which thing causes that problem. the best for all users is to provide a workaround for this behavior rather than waiting for others to do so. i really think you miss the point here. perian is making trouble with this and you should go and fix it. simple thing. and if it means you have to remove WebM support in perian. who needs that anyway?

Re: YouTube HTML5 videos play poorly after installing Perian

Posted: Tue Mar 06, 2012 10:20 pm
by gbooker
Patches welcome.

Re: YouTube HTML5 videos play poorly after installing Perian

Posted: Fri Mar 30, 2012 2:24 am
by mikesilv
No patches required. Just uninstall Perian.

Re: YouTube HTML5 videos play poorly after installing Perian

Posted: Sun Apr 29, 2012 2:31 pm
by PowerCD
It would help if we can switch each codec on and off in the prefs.

Re: YouTube HTML5 videos play poorly after installing Perian

Posted: Sun Apr 29, 2012 6:48 pm
by gbooker
For the fourth time: this is not the responsibility of a codec and thus is not the responsibility of Perian. This is solely and completely the responsibility of the browser.

Re: YouTube HTML5 videos play poorly after installing Perian

Posted: Mon Apr 30, 2012 4:59 pm
by Zr40
But Perian is not a codec, it's a collection of codecs. Right now, the only options are to stop using YouTube or to stop using Perian.

If this issue is really caused or triggered by the WebM codec included with Perian, the easiest workaround would be to disable that codec. Perian currently does not allow this.

Re: YouTube HTML5 videos play poorly after installing Perian

Posted: Mon Apr 30, 2012 5:56 pm
by gbooker
I love how people here are trying to say what is easy and what is not when they understand very little about how codecs really work in the QuickTime architecture. If you think it is so easy, then do it yourself and they you will discover that your claims are wildly inaccurate. It is far, far easier to grab the source to WebKit, Chromium, or Firefox, and put the options in there than to disable certain codecs on demand.