EasyCodecInstallation

Differences between revisions 5 and 47 (spanning 42 versions)
Revision 5 as of 2006-01-01 05:16:01
Size: 3159
Editor: S0106000000cc07fc
Comment: cat spec
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 10: Line 11:
At the moment the messages about not supported formats have no indication on what codecs/packages you need to installation to be able to read the corresponding file. It would be nice to make easy for user to install the corresponding package.

== Rationale ==

The current message is not useful for users, we should make it easy to play their files rather trying to explain what they are trying to do doesn't work on a fresh installation.
Messages about unsupported gstreamer formats are currently unhelpful. This utility assists users in installing the packages needed to use those formats.
Line 17: Line 14:

 * Frederic used to use window. He has a usbkey player with mp3 files on it. He plugs it on his new Ubuntu installation, a nautilus window is opened on it which is great. He doubles clicks on one of the file as usually and get this weird window saying that totem doesn't know about "mp3". He wonders why is that happening and what he has to do to play his files.
 * Vincent who tried to play some movie trailers from the Apple website just got a window with no movie and a message saying that this format is not supported. He asks what to do to his friend Sebastien who installed the required package an they watched the videos. It should be easy to get that working without having to ask to somebody else what do to.
   * 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 23: Line 20:
 * rhythmbox
 * sound-juicer
 * totem
The gstreamer0.10 packages, rhythmbox, totem on the Ubuntu desktop.
Line 29: Line 24:
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.
Line 31: Line 34:
=== Code === 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 33: Line 36:
=== Data preservation and migration === 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
Line 37: Line 97:
== BoF agenda and discussion == 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.
Line 41: 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 44: 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 48: Line 108:
Another way is to have a standalone application that manage gstreamer plugins Comments have been moved to EasyCodecInstallation/Comments
Line 50: Line 110:

- 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.

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)