EasyCodecInstallation

Differences between revisions 12 and 47 (spanning 35 versions)
Revision 12 as of 2006-06-19 12:59:07
Size: 5604
Editor: ALagny-109-1-2-23
Comment:
Revision 47 as of 2008-08-06 16:27:02
Size: 7097
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
 * '''Packages affected''': rhythmbox, sound-juicer, totem  * '''Packages affected''': gstreamer0.10, libgimme-codec, rhythmbox, totem, sound-juicer (later)
 * See also: Gno
meAppInstallCodecs
Line 13: Line 14:

 * 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.
   * 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.
Line 19: Line 20:
All gstreamer applications The gstreamer0.10 packages, rhythmbox, totem on the Ubuntu desktop.
Line 23: Line 24:
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. 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.
Line 25: Line 26:
If the user is not a member of the admin group, and is thus unable to install packages, the program should behave as normal and display an error (not launch the assistant). 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.
Line 27: Line 28:
''This application requires additional plugins to use this file.'' 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.
Line 29: Line 30:
[''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.
It will not be necessary to restart the application after the plugin installation.
Line 41: Line 34:
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. 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.
Line 43: Line 36:
=== Code === In the case that a plugin is available and installation succeeds the media will start playing once the install is finished.
Line 45: Line 38:
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 other applications as well. 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.
Line 47: Line 40:
Guadalinex includes a program called hermes which uses dbus to request installation of software. We may be able to reuse this code. 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
Line 51: Line 97:
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 a separate spec (marked as a dependency of this one). 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.
Line 53: Line 99:
We must examine hermes from Guadalinex and determine whether it will meet our needs. There was an older Ubuntu spec which described a very similar idea, but we can't find it just now.
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.
Line 59: Line 104:
ATM, when you try to play an unhandled video with totem, it tells you that he cannot found the corresponding plugin.
What I suggest he must do is :
also see DesktopTeam/CommonInstallHook --SamTygier
Line 62: Line 106:
- Tell you what format you are trying to view and what plugin you need.
- If available with apt-get, it must suggest "Install this plugin now", so you can install the corresponding plugin in one click.
- If not available via apt-get for known issues (patents), it must explain why it is not avalaible and offer a "click here to know more" that send you to a page on this wiki (or on the website), telling you how to install w32codecs, libdvdcss, ... (it can perhaps download and install it automatically after asking you if you are in a country with software patents)
== Comments ==
Line 66: Line 108:
  The web (or wiki) page is fine for me IF AND ONLY IF this solution implicates an easy localization & translation of the installation instructions. IMHO, this solution is not a solution if the non-English user needs to read English instructions about installing weird things like w32codecs, libdvdcss... -- RicardoPérezLópez Comments have been moved to EasyCodecInstallation/Comments
Line 68: Line 110:
Another way is to have a standalone application that manage gstreamer plugins




- What about developing "dummy" plugins which somehow trigger the display of a message explaining the problem? It could be possible to have fake libraries which either play beck an audio clip or video clip (these things are either decoding audio, video, or both) with directions as to what the problem is, and the individual plugin packages could simply obsolete the dummy plugins / libraries... It seems reasonable to assume that the user will have sound support if he's trying to play back a sound file, and video support if he's trying to play back a video file.

 ''This would cause some fairly large issues with many GStreamer-based applications that do more than simple playback. It would (for example) confuse music players that require users to "import" tracks before they can be played. -- JamesLivingston ''


also see DesktopTeam/CommonInstallHook --SamTygier

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)