EasyCodecInstallation

Differences between revisions 39 and 40
Revision 39 as of 2006-11-09 21:56:06
Size: 11068
Editor: coconut
Comment: fixes for small grammar bugs, added more detail
Revision 40 as of 2006-11-09 22:29:18
Size: 6167
Editor: 207
Comment:
Deletions are marked like this. Additions are marked like this.
Line 75: Line 75:
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)

== Notes from the meeting ==

...by JonoBacon.

GStreamer registry should not need updating.

Consideration of patent issues in installable codec plugins.

Much of the different chunks of the puzzle expectated to be developed in the next few months - everyone is aware of what needs doing.

Needs doing: gnome-app-install, gstreamer

Need a tool to build the database of packages. Inspection should be made at build time.

GStreamer side of things is planned and specced out.

Upstream apps will be patched for feisty and hopefully this system can be rolled out across other distributions.

Make a default script for those distros who have not implemented this system - "click here for more information".

Documentation should be made for upsream authors to ensure theirs apps implement this functionality.
Comments have been moved to EasyCodecInstallation/Comments

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. rhythmbox has been opened but refuses to play any file from the ipod and doesn't give any useful information about why. It should assist him in installing the required packages.
  • Michael is trying to play a video but totem cannot display the video stream and can only play the sound track. Totem should suggest 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. 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)