Bug 58586 - Safari doesn't read WebM videos after installing Perian
: Safari doesn't read WebM videos after installing Perian
Status: RESOLVED INVALID
: WebKit
Media Elements
: 528+ (Nightly build)
: Macintosh Intel Mac OS X 10.6
: P2 Normal
Assigned To:
: http://webm.html5.org/
:
:
:
  Show dependency treegraph
 
Reported: 2011-04-14 15:37 PST by
Modified: 2011-04-16 14:58 PST (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2011-04-14 15:37:57 PST
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 From 2011-04-15 00:28:24 PST -------
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 From 2011-04-15 02:08:20 PST -------
http://webm.html5.org/test.webm is the video used on the page linked.
------- Comment #3 From 2011-04-15 07:13:41 PST -------
(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 From 2011-04-15 08:06:41 PST -------
Filed http://trac.perian.org/ticket/572
------- Comment #5 From 2011-04-15 08:22:52 PST -------
(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 From 2011-04-15 09:24:46 PST -------
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 From 2011-04-15 09:47:21 PST -------
(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 From 2011-04-15 10:57:23 PST -------
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 From 2011-04-15 14:05:50 PST -------
(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 From 2011-04-15 14:17:41 PST -------
(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 From 2011-04-15 14:33:27 PST -------
(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 From 2011-04-15 14:37:49 PST -------
(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 From 2011-04-15 14:40:52 PST -------
(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 From 2011-04-15 14:49:42 PST -------
> 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 From 2011-04-15 14:55:09 PST -------
(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 From 2011-04-15 15:09:38 PST -------
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 From 2011-04-15 19:42:53 PST -------
(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 From 2011-04-16 05:01:11 PST -------
(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 From 2011-04-16 07:13:58 PST -------
(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 From 2011-04-16 13:13:52 PST -------
(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 From 2011-04-16 13:17:22 PST -------
(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 From 2011-04-16 14:58:41 PST -------
(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).