How to Create an Offline Multimedia Codec Pack for Ubuntu ?

As most users are aware of, due to various reasons, most GNU/Linux distributions don’t include proprietary multimedia codecs by default, which is also the case with Ubuntu. But these days, as long as you have a reasonably fast internet connection, you can install these codecs easily by using a single command anyway.However, if you have installed Ubuntu on a computer that doesn’t , then how can you install those codes for watching your naught ‘content’ ? (kidding! :D). That’s where an ‘offline’ codec pack comes in real handy, and as long as you have access to another computer that has an internet connection, you can create one by yourself, without much difficulty!.Things that you’re gonna need …1. A computer with an Internet connection.2. A LiveCD/DVD or a USB drive or any other media containing Live desktop session of Ubuntu.3. Another storage media to copy the offline codecs (optional if you have a USB live session as you can save the file inside it).For this example, I’m using Ubuntu 12.04 Precise Pangolin.That’s pretty much what you nee.Special note: Please remember that, an offline codec pack that you created using a certain version of Ubuntu (say 12.04 Precise Pangolin), can only be installed on another computer that runs the exact same version of Ubuntu.Okay, let’s do it …Step 1: First, boot into Ubuntu Live desktop session using the CD/DVD or the USB media etc in the computer that has an Internet connection. Once you log into the desktop, set up the network settings and make sure the Internet connection is up and running.You can also use a computer with an existing Ubuntu installation, but, unless it’s a newly installed system, this might not work (due to dependencies issues etc). So I recommend always using a Live desktop session.Step 2: Once that’s done, open the ‘Ubuntu Software Center’. If you use recent versions (11.04 and up) you should be able to find it from the ‘application launcher’ from the left side of the screen as shown below. If you can’t find, it then put the below command in your Terminal window to open it.gksudo software-centerStep 3: What we’re trying to do here is to enable the repository (a server that holds software packages) that has the proprietary software. According to Ubuntu, this is enabled in recent versions, but in my 12.04, it was disabled for some reason. So anyway, once it’s opened, just to make sure, from the menu go to:Edit -> Software SourcesThen, under the ‘Ubuntu Software’ tab, make sure the option called ‘Software restricted by copyright or legal issues (multiverse)’ is enabled as shown below. After that, click on the ‘Close’ button and also close the ‘Ubuntu Software Center’ itself as well.Step 4: Now put the below command into the Terminal window.sudo apt-get updateStep 5: After that, enter the below command to download the proprietary codec pack temporarily into the HDD.sudo apt-get -d install ubuntu-restricted-extrasStep 6: Please remember that, playing encrypted DVDs might get you into trouble as in some countries it’s illegal. So I won’t hold any responsibility over this dues, use it at your own risk :).Enter the below command to install a package called ‘libdvdnav4’ (this package will also be saved automatically where the above codecs are saved).sudo apt-get install libdvdnav4Step 7: Then, enter the below command to install it in the LiveCD (I won’t go into details why you have install this, but this makes it including in the codec pack a hell lot easier).sudo /usr/share/doc/libdvdread4/install-css.shNow, when the installation finishes, take a careful look at the Terminal output (you might have to scroll up a bit) and locate a text field that says something like‘Saving to: `/tmp/dvdcss-/libdvdcss.deb’as shown below. The ‘‘ part will change (thus the saving location), but the rest should be the same.Step 8: Then, enter the below command so the newly downloaded ‘libdvdcss.deb’ is also copied to the same folder where other codecs are  located. But make sure to replace ‘‘ with the code your Terminal output gives you, otherwise it won’t work, because if you install this again, then it first will be saved into a different location, temporarily.sudo cp /tmp/dvdcss-/libdvdcss.deb /var/cache/apt/archives*End of Restricted DVD installation * Step 9: Now, enter the below commands so all the downloaded codecs are copied into a new folder called ‘offlinecodecs’ in your LiveCD user’s ‘Home’ folder (first command will copy the content, other will delete a file that we don’t need). Do not change the ‘offlinecodecs’ folder name.sudo cp -a /var/cache/apt/archives /home/ubuntu/offlinecodecssudo rm /home/ubuntu/offlinecodecs/lockThat’s pretty much it actually. Now we have a folder called ‘offlinecodecs’ which has all the proprietary codecs Ubuntu repository holds. In the final step, open your ‘Home’ folder and safely save (copy) this folder to another portable storage media so you can use it later on other machines.This is bloody easy and you can do it using two commands!. First, boot into the computer which runs Ubuntu where you want to install the codec pack. Then, insert the media and copy that ‘offlinecodecs’ folder to your ‘Home’ folder on this computer.Step 1: Then, open your Terminal and enter the below offlinecodecsStep 2: Now, enter the below command and when asked give the ‘sudo’ password, and it’ll install all the codecs for you!.sudo dpkg -i *.debIf packages manager such as ‘apt-get’ refused to work afterwards, then enter the below command to fix it.sudo apt-get purge flashplugin-installerThat’s it, now you’ve successfully created and installed an offline codec pack in Ubuntu. Good luck.Related Posts

An RHCE, ‘Linux’ user with 14+ years of experience. Extreme lover of Linux and FOSS. He is passionate to test every Linux distribution & compare with the previous release to write in-depth articles to help the FOSS community.rm: cannot remove ‘/home/ubuntu/offlinecodecs/lock’ : No such file or directorySo now what?

I’ma go google it right quick. that’s why people don’t get over the fence when it comes to ubuntu. because you just download and double click a fucking file and everything magically works does this apply in cases of linux mint does this apply in cases of linux mint This site uses Akismet to reduce spam. .Recent Posts

ContactAbout HecticGeekWelcome to HecticGeek, it is an independent blog founded back in 2010. We cover in-depth Linux OS, product review with other all technology-related software and tools. Our mission is to provide valuable and trustful technology-related content to our users.

Leave a Reply

Your email address will not be published.