EasyCodecInstallation

Summary

Messages about unsupported gstreamer formats are currently unhelpful. This utility assists users in installing the packages needed to use those formats.

Use cases

  • Carlos has just installed Ubuntu on his computer and has connected his ipod to it. When he tries to play an mp3 file from it, he gets a dialog suggesting to install gstreamer0.10-plugins-ugly to play that file.
  • Michael is trying to play a video, the codec required to decode the video part is not installed. Instead of playing only the audio track with visual effect totem suggests to install gstreamer0.10-ffmpeg so the video content can be decoded too.

Scope

The gstreamer0.10 packages, rhythmbox, totem on the Ubuntu desktop.

Design

This spec primarily targets gstreamer plugins (which in a couple of years will be the only media framework that we use). Other media frameworks, however, could use the work done here.

When the user attempts to play a media file which requires additional plugins the user should be presented with a dialog allowing them to install the required codecs, demuxers, sources, etc.

If the user is not a member of the admin group, and is thus unable to install packages, the program should instead display a message indicating that attention is needed from an administrator in order to install the necessary software.

It will not be necessary to restart the application after the plugin installation.

Implementation

The process will start when gstreamer recognises that a required plugin is unavailable. gstreamer will notify the application (totem, etc) that a plugin is missing. The application will take this message and feed it through to libgimme-codec which will search for an available plugin and install it if possible.

In the case that a plugin is available and installation succeeds the media will start playing once the install is finished.

In the case that a plugin is available but the user does not have admin priviledges, the user will be given an error message suggesting that they seek help from their admin.

In the case that a plugin is available but installaton has failed, the user will have experienced the error first-hand during the failed package install process and the media program should not generate an additional error message. This is the same case as the user manually cancelling the installation.

In the case that a plugin is not available the user will be given an error message similar to the current error saying that the current file is unable to be played with the currently available codecs. The message will be made more helpful by including the actual codecs missing in the message.

gstreamer

gstreamer needs to be modified to return the missing element when trying to play a file which can't be decoded. Gstreamer upstream are working on that already and the feature should be available before feature freeze. Details can be read on http://webcvs.freedesktop.org/gstreamer/gstreamer/docs/random/draft-missing-plugins.txt

gstreamer packages

The gstreamer plugin packages need to be modified to run gst-inspect on each .so that is produced by the build. This will generate a list of capabilities provided by each package. The list of capabilities will be installed into a metafile inside the package (similar to a .desktop file, possibly actually a .desktop file). These files will then be collected and inspected by the same cron job that generates the list of which packages support which mime types. The information will be injected into the gnome-app-install package.

packages installation

Ryan Lortie has written a "libgimme-codec" which will be used by the applications. The library makes use of a distribution-specific helper script to do the heavy lifting of getting the codecs installed. On Ubuntu this helper script will be a trivial wrapper around gnome-app-install which will open a modal dialog over the application and install the packages. A first version of the library has been packaged and will be uploaded soon. The interface is sufficiently generic that it should be acceptable for use by all distributions and all media players so it is hoped that we can get upstream using that library too. For now, we will vendor patch the applications in question.

The gnome-app-install changes required are described by the https://features.launchpad.net/distros/ubuntu/+spec/gnome-app-install-codecs specification.

applications

The applications will need to be patched to use the new libgimme-codec and to refresh the gstreamer index after a package installation.

Essentially, when gstreamer throws an error message saying "i need codecs" the app will be responsible for catching this error and passing it to libgimme-codec. They will also provide a callback function into their own code that will be called when the install is complete. This function will have to ask gstreamer to rebuild its view of the registry, then restart the pipeline that caused the initial error.

Codec Packages

There are currently codecs in the following packages:

  • gstreamer0.10-esd
  • gstreamer0.10-plugins-base
  • gstreamer0.10-plugins-farsight
  • gstreamer0.10-plugins-good
  • gstreamer0.10-alsa
  • gstreamer0.10-sdl
  • gstreamer0.10-plugins-bad
  • gstreamer0.10-gl
  • gstreamer0.10-plugins-bad-multiverse
  • gstreamer0.10-plugins-ugly-multiverse
  • gstreamer0.10-gnomevfs
  • gstreamer0.10-x
  • gstreamer0.10-plugins-ugly
  • gstreamer0.10-ffmpeg

The most interesting ones are:

  • gstreamer0.10-plugins-ugly, universe dependencies:
    • liba52-0.7.4
    • libdvdread3
    • libmpeg2-4
    • libsidplay1
  • gstreamer0.10-ffmpeg, universe dependencies:
    • none
  • gstreamer0.10-plugins-bad, universe dependencies:
    • libmms0
    • libswfdec0.3
    • libwavpack0

Outstanding issues

Kubuntu doesn't currently use gstreamer for its media players, so it won't benefit from this until that changes (amarok (using xine) in Edgy has this resolved for mp3 codecs being installed by a script). Apparently, the issue is that they need porting to gstreamer 0.10.

We should consider the possibility of allowing users to purchase codecs or about warning them of potential legal problems associated with installation of certain codecs. This would be a simple modification to the Ubuntu-specific libgimme-codec helper script and would not have to be done on an application-by-application basis.

Suggestions from VideoPlaybackRoadmap

also see DesktopTeam/CommonInstallHook --SamTygier

Comments

Comments have been moved to EasyCodecInstallation/Comments


CategorySpec

EasyCodecInstallation (last edited 2008-08-06 16:27:02 by localhost)