EasyCodecInstallation

Differences between revisions 1 and 42 (spanning 41 versions)
Revision 1 as of 2005-11-02 20:29:21
Size: 1692
Editor: 209
Comment: new page
Revision 42 as of 2006-11-10 04:44:28
Size: 6245
Editor: 38
Comment: kubuntu edgy has this for amarok/mp3
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
 * '''Launchpad Entry''': https://launchpad.net/distros/ubuntu/+spec/foo  * '''Launchpad Entry''': https://launchpad.net/distros/ubuntu/+spec/easy-codec-installation
Line 6: Line 6:
 * '''Packages affected''': rhythmbox, sound-juicer, totem  * '''Packages affected''': gstreamer0.10, libgimme-codec, rhythmbox, totem, sound-juicer (later)
Line 10: Line 10:
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 13:

 * 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. Now he tries to play a 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 streamer0.10-ffmpeg so the video content can be decoded too.
Line 23: Line 19:
 * rhythmbox
 * sound-juicer
 * totem
The gstreamer0.10 packages, rhythmbox, totem on the Ubuntu desktop
Line 29: Line 23:
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 33:
=== 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 35:
=== 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.
Line 37: Line 65:
== 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.

== Suggestions from VideoPlaybackRoadmap ==

also see DesktopTeam/CommonInstallHook --SamTygier

== Comments ==

Comments have been moved to EasyCodecInstallation/Comments

----
CategorySpec

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. Now he tries to play a 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 streamer0.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.

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)