Bug 58586 - Safari doesn't read WebM videos after installing Perian
: Safari doesn't read WebM videos after installing Perian
Status: RESOLVED INVALID
Product: WebKit
Classification: Unclassified
Component: Media Elements
: 528+ (Nightly build)
: Macintosh Intel Mac OS X 10.6
: P2 Normal
Assigned To: Nobody
http://webm.html5.org/
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-14 15:37 PDT by Anthony Ricaud
Modified: 2011-04-16 14:58 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Ricaud 2011-04-14 15:37:57 PDT
I have Perian 1.2.2 installed and I can play WebM videos with Quicktime. But Safari (5.0.5) does not play WebM videos.

In Help>Installed plugins, I see "QuickTime Plug-in 7.6.6" but not the mime types supported by Perian.
Comment 1 Alexey Proskuryakov 2011-04-15 00:28:24 PDT
Could you please give a link to an example that doesn't play? I don't see any when opening the bug URL.
Comment 2 Anthony Ricaud 2011-04-15 02:08:20 PDT
http://webm.html5.org/test.webm is the video used on the page linked.
Comment 3 Eric Carlson 2011-04-15 07:13:41 PDT
(In reply to comment #0)
> In Help>Installed plugins, I see "QuickTime Plug-in 7.6.6" but not the mime types supported by Perian.

This indicates that the 'mcfg' resource(s) in the Perian components don't indicate that the QuickTime plug-in should support the WebM MIME types. This should be filed as a bug against Perian.
Comment 4 Anthony Ricaud 2011-04-15 08:06:41 PDT
Filed http://trac.perian.org/ticket/572
Comment 5 Chris Forsythe 2011-04-15 08:22:52 PDT
(In reply to comment #3)
> (In reply to comment #0)
> > In Help>Installed plugins, I see "QuickTime Plug-in 7.6.6" but not the mime types supported by Perian.
> 
> This indicates that the 'mcfg' resource(s) in the Perian components don't indicate that the QuickTime plug-in should support the WebM MIME types. This should be filed as a bug against Perian.

We have video/webm in our mcfg. You're right though, it's not there. What did we miss?

Relevant source file for mkv/webm import:
http://trac.perian.org/browser/trunk/MatroskaImport.r#L302
Comment 6 Eric Carlson 2011-04-15 09:24:46 PDT
Opening http://webm.html5.org/test.webm on my 10.6.7 system with QuickTime 7.6.6 crashes both QuickTime Player and Safari with a nightly build of WebKit (https://bugs.webkit.org/show_bug.cgi?id=44826 is required for WebM support).

http://trac.perian.org/ticket/573
Comment 7 Chris Forsythe 2011-04-15 09:47:21 PDT
(In reply to comment #6)
> Opening http://webm.html5.org/test.webm on my 10.6.7 system with QuickTime 7.6.6 crashes both QuickTime Player and Safari with a nightly build of WebKit (https://bugs.webkit.org/show_bug.cgi?id=44826 is required for WebM support).
> 
> http://trac.perian.org/ticket/573

I'm not sure that this is related, since the component loaded is not perian per the crash log. It's a separate issue regardless, and not related to webkit or safari since it happens in both.
Comment 8 Alexander Strange 2011-04-15 10:57:23 PDT
After deleting ~/Library/Preferences/com.apple.quicktime.plugin.preferences.plist, the MIME types for .webm and .mkv corresponding to Perian's mcfg appeared. It seemed to be improperly cached by the QuickTime plugin.
Comment 9 Andy Estes 2011-04-15 14:05:50 PDT
(In reply to comment #8)
> After deleting ~/Library/Preferences/com.apple.quicktime.plugin.preferences.plist, the MIME types for .webm and .mkv corresponding to Perian's mcfg appeared. It seemed to be improperly cached by the QuickTime plugin.

If this file doesn't exist, WebKitPluginHost loads the QuickTime bundle and calls a function that generates this file. If the file does exist, we read it directly for MIME type information. I'm not sure who's responsibility it is to regenerate this file if it's stale.
Comment 10 Eric Carlson 2011-04-15 14:17:41 PDT
(In reply to comment #9)
> 
> If this file doesn't exist, WebKitPluginHost loads the QuickTime bundle and calls a function that generates this file. If the file does exist, we read it directly for MIME type information. I'm not sure who's responsibility it is to regenerate this file if it's stale.

Scanning all installed components to see what MIME types they handle is fairly expensive so the plug-in doesn't do it on startup. I believe the QuickTime installer forces the file to be regenerated when a new version of QuickTime is installed.
Comment 11 Andy Estes 2011-04-15 14:33:27 PDT
(In reply to comment #10)
> (In reply to comment #9)
> > 
> > If this file doesn't exist, WebKitPluginHost loads the QuickTime bundle and calls a function that generates this file. If the file does exist, we read it directly for MIME type information. I'm not sure who's responsibility it is to regenerate this file if it's stale.
> 
> Scanning all installed components to see what MIME types they handle is fairly expensive so the plug-in doesn't do it on startup. I believe the QuickTime installer forces the file to be regenerated when a new version of QuickTime is installed.

Perhaps Perian should delete this file during installation. Safari will re-create it the next time it's launched.
Comment 12 Chris Forsythe 2011-04-15 14:37:49 PDT
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #9)
> > > 
> > > If this file doesn't exist, WebKitPluginHost loads the QuickTime bundle and calls a function that generates this file. If the file does exist, we read it directly for MIME type information. I'm not sure who's responsibility it is to regenerate this file if it's stale.
> > 
> > Scanning all installed components to see what MIME types they handle is fairly expensive so the plug-in doesn't do it on startup. I believe the QuickTime installer forces the file to be regenerated when a new version of QuickTime is installed.
> 
> Perhaps Perian should delete this file during installation. Safari will re-create it the next time it's launched.

Wouldn't it be more appropriate for quicktime to do this for any component update?
Comment 13 Andy Estes 2011-04-15 14:40:52 PDT
(In reply to comment #12)
> Wouldn't it be more appropriate for quicktime to do this for any component update?

Yes. I was just suggesting file deletion as a workaround.
Comment 14 Alexey Proskuryakov 2011-04-15 14:49:42 PDT
> Wouldn't it be more appropriate for quicktime to do this for any component update?

Please file a bug via <http://bugreport.apple.com>, and post the number here. Bugzilla is only suitable for open source WebKit issues.
Comment 15 Eric Carlson 2011-04-15 14:55:09 PDT
(In reply to comment #12)
> Wouldn't it be more appropriate for quicktime to do this for any component update?

QuickTime doesn't know when new components are installed. 

The OS X QuickTime plug-in originally created the list of MIME types dynamically, the first time it was opened in a process, but browsers complained that it slowed page load times too much so it was changed to the current behavior.
Comment 16 Anthony Ricaud 2011-04-15 15:09:38 PDT
Like I said on the Perian side, deleting the plist file does not help for playing WebM in Safari (or nightly). The plist file contains the webm, mkv and other mime types but I can't see them listed in "Installed plugins" in Safari.

If it helps, I'm on a French system.
Comment 17 Andy Estes 2011-04-15 19:42:53 PDT
(In reply to comment #16)
> Like I said on the Perian side, deleting the plist file does not help for playing WebM in Safari (or nightly). The plist file contains the webm, mkv and other mime types but I can't see them listed in "Installed plugins" in Safari.
> 
> If it helps, I'm on a French system.

Anthony, if you open the plist file on your system and find the entry for 'video/webm', what is the value for the key 'WebPluginTypeEnabled'?
Comment 18 Anthony Ricaud 2011-04-16 05:01:11 PDT
(In reply to comment #17)
> Anthony, if you open the plist file on your system and find the entry for 'video/webm', what is the value for the key 'WebPluginTypeEnabled'?

False. I tried changing to True but every time I launch a nightly, this is reverted to False.
Comment 19 Graham Booker 2011-04-16 07:13:58 PDT
(In reply to comment #17)
> Anthony, if you open the plist file on your system and find the entry for 'video/webm', what is the value for the key 'WebPluginTypeEnabled'?

I was discovering this as well on my system, so I added the canMovieImportPartial to Perian's importer flags, and now it seems to set WebPluginTypeEnabled to true when it rebuilds this cache.  With Perian trunk and Webkit nightly, I seem to be able to play webm inside video tags just fine.  (The released Safari seems to have issues with the type='video/webm; codecs="vp8, vorbis"' attribute inside a source tag and not even try to play)
Comment 20 Andy Estes 2011-04-16 13:13:52 PDT
(In reply to comment #18)
> (In reply to comment #17)
> > Anthony, if you open the plist file on your system and find the entry for 'video/webm', what is the value for the key 'WebPluginTypeEnabled'?
> 
> False. I tried changing to True but every time I launch a nightly, this is reverted to False.

This sounds like a bug in Perian or QuickTime. WebKit is doing the right thing by ignoring disabled entries.
Comment 21 Andy Estes 2011-04-16 13:17:22 PDT
(In reply to comment #19)
> (In reply to comment #17)
> > Anthony, if you open the plist file on your system and find the entry for 'video/webm', what is the value for the key 'WebPluginTypeEnabled'?
> 
> I was discovering this as well on my system, so I added the canMovieImportPartial to Perian's importer flags, and now it seems to set WebPluginTypeEnabled to true when it rebuilds this cache.  With Perian trunk and Webkit nightly, I seem to be able to play webm inside video tags just fine.  (The released Safari seems to have issues with the type='video/webm; codecs="vp8, vorbis"' attribute inside a source tag and not even try to play)

I'm aware of at least one fix dealing with how we handle a codecs parameter containing double quotes:

https://bugs.webkit.org/show_bug.cgi?id=53275

This was fixed recently and might explain the progression. I haven't done a proper bisection with a test case so I don't know for sure.

I'm going to close this since it doesn't sound like there are any WebKit bugs here.
Comment 22 Eric Carlson 2011-04-16 14:58:41 PDT
(In reply to comment #19)
> The released Safari seems to have issues with the type='video/webm; codecs="vp8, vorbis"' 
> attribute inside a source tag and not even try to play

This was fixed in r66313 (https://bugs.webkit.org/show_bug.cgi?id=44826).