JauntyCodecInstall

Summary

Debian has a new mechanism for doing codec installation (gnome-codec-install) that is different from the current Ubuntu solution that is based on gnome-app-install. PackageKit is also capable of doing codec installs now. We will evaluate and pick what system to use for Ubuntu 9.04.

Release Note

The automatic codec search and installation in Ubuntu was improved again to support more codecs and seamless integration with third party repositories that support the Ubuntu codec install mechanism.

Rationale

The codec install information that used to be part of the (binary) package as a special file is now part of the Packages file and is therefore available with updates on each apt-get update. This is a new feature that we inherited from Debian and that we should use.

Design

The codec install information is now part of the Packages file, it looks like:

$ apt-cache show gstreamer0.10-plugins-good
Package: gstreamer0.10-plugins-good
Priority: optional
Section: libs
Installed-Size: 3384
Maintainer: Ubuntu Desktop Team <ubuntu-desktop@lists.ubuntu.com>
Original-Maintainer: Maintainers of GStreamer packages <pkg-gstreamer-maintainers@lists.alioth.debian.org>
Architecture: i386
Source: gst-plugins-good0.10
Version: 0.10.10.4-1ubuntu1
Replaces: gstreamer0.10-plugins-bad (<< 0.10.7.2), gstreamer0.10-plugins-good-doc (<< 0.10.6-2), gstreamer0.10-plugins-really-bad (<< 0.10.7.2)
Provides: gstreamer0.10-audiosink, gstreamer0.10-audiosource, gstreamer0.10-videosink, gstreamer0.10-videosource, gstreamer0.10-visualization
Depends: gconf2 (>= 2.10.1-2), libaa1 (>= 1.4p5), libavc1394-0 (>= 0.5.3), libbz2-1.0, libc6 (>= 2.4), libcaca0 (>= 0.99.beta13b-1), libcairo2 (>= 1.2.4), libcucul0 (>= 0.99.beta13b-1), libdbus-1-3 (>= 1.0.2), libdv4, libflac8, libgcc1 (>= 1:4.1.1), libgconf2-4 (>= 2.13.5), libglib2.0-0 (>= 2.16.0), libgstreamer-plugins-base0.10-0 (>= 0.10.21), libgstreamer0.10-0 (>= 0.10.21), libgtk2.0-0 (>= 2.14.1), libhal1 (>= 0.5.8.1), libiec61883-0 (>= 1.1.0), libjpeg62, liboil0.3 (>= 0.3.10), libpng12-0 (>= 1.2.13-4), libraw1394-8, libshout3, libsoup2.4-1 (>= 2.23.91), libspeex1 (>= 1.2~beta3-1), libstdc++6 (>= 4.1.1), libtag1c2a (>= 1.5), libv4l-0 (>= 0.5.0), libwavpack1 (>= 4.40.0), libx11-6, libxdamage1 (>= 1:1.1), libxext6, libxfixes3 (>= 1:4.0.1), libxml2 (>= 2.6.27), zlib1g (>= 1:1.1.4), gstreamer0.10-plugins-base
Recommends: gstreamer0.10-x
Filename: pool/main/g/gst-plugins-good0.10/gstreamer0.10-plugins-good_0.10.10.4-1ubuntu1_i386.deb
Size: 1028966
MD5sum: 02fbc87a7ee0eba5056b3277675332cf
SHA1: 29d9bbdf98322d61c214b9dfe30e580f6ae4df6d
SHA256: 9ed27e92492f2de3830fdaaac9673fb5ce1521aa571dcda1b11c2b304f494d5c
Description: GStreamer plugins from the "good" set
 GStreamer is a streaming media framework, based on graphs of filters
 which operate on media data.  Applications using this library can do
 anything from real-time sound processing to playing videos, and just
 about anything else media-related.  Its plugin-based architecture means
 that new data types or processing capabilities can be added simply by
 installing new plug-ins.
 .
 This package contains the GStreamer plugins from the "good" set, a set
 of good-quality plug-ins under the LGPL license.
Gstreamer-Decoders: application/x-3gp; application/x-apetag; application/x-icy; application/x-id3; application/x-navi-animation; application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], encoding-name=(string){ AMR, AMR-WB }, encoding-params=(string)1, octet-align=(string)1, crc=(string){ 0, 1 }, robust-sorting=(string)0, interleaving=(string)0; application/x-rtp, media=(string){ video, audio, application }, payload=(int)[ 96, 127 ], encoding-name=(string)MPEG4-GENERIC, streamtype=(string){ 4, 5 }, mode=(string){ generic, CELP-cbr, CELP-vbr, AAC-lbr, AAC-hbr }; application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], encoding-name=(string)ILBC, mode=(string){ 20, 30 }; application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], encoding-name=(string)SPEEX, encoding-params=(string)1; application/x-rtp, media=(string)video, payload=(int)[ 96, 127 ], encoding-name=(string)THEORA, delivery-method=(string)inline; application/x-rtp, payload=(int)[ 96, 127 ], media=(string){ audio, video }, encoding-name=(string){ X-QT, X-QUICKTIME }; application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], encoding-name=(string){ AC3, G726, G726-16, G726-24, G726-32, G726-40, G729, GSM, PCMA, PCMU, MPA, L16, MP4A-LATM, VORBIS }; application/x-rtp, media=(string)video, payload=(int)[ 96, 127 ], encoding-name=(string){ MPV, H263-2000, H263, H264, MP1S, MP2T-ES, MP4V-ES, RAW, H263-1998 }; application/x-rtp, media=(string)video, payload=(int)34, encoding-name=(string)H263; application/x-rtp, media=(string)other, payload=(int)[ 96, 127 ], encoding-name=(string)MP1S; application/x-rtp, media=(string)audio, payload=(int){ 18, 3, 8, 0, 14, 10, 11 }; application/x-rtp, media=(string)video, payload=(int){ 32, 33 }; application/x-subtitle-avi; audio/x-alaw; audio/x-au; audio/x-flac; audio/x-m4a; audio/x-mulaw; audio/x-speex; audio/x-wav; audio/x-wavpack, framed=(boolean){ false, true }; audio/x-wavpack-correction, framed=(boolean)false; image/bmp; image/gif; image/jpeg; image/png; image/svg; image/svg+xml; image/tiff; image/vnd.wap.wbmp; image/x-MS-bmp; image/x-bitmap; image/x-bmp; image/x-cmu-raster; image/x-icon; image/x-pcx; image/x-pixmap; image/x-portable-anymap; image/x-portable-bitmap; image/x-portable-graymap; image/x-portable-pixmap; image/x-sun-raster; image/x-tga; multipart/x-mixed-replace; text/x-cmml, encoded=(boolean)true; video/mj2; video/quicktime; video/x-dv, systemstream=(boolean){ true, false }; video/x-fli; video/x-matroska; video/x-msvideo; video/x-smoke
Gstreamer-Elements: aasink, agingtv, alawdec, alawenc, alpha, alphacolor, apedemux, apev2mux, asteriskh263, audioamplify, audiochebband, audiocheblimit, audiodynamic, audioinvert, audiokaraoke, audiopanorama, audiowsincband, audiowsinclimit, auparse, autoaudiosink, autovideosink, avidemux, avimux, avisubtitle, breakmydata, cacasink, cairotextoverlay, cairotimeoverlay, cmmldec, cmmlenc, cutter, deinterleave, dicetv, dv1394src, dvdec, dvdemux, dynudpsink, edgetv, efence, equalizer-10bands, equalizer-3bands, equalizer-nbands, flacdec, flacenc, flactag, flxdec, gamma, gconfaudiosink, gconfaudiosrc, gconfvideosink, gconfvideosrc, gdkpixbufdec, gdkpixbufscale, gdkpixbufsink, goom, goom2k1, halaudiosink, halaudiosrc, hdv1394src, icydemux, id3demux, id3v2mux, interleave, jpegdec, jpegenc, level, matroskademux, matroskamux, monoscope, mulawdec, mulawenc, multifilesink, multifilesrc, multipartdemux, multipartmux, multiudpsink, navigationtest, navseek, ossmixer, osssink, osssrc, pngdec, pngenc, progressreport, qtdemux, quarktv, revtv, rganalysis, rglimiter, rgvolume, rndbuffersize, rtpL16depay, rtpL16pay, rtpac3depay, rtpamrdepay, rtpamrpay, rtpdec, rtpdepay, rtpdvdepay, rtpdvpay, rtpg726depay, rtpg726pay, rtpg729depay, rtpg729pay, rtpgsmdepay, rtpgsmpay, rtph263depay, rtph263pay, rtph263pdepay, rtph263ppay, rtph264depay, rtph264pay, rtpilbcdepay, rtpilbcpay, rtpmp1sdepay, rtpmp2tdepay, rtpmp2tpay, rtpmp4adepay, rtpmp4apay, rtpmp4gdepay, rtpmp4gpay, rtpmp4vdepay, rtpmp4vpay, rtpmpadepay, rtpmpapay, rtpmpvdepay, rtpmpvpay, rtppcmadepay, rtppcmapay, rtppcmudepay, rtppcmupay, rtpspeexdepay, rtpspeexpay, rtpsv3vdepay, rtptheoradepay, rtptheorapay, rtpvorbisdepay, rtpvorbispay, rtpvrawdepay, rtpvrawpay, rtpxqtdepay, rtspgoogle, rtspsrc, shagadelictv, shout2send, smokedec, smokeenc, smpte, smptealpha, souphttpsrc, spectrum, speexdec, speexenc, taginject, testsink, udpsink, udpsrc, v4l2src, vertigotv, videobalance, videobox, videocrop, videoflip, videomixer, warptv, wavenc, wavpackdec, wavpackenc, wavpackparse, wavparse, ximagesrc
Gstreamer-Encoders: application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], encoding-name=(string){ AMR, AMR-WB }, encoding-params=(string)1, octet-align=(string)1, crc=(string)0, robust-sorting=(string)0, interleaving=(string)0, mode-set=(int)[ 0, 7 ], mode-change-period=(int)[ 1, 2147483647 ], mode-change-neighbor=(string){ 0, 1 }, maxptime=(int)[ 20, 2147483647 ], ptime=(int)[ 20, 2147483647 ]; application/x-rtp, media=(string){ video, audio, application }, payload=(int)[ 96, 127 ], encoding-name=(string)MPEG4-GENERIC, streamtype=(string){ 4, 5 }, mode=(string){ generic, CELP-cbr, CELP-vbr, AAC-lbr, AAC-hbr }; application/x-rtp, media=(string)video, payload=(int)[ 96, 127 ], encoding-name=(string)RAW, sampling=(string){ RGB, RGBA, BGR, BGRA, YCbCr-4:4:4, YCbCr-4:2:2, YCbCr-4:2:0, YCbCr-4:1:1 }, colorimetry=(string){ BT601-5, BT709-2, SMPTE240M }; application/x-rtp, media=(string){ video, audio }, payload=(int)[ 96, 127 ], encoding-name=(string)DV, encode=(string){ SD-VCR/525-60, SD-VCR/625-50, HD-VCR/1125-60, HD-VCR/1250-50, SDL-VCR/525-60, SDL-VCR/625-50, 306M/525-60, 306M/625-50, 314M-25/525-60, 314M-25/625-50, 314M-50/525-60, 314M-50/625-50 }; application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], encoding-name=(string)ILBC, mode=(string){ 20, 30 }; application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], encoding-name=(string)SPEEX, encoding-params=(string)1; application/x-rtp, media=(string)video, payload=(int)[ 96, 127 ], encoding-name=(string)THEORA, delivery-method=(string)inline; application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], encoding-name=(string){ G726-16, G726-24, G726-32, G726-40, G729, GSM, PCMU, PCMA, MPA, L16, MP4A-LATM, VORBIS }; application/x-rtp, media=(string)audio, payload=(int)3, encoding-name=(string)GSM; application/x-rtp, media=(string)audio, payload=(int)0, encoding-name=(string)PCMU; application/x-rtp, media=(string)audio, payload=(int)8, encoding-name=(string)PCMA; application/x-rtp, media=(string)video, payload=(int)32, encoding-name=(string)MPV; application/x-rtp, media=(string)video, payload=(int)[ 96, 127 ], encoding-name=(string){ H263-1998, H263-2000, H263, H264, MP2T-ES, MP4V-ES }; application/x-rtp, media=(string)video, payload=(int)34, encoding-name=(string)H263; application/x-rtp, media=(string)audio, payload=(int){ 18, 14, 10, 11 }; audio/x-alaw; audio/x-flac; audio/x-mulaw; audio/x-speex; audio/x-wav; audio/x-wavpack, framed=(boolean)true; image/jpeg; image/png; multipart/x-mixed-replace; text/x-cmml, encoded=(boolean)true; video/x-matroska; video/x-msvideo; video/x-smoke
Gstreamer-Uri-Sinks: udp
Gstreamer-Uri-Sources: dv, hdv, http, https, rtsp, rtspt, rtspu, udp
Gstreamer-Version: 0.10
Bugs: mailto:ubuntu-users@lists.ubuntu.com
Origin: Ubuntu
Task: ubuntu-desktop, edubuntu-desktop, edubuntu-desktop-kde, xubuntu-desktop, mobile-mid, mobile-mobile

This feature was added late in the intrepid cycle and we adapted gnome-app-install and the app-install-data information to use it (if it's there), but we did not change the way codecs are searched and installed.

Debian has a new codec install application called """gnome-codec-install""" that uses this information. It is written in python and uses python-apt. We will evaluate the code to see if this codec installer can supersede gnome-app-install for the codec installation.

Comparison of the features:

gnome-app-install

  • what we use now
  • - uses static data from /usr/share/app-install
  • - needs lots of clicks to install something
  • + uses fast dbm hash database to give instant feedback if codec is available
  • + knows about codecs even if they are in a not enabled component (e.g. multiverse codecs on a system without multiverse enabled)

gnome-codec-install

  • what debian uses now
  • - search relatively slow (reads the full Packages files until the GUI is available)
  • - relatively new (had trouble with it on my debian/sid system)
  • + does not need app-install-data package to function (easier updates)
  • + supports codecs from third party repositories automatically (if the repo has the codec information)

Implementation

After the evaluation of the new code in gnome-codec-install we will either adopt it (and push improvements to upstream) or change the way the current gnome-app-install based tool works so that it integrates with the new codec install information. If we switch from gnome-app-install we need to ensure that the BBC patch we applied to totem gets ported as well.

The following points should be addressed in gnome-codec-install:

  • port the totem BBC patch so that it can be used with gnome-codec-install [done]
    • the current bbc plugin uses the gdbm hash that we generate via app-install-data
    • it's very fast because the gdbm database contains only the packages we care about
    • porting that to the new mechanism is easy but much slower
    • when benchmarking it via: "echo 3 > /proc/sys/vm/drop_caches" reading the full apt cache (including all the package records) takes ~30sec on a fast machine

    • by making apt look only at packages that contain the word gstreamer when searching for codecs we can use the mmap information most of the time. this brings down search time from ~30s to less than 1s
  • port the interface from apt_pkg to apt [done]
  • use apt.package.Record instead of regexp when searching [done]
  • add checks if all packages were installed successfully [done]
  • use symbolic constants in the exit codes (EXIT_ERROR, EXIT_INSTALL_INCOMPLETE, ...) [done]
  • replace the GtkLabel in the details expander with a GtkTextView [done]

  • upload/sync gnome-codec-install from Debian to jaunty with all the fixes above [done]
  • main inclusion report/seeding for gnome-codec-install [done]
  • patch gnome-app-install to not install the codec search [maybe, not important due to alternatives used]
  • [maybe] port to python-apt gtk widgets (and switch away from synaptic as backend)
  • [maybe] add support for log writing in /root/.synaptic/logs in the gtk widgets

UI Changes

There are no UI changes planned yet. We should consult people if the codec install warning that we show now is really necessary.

Test/Demo Plan

Download a mp3 file on a fresh install and double click on it to see the installer in action.

Start totem, switch to the BBC plugin, find a stream that requires codec installation (trial and error, or else look at the cached feed data in ~/.cache/totem/plugins/bbc), and play it to make sure it works.

Open issues

  • what to do with the "Buy Licensed Plug-ins.." button that we currently have in intrepid?
    • port it to gnome-codec-install? this would mean we would have a carry a delta with debian

BoF agenda and discussion

The outcome of the discussion is that we look very closely at gnome-codec-install from debian and adopt it if possible (and we can fix the bbc patch for totem in time). The speed problem of g-c-i is not considered a issue. The problem of not being able to enable multiverse is also not considered a big issue because we enable by default now. The backup plan is to just add some bridging code into the code that extracts the codec information and injects it into the app-install-data files. This gives us essentially the same solution that we have now and is easy to do.


CategorySpec

FoundationsTeam/Specs/JauntyCodecInstall (last edited 2009-02-10 15:56:14 by p54A63CCC)