EasyCodecInstallation

Revision 32 as of 2006-11-08 19:31:24

Clear message

Summary

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

Use cases

  • Frederic is a new Linux user on DSL. He attempts to open an mp3 file through a gstreamer application and receives an assistant to help him download and install the needed codecs.
  • Vincent, also new to Linux, is not on the internet. He attempts to open a QuickTime file and is given a different assistant with instructions on how to download the files he needs from an official Ubuntu mirror, and an offer to locate file if he already has a copy handy.

  • Mark is a normal user, he attempts to open an avi file for which the video codec is for sale on some online store; a browser pops up with a web page explaining how to buy and install the codec.
  • John inserts a DVD of his favourite TV show. Up pops Totem Movie Player. Totem pops up a window to help him download and install and configure the relevant DVD codecs.

Scope

All gstreamer applications

Design

This assistant appears on an as-needed basis, and may also be presented by an application's first run if all supported plugins are not installed. That is, when the player encounters a codec which it is unable to play without additional packages, it will display the assistant to the user. The assistant will include a database mapping codecs to packages, so that it can find an appropriate package to install if one is available. If a package is known to provide support for a codec, but the package is not available from any known source, it should be displayed but grayed out.

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.

This application requires additional plugins to use this file.

[Certain countries may have laws making the installation of these plugins illegal. _link_ may help in determining what steps, if any, must be taken by you to legally install these plugins in your jurisdiction.]

Plugin

Install

Frobinator Audio

[checkbox]

Frobinator Video

[checkbox]

[Install] [Do nothing]

It should not be necessary to restart the application after the plugin has been installed.

Implementation

We must compile a database of the codecs which are supported by each package. This list is believed to be short enough that we may compile the database by hand in order to ship it with the package. It may also be feasible to automatically generate it based on the gstreamer registry.

It could for example be included in Xb- headers, just like the supported Python Version of a binary package.

Some sort of codec => web page mapping would be useful as well to handle: - online search of codecs (by opposition to search in the package cache or in the installed package) - commercial online store to buy codecs

Code

There is some work being done on this upstream for Rhythmbox: See [http://bugzilla.gnome.org/show_bug.cgi?id=338308 Gnome bug 338308]. This is very similar to our approach, but we would prefer to implement it directly in gstreamer, in order to support applications other than Rhythmbox.

Would it make sense to have a general library doing feature => package mappings and proposing UI in the form of package installation of web page? Perhaps this would solve other problems in the same shot, such as MIME type => application lookup?

Upstream bug about that: http://bugzilla.gnome.org/show_bug.cgi?id=161922, we can use it to discuss with upstream

Guadalinex includes a program called hermes which uses dbus to request installation of software. If we use hermes for other purposes, this program will use its facility for installing packages. Otherwise, it can simply call out to synaptic.

In order for most of the interesting packages to be available, multiverse must be enabled. The matter of arranging for these packages to be installed, regardless of the apt configuration, will be addressed in [http://launchpad.net/distros/ubuntu/+spec/enabling-additional-components Enabling additional components].

Outstanding issues

Kubuntu doesn't currently use gstreamer for its media players, so it won't benefit from this until that changes. Apparently, the issue is that they need porting to gstreamer 0.10.

Suggestions from VideoPlaybackRoadmap

also see DesktopTeam/CommonInstallHook --SamTygier

Comments

Am I right in assuming the reason for wanting to do it at the GStreamer rather than application level is that it will Just Work without having to modify each application individually? While that sounds good, I don't know how practical it will be because it will require some fairly invasive changes, and will probably require application-level changes anyway.

Some applications (e.g. Rhythmbox, iirc amaroK) will automatically kill it's out-of-process metadata loader if it takes too long, as it is usually caused by a GStreamer plugin bug getting it stuck. Doing plugin installs without the application being aware of it will trigger those kinds of things. Doing it at the application level also lets apps be smarter about it, for example continuing to load all the user's Ogg Vorbis files while MP3 support is beig installed in the background.

Personally, I think a common library/tool that application could use (with different implementations for different distros) would be a better approach. It would also allow applications to use it for things which aren't purely "play my file" issues, such as applications saying "I need the 'trm' element to do audio fingerprinting" or "I need 'id3v2mux' to do ID3 tag editing" -- JamesLivingston (Rhythmbox developer)

  • Perhaps Gstreamer can implement a null or dummy codec to prevent apps from assuming it has failed. I think that the more general the approach the better. Once a unified approach is sorted out upstreams will begin using it, and it can always be an optional feature for those ditros and users who do not wish to implement it.

Perhaps a better idea would be to simply create a simple program called Media Codec Manager or something... Then with gStreamer apps, we could link them together as proposed. But, the media codec manager would be application and platform independent. It could simply list all the video and audio codecs and allow you to check off which ones you want or have a button that says install all. Also, if you install support for say MP3, it will install both the gstreamer plugin as well as LAME for other apps like mplayer or vlc. -Derick_eisenhardt (2006-08-09 @ 17:42 CDT)

DVD playback requires libdvdcss2 which isn't just a missing gst plugin. I think that's why we need a more general approach here. If we can't install some stuff automatically, we must at least tell the user what the problem is and how to solve it and point him in the right direction. -- AndreRuediger

  • Would it be possible to re-package libdvdcss2, so it acts like flashplugin-nonfree (i.e. uses dpkg -configure to help the user download and install the actual library) rather than the user having to run an install script. --KrisMarsh

On the Thin Client/LTSP side, making sure we get gstreamer/pulseaudio stack going will be crucial for making sure that multimedia on TC's works as well as locally. Both edubuntu (edu software), call centres (ekiga), etc. will need this. --ScottBalneaves

The current thinking about how this will be implemented internally in GStreamer and how it will look from the point of view of GStreamer applications can be found here: http://webcvs.freedesktop.org/gstreamer/gstreamer/docs/random/draft-missing-plugins.txt?view=log --TimMüller (GStreamer developer)

However, I think we agreed that the actual request for a codec to be installed will be done by API that is in a separate library. That a) isolates the distribution-specific code without requiring multiple branches of gstreamer, and b) allows that process to involve UI without gstreamer suddenly acquiring UI code and all the dependencies that would involve. Ryan Lortie already has a skeleton project for this API. --MurrayCumming

  • Yes, this is the plan in the above proposal as well. The structure with the install_plugins vfunc is provided by an external library and the IPC details will be done by that external library in whatever way it likes. --TimMüller (Update: the GStreamer doc has been updated again so that there won't be any API at all in GStreamer to initiate download, and so that the external library will handle all of it)


CategorySpec