How to: Linux Play DivX .avi video codec file

by on October 31, 2007 · 36 comments· LAST UPDATED September 2, 2012

in , ,

From my mail bag:

I've downloaded .avi files which is compressed into small sizes while maintaining relatively high visual quality using DivX format. How do I play DivX compressed files under Debian / Ubuntu Linux?

The current version of the DivX Community Codec for the Windows platform is version 6.6, and for Mac OS X is 6.6x. There is no Linux version available however with the help of VLC and DivX for Linux codec, you should able to play all sort of DivX files.

Download and Install DivX Linux Codec

Open terminal and type the following command to download DivX codec:
$ cd /tmp
$ wget

Untar DivX 6.1.1 codec for Linux:
$ tar -zxvf divx611-20060201-gcc4.0.1.tar.gz
Install divx611 codec:
$ cd divx611-20060201-gcc4.0.1
$ sudo ./

Press Q after reading agreement, please type yes to install codes.

Install vlc player

The VLC media player can be installed using apt-get command, type:
$ sudo apt-get update
$ sudo apt-get install vlc

How do I play files?

Open VLC player by Visiting Applications > Sound and Video > VLC Player. You can also open terminal and type the command:
$ vlc /path/to/my-downloaded-movie.avi

Further readings:

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 36 comments… read them below or add one }

1 Kartik November 23, 2007 at 4:33 pm

I tried the above procedure mentioned. But after i did ” sudo ./ ” , it asked me to enter a password.

I’m even unable to extract the files because it is password protected. How do I resolve this to install divx codecs on my linux ??


2 nixCraft November 23, 2007 at 8:48 pm

Enter your own password


3 Joshua December 21, 2007 at 12:46 am

thankyou sooo much for the instructions on installing the divx codec… worked only thing is…i still cant figure out how to watch a streaming movie even with the codec….the further instructions and after installing vlc…i even removed mplayer…for example on a site such as…..the website still tells me that i’m missing the codec…even though i have installed it and i even tried reinstalling it just in case.but it says its installed…can anyone help…im out of ideas…


4 karl January 31, 2008 at 10:21 pm

Installing vlc does not work. I’m using kubuntu.


5 cloversg February 3, 2008 at 3:33 am

You don’t need to install any codecs.
VLC Media player does the job without any assistance. You will only have problems with .asf, .wmv and .rm (Proprietary media formats)

It works both for Linux as well as Windows

Go read the home page.


6 blink4blog February 3, 2008 at 4:17 pm

Well, after installed the codec, the existing VLC 0.9 beta still could not open those DIVX video, any ideas?

I found nothing been left after the installation inside /tmp

How to incorporate the codec to work with VLC?


7 miis April 15, 2008 at 9:54 am

I installed vlc
sudo apt-get install vlc

but opening avi files plays only voice !! not video


8 yusuf khan June 8, 2008 at 5:32 am

Thanks for the support i have got the Divx installed.


9 Shawn June 8, 2008 at 8:24 pm

As mentioned above; VLC uses it’s own codecs; installing the DivX codec pack will not make it play in VLC.

I’m at a loss as to any tool that actually uses the “official” DivX library.


10 vikendra June 14, 2008 at 8:28 am

i want to know about the all steps to runing the vedio in linux


11 Aadam June 23, 2008 at 12:03 am

i types my own password but it didnt work, by own pass word what do you mean, if you mean the password to log onto the computer, it doesnt work, so please tell me what password to type


12 brian June 23, 2008 at 7:08 pm

brian@brian:/tmp/divx611-20060201-gcc4.0.1$ $ sudo ./
bash: $: command not found

um.. how can i fix this because i followed all directions up to here — it is hopefully apparent to you all that i am stuck.

any help would be of great use to me.
thanks, brian


13 stupidsavior July 2, 2008 at 9:31 pm

sudo needs root password. If your guys are so dumb why are you using Linux in the first place? Stick to StupidSoft.


14 jamble May 15, 2011 at 7:29 am

Err..sudo does not take the root password.


15 Zach May 16, 2011 at 4:24 pm

sudo gives a regular user account super/root rights. You put sudo in the front of your command when it requires you to read or write system files that you’re regular account is not a owner/group member of.


16 Zach August 8, 2008 at 11:35 pm

I ran through the steps without a problem. Except I am trying to us VLC as my streaming video client for play divx videos through firefox. How can I set that up?


17 Ray November 16, 2008 at 4:20 pm

i did all the steps..but vlc’s only got sound and no video…did i do something wrong? i got confirmation that divx installed properly but no go =( help!


18 FredAgu December 13, 2008 at 1:41 pm

Me too have the password problem as karthik and Adam
I think contents.dat is separately password protected.

Brian pls chk ur help files to know correct usage of ‘sudo’ command
{ sudo **ur extracted file path**/}
to goto root type sodo -i at terminal and follow the steps above


19 sami December 14, 2008 at 1:20 pm

sudo not working….
cannot find command


20 RTH December 30, 2008 at 3:58 pm

In order to use sudo you must have an entry in /etc/sudoers file.
Usually in the following format:
username ALL=(ALL) ALL

When using sudo command you will need to provide your own username password.

If sudo has not been setup you need to become a root user (just type: su and provide root password) and then add the following line into /etc/sudoers file. After that sudo should work.


21 jimmyjiggle February 25, 2009 at 9:05 am

man sudo
vi /etc/sudoers
if you can’t figure that out use windows


22 daemonas February 27, 2009 at 9:24 am

m8 suppose you’ve born with linux pre installed inside your brain…
give a chance to 0thers jump into Linux, is what Linux forums standing for.
If you do not want to be helpful, maybe windows is a better place for u.
After all there has not to be any answer , simply cause everything is locked ;-)


23 fakesmeksidi March 28, 2009 at 6:00 pm

if sudo doesn’t work try sudo’s for ubuntu and some other versions. it will ask you your password and after you submit it it will change u to superuser. after you do whatever u want enter exit to became a regular user again.


24 Rocky March 31, 2009 at 11:43 am

I installed was able to run the installation file for divx code on fedora 10 but i open some sort of agreement text and didnt move further could anyone guide me what to do next.


25 Mark Bellis April 7, 2009 at 9:14 pm

Rocky – “Press Q after reading agreement, please type yes to install codes.”
Thanks – this works on the Aspire One’s Linux.


26 mandervain August 14, 2009 at 11:12 pm

I’ve got also kubuntu and line : sudo apt-get vlc doesn’t works…
what might be the problem and how to fix it?


27 unbuntu September 17, 2009 at 1:32 am

mandervian – use sudo apt-get install vlc


28 Punki October 11, 2009 at 6:27 am

during apt-get update i recieved the following error:

pc000113:/tmp/divx611-20060201-gcc4.0.1 # apt-get update
Ign update/11.1 repomd.xml
Get:1 11.1/repo/oss/suse repomd.xml [951B]
Fetched 951B in 0s (6395B/s)
Err update/11.1/ primary.xml
  404 Not Found
Err update/11.1/ filelists.xml
  404 Not Found
Hit 11.1/repo/oss/suse/ primary.xml
Hit 11.1/repo/oss/suse/ filelists.xml
Failed to fetch  404 Not Found
Failed to fetch  404 Not Found
Reading Package Lists... Error!
E: Dynamic MMap ran out of room
E: Error occured while processing transmission-gtk (NewVersion1)
E: Problem with MergeList /var/lib/apt/lists/ftp-1.gwdg.de_pub_opensuse_distribution_11.1_repo_oss_suse_repodata_primary.xml
E: The package lists or status file could not be parsed or opened.



29 Peter October 23, 2009 at 10:13 am

I’m a Mac user who is just now venturing into Linux.
I too was having a problem with the install.
Pressing “Q” worked. Thank you!

But how was a newbie supposed to know that I needed to press “Q”?
That’s not very intuitive.



30 mossup February 6, 2010 at 5:01 am

I followed the instructions to the letter, divx is definitely installed but still cannot play files either on vlc, xine or gstreamer… annnnnnd vlc does not appear to have any codecs at all installed for use…weird…


31 piggygrunts October 6, 2010 at 11:46 am

Many thanks for your instructions for installing DIV X, they worked perfectly with Xubuntu and VLC Player.


32 Anshul February 21, 2011 at 1:27 pm

How to play mp3, .avi, .3gp, .mpeg, .dob, and .flv files in ubuntu and fedora.
How to install other software like vlc player, powr dvd on ubuntu and fedora
Please reply


33 assemov April 10, 2011 at 4:51 am

good morning every one !!!

could any one plz tell me how to get direct download to vlc player then direct command to install it on suse linux with out problems so i can watch my flv,mpeg files..etc that are only working on windows …i do really appreciate your efforts


34 paolo guggia June 13, 2011 at 5:03 pm

VNC install doesn’t work – when running ‘sudo apt-get vlc’ I get an error (E: Invalid operation vlc)


35 dc July 19, 2011 at 8:27 pm

see unbuntu’s advice above:
>> use sudo apt-get install vlc


36 Vinicius Pires September 1, 2012 at 6:48 pm


Thanks for the tutorial…
But instead of “sudo apt-get vlc” you should type “sudo apt-get install vlc”


Leave a Comment

Tagged as: , , , , , , , , , , ,

Previous post:

Next post: