Note: this stuff relates to version 0.7.6ubuntu0.11.10.3+medibuntu1 of the libav-extra package in oneiric, but I get the impression that the situation is the same for every version later than hardy or thereabouts.
This is not by any means an exhaustive guide to everything involved in building the medibuntu version of mplayer from source. There are quite a lot of pages like that already - and really, there isn't much to it, just install the source and the build-deps and off you go - but every one of those pages fails to address what could be an important point for avoiding much wasted time compiling the wrong thing. This page is written to fill that hole, with the intention of saving other people who are trying to build the medibuntu versions of mplayer, mencoder etc. from source the arseache of spending hours on google failing to find any mention of the answer to a very fucking simple question: Where the juddering fuck are the MEDIBUNTU versions of the required *-dev packages from libav-extra?
The mplayer/mencoder source package has a build dependency on the following dev packages, which relate to libraries built from libav-extra:
libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libpostproc-dev libswscale-dev
Medibuntu includes the special medibuntu versions of the libraries - libavcodec-extra-xx_blahblahblah+medibuntublahblah.deb and so forth - to which these development packages relate, and it is reasonable to assume that if one is trying to compile the medibuntu version of mplayer against the medibuntu versions of these libraries then it requires the medibuntu versions of the dev packages in order to work properly.
However, there are no medibuntu versions of the dev packages. There is not an electronic sausage in the medibuntu repositories, and if you try building libav-extra yourself it still does not give you the dev packages - it does create the files which they contain, but it does not create the actual .debs, it just leaves the files where they are and does nothing useful with them.
Apparently it used to create the .debs - there are references to them in the changelog which are a few years old - but some stupid cunt changed it so it doesn't any more. It would therefore be possible to change it back. Fortunately there is a simpler answer...
The files in the ORDINARY Ubuntu versions of the dev packages listed above are IDENTICAL to the files created, but not packaged, by building the medibuntu libav-extra source. Bit-for-bit identical, md5sum returns the same value. (Apart from the static libraries, but that is not of concern for this purpose.) So it is in fact perfectly OK to install the ordinary Ubuntu versions of those listed dev packages and build the medibuntu version of mplayer against them.
WHY DOES NO FUCKER TELL YOU THIS? There is precisely FUCK ALL about it on the medibuntu website. In fact there's fuck all on there about building medibuntu packages from source fullstop. There are mentions of it on the support forum for ordinary Ubuntu and on various other websites, but they all say the same fucking thing - they give instructions on how to configure apt to use the medibuntu repositories, then they give a great huge long list of build-depends which you should apt-get install, and that's it. Following those instructions - most of which are so out of date that they were written at a time when the medibuntu website did carry medibuntu versions of the dev packages - will at the time of writing pull in the medibuntu versions of the libraries plus the ordinary Ubuntu versions of the dev packages. Which looks wrong. As it happens, it isn't. But there is NOTHING on ANY fucking website known to google which tells you it isn't. Nobody even seems to notice it happens, let alone check whether it matters or not.
(It seems they figure that you should assume that because apt does let you install the ordinary Ubuntu dev packages alongside the medibuntu libraries then it's OK like that. Since when has it been valid to assume that just because you can install bits from different versions of a package at the same time, they will work together in the way you want? More often than not it's only possible because of a bug in the package metadata, and it's an excellent way to make very weird things happen and cause some extremely confusing fuckups...)
Well, I noticed it; I checked it; and it DOESN'T matter. So now you know, and hopefully you didn't have to spend several hours of fruitless googling followed by exasperatedly building the medibuntu libav-extra source and comparing the generated dev files with those in the ordinary Ubuntu dev packages to find out that they are the same.
Though there is a non-standard case where it does matter, and this is why whoever modified the libav-extra source package to no longer build the dev packages is a cunt. This case is where you have made some changes to the libav-extra source code before building it which affect those files which should be included in the dev packages. In this case it will indeed be necessary to modify the libav-extra source package so that it once again does build the dev packages - or, if you don't mind being messy, just building it as is and then copying those files which differ to /usr/include or /usr/lib by hand.
Fortunately, it is quite straightforward to unfuck the libav-extra source package so that it does once again build the dev packages. It is simply a matter of downloading the ordinary Ubuntu version of the source package - which is called just plain libav, without the -extra - copying the entries relating to the above-listed dev packages out of debian/control, and pasting them into libav-extra's debian/control. All the other bits and pieces needed to generate the dev packages are still there, so that's all it needs.
...It might also be appropriate to mention at this point that there is an additional aspect of cuntery involved in building libav-extra from source. Namely, the following lines from debian/rules:
libav/configure: tar xvf /usr/src/libav-source.tar.gz
It is of course very likely that the whole reason you are going to the trouble of building from source in the first place instead of just installing the prebuilt binaries is so that you can edit the fucking source first in order to make some change to the standard package. Like, say, for instance, changing >= to > on line 2990 of libavformat/utils.c to stop it bitching about non-monotonically-increasing dts values in perfectly healthy H264/AAC files. Or changing the default in libavutil/log.h to get rid of that pain-in-the-fucking-arse "Last message repeated x times" shit which doesn't tell you which fucking message was repeated or where it was repeated (example chosen because log.h is included in the dev packages). And when you are doing this, it really is absolutely fucking wonderful to find that the first thing that it does when you try and build the modified package is WIPE OUT EVERY FUCKING THING YOU JUST FUCKING CHANGED. CUNT.
There are various ways to hack it to prevent this, of course, but perhaps the simplest and safest is to tar up everything you've edited, stick it somewhere outside the build tree, and then add another line to debian/rules following the above to untar it back in again.
Back to Pigeon's Nest
Be kind to pigeons