Pages

Wanna Know How To Create an Off-line Multimedia Codec Pack Of Your Own in Ubuntu!

I've said this before but will say it again for the sake of completion of this article :P. I do have my problems with Ubuntu/Canonical concerning many things, but from a newbie point of view, Ubuntu does make it really easy to setup proprietary software installations in comparison with many other distributions such as Fedora Core for instance.

Although, I personally don't like Ubuntu much these days... it threatens a part of my "identity", yet if you like it nonetheless, and looking for a way to create an off-line codecs pack of your own... then this article is for you.

I did post about a codecs pack, concerning Ubuntu 10.10, but it won't work under Ubuntu 11.04. I tried to find one of Natty Narwhal but... still... nothing, nada. So I thought, *$ck it, gonna create something of me own :P.

Apt-Get....

This is one of the most advanced/robust package handling utilities available for GNU/Linux, which was invented by the Debian team if I'm not mistaken. Although other distributions have few of their own ones such as the "yum" package manager in FC, but even in the early days of "yum", apt-get was so much, impressively superior because it has been there for a long time.

With apt-get, we can install/upgrade/delete... we can do almost anything with it concerning software installations under Ubuntu/Debian or any distro that comes with it. So, for this I'll be using this well knows apt-get geeky tool :).

Enough talking, lets gets busy.

When we use apt-get to install software in your GNU/Linux PC/Laptop, by default it saves a copy of the downloaded software in its directory which is called "apt-get cache".

Because of this cache folder then say that for some reason you removed a software called "A"... but later you wanted to re-install it again, then apt-get will not re-download it again (unless there are updates/new versions, etc), it would just use that saved cache.

So, that's basically what we're gonna do. We'll simply install all the multimedia codecs in Ubuntu (should work on any Ubuntu version from 9.10 and onwards), and then we'll copy those cached .deb packages to our own folder.

Then in the same PC or any other PC/Laptop that runs Ubuntu (it must run the same Ubuntu version as the one you created this codec pack), we just have to give the package manager the path to our cached folder with all those codecs and it'll install them all without the need of an Internet connection!.

Pretty simple, right? :).

Especial Note:- For this, please use your Ubuntu Live CD, because once you install software in Ubuntu, some of the dependencies may not be downloaded which are required for this codec pack.

So boot using your Live CD into a PC where an Internet connection is available. And make sure not to install any other software prior to logging into your Live CD's Desktop.

Or an PC/Laptop with newly install Ubuntu OS will be the perfect "situation" since, if you don't have enough RAM, etc while using the Live CD, it could be a bit troublesome.

Lets do it!.

1. First we have to clear the current database of apt-get. Although this won't be necessary since this is will be our first software installation using the Live CD, but lets do it, just in case :)

So open your Terminal and issue the below command.

sudo apt-get clean

2. Now enter the below command in your Terminal again to install a full list of codecs (including adobe flash, etc).

sudo apt-get install ubuntu-restricted-extras

3. Although this codec pack has almost everything, except it won't have the abiliy to read encrypted dvds. So lets download that as well. To do that, open your Terminal and issue the below commands.

sudo apt-get install libdvdread4

4. Once the downloading is complete go to apt-get's cache location as shown below.

/var/cache/apt/archives

Now press "Ctrl" + "A" keys on your keyboard to select everything on that folder, except for the folder called "partial" and a file called "lock".

5. Then copy and paste all these packages to a desired location. Lets say you created a folder called "multimedia codecs" in your Desktop for this example. Then paste the copied content into that folder.

6. Now copy that folder to anywhere you want, a CD or a USB drive, etc.

7. From now on, whenever you want to install these codecs in another Ubuntu installed PC, simply open your Terminal in that PC and enter the below command.

sudo synaptic

8. This will open a GUI package manager for apt-get (called Synaptic).

Once opened, from the menu chose: "File" -> "Add downloaded packages" (see below screenshot)... then simply open the folder that contains the multimedia codecs and click "open"... then Synaptic will ask to conform the installation. So follow your on screen instructions.

9. And also make sure to open a Terminal afterward and enter the below command as well.

Remember, always use a Live CD or a freshly installed Ubuntu OS and for this method. Also make sure that PC (you're gonna install these codecs) Ubuntu version matches the version of that Live CD you used to create it in the first place. For instance, if you used the latest Ubuntu 11.04 Natty Narwhal, then you should only use this on 11.04 Natty Narwhal.

And since it's bloody hard to remember things :P, you can create a text file within the "Multimedia codecs" folder and paste that above command into it ("sudo /usr/share/doc/libdvdread4/install-css.sh") since it's necessary to enter that command every time you install this codecs in a PC/Laptop for the first time.