YouTube HTML5 videos play poorly after installing Perian

The Perian forums have moved to Google Groups, this forum is read only.
iDude
Harmless
Posts: 4
Joined: Mon Sep 19, 2011 4:37 am

YouTube HTML5 videos play poorly after installing Perian

Postby iDude » Mon Sep 19, 2011 5:36 am

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.

gbooker
Cocoaforge Admin
Posts: 723
Joined: Sat May 06, 2006 2:47 am
Contact:

Re: YouTube HTML5 videos play poorly after installing Perian

Postby gbooker » Mon Sep 19, 2011 1:52 pm

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.

User avatar
zac
Cocoaforge Admin
Posts: 1518
Joined: Sun Mar 27, 2005 3:19 pm
Contact:

Re: YouTube HTML5 videos play poorly after installing Perian

Postby zac » Mon Sep 19, 2011 2:06 pm

Is there a mechanism for reporting hardware acceleration support? It sounds like Google is doing the "right thing" if you can't report it.

iDude
Harmless
Posts: 4
Joined: Mon Sep 19, 2011 4:37 am

Re: YouTube HTML5 videos play poorly after installing Perian

Postby iDude » Mon Sep 19, 2011 2:27 pm

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?

gbooker
Cocoaforge Admin
Posts: 723
Joined: Sat May 06, 2006 2:47 am
Contact:

Re: YouTube HTML5 videos play poorly after installing Perian

Postby gbooker » Mon Sep 19, 2011 11:25 pm

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.

drdoom567
Harmless
Posts: 2
Joined: Sun Mar 04, 2012 11:53 am

Re: YouTube HTML5 videos play poorly after installing Perian

Postby drdoom567 » Sun Mar 04, 2012 11:58 am

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.

gbooker
Cocoaforge Admin
Posts: 723
Joined: Sat May 06, 2006 2:47 am
Contact:

Re: YouTube HTML5 videos play poorly after installing Perian

Postby gbooker » Sun Mar 04, 2012 4:07 pm

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.

drdoom567
Harmless
Posts: 2
Joined: Sun Mar 04, 2012 11:53 am

Re: YouTube HTML5 videos play poorly after installing Perian

Postby drdoom567 » Tue Mar 06, 2012 8:40 pm

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?

gbooker
Cocoaforge Admin
Posts: 723
Joined: Sat May 06, 2006 2:47 am
Contact:

Re: YouTube HTML5 videos play poorly after installing Perian

Postby gbooker » Tue Mar 06, 2012 10:20 pm

Patches welcome.

mikesilv
Harmless
Posts: 1
Joined: Fri Mar 30, 2012 2:19 am

Re: YouTube HTML5 videos play poorly after installing Perian

Postby mikesilv » Fri Mar 30, 2012 2:24 am

No patches required. Just uninstall Perian.

PowerCD
Harmless
Posts: 1
Joined: Sun Apr 29, 2012 9:45 am

Re: YouTube HTML5 videos play poorly after installing Perian

Postby PowerCD » Sun Apr 29, 2012 2:31 pm

It would help if we can switch each codec on and off in the prefs.

gbooker
Cocoaforge Admin
Posts: 723
Joined: Sat May 06, 2006 2:47 am
Contact:

Re: YouTube HTML5 videos play poorly after installing Perian

Postby gbooker » Sun Apr 29, 2012 6:48 pm

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.

Zr40
Harmless
Posts: 1
Joined: Mon Apr 30, 2012 4:52 pm

Re: YouTube HTML5 videos play poorly after installing Perian

Postby Zr40 » Mon Apr 30, 2012 4:59 pm

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.

gbooker
Cocoaforge Admin
Posts: 723
Joined: Sat May 06, 2006 2:47 am
Contact:

Re: YouTube HTML5 videos play poorly after installing Perian

Postby gbooker » Mon Apr 30, 2012 5:56 pm

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.


Return to “Perian”

Who is online

Users browsing this forum: Baidu [Spider], Yahoo [Bot]