How to: Linux Play DivX .avi video codec file

Posted on in Categories Debian Linux, Linux, Linux desktop, Linux distribution, Ubuntu Linux last updated October 31, 2007

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 http://download.divx.com/labs/divx611-20060201-gcc4.0.1.tar.gz

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 ./install.sh

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:

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

36 comment

  1. I tried the above procedure mentioned. But after i did ” sudo ./install.sh ” , 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. thankyou sooo much for the instructions on installing the divx codec…..it 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 66stage.com…..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…

  3. 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.

  4. 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.

  5. 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

  6. [email protected]:/tmp/divx611-20060201-gcc4.0.1$ $ sudo ./install.sh
    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

      1. 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.

  7. 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**/install.sh}
    to goto root type sodo -i at terminal and follow the steps above

  8. 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.

  9. @jimmyjiggle
    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 😉

  10. if sudo doesn’t work try sudo su.it’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.

  11. 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.

  12. Hi,
    during apt-get update i recieved the following error:

    pc000113:/tmp/divx611-20060201-gcc4.0.1 # apt-get update
    Ign http://ftp-1.gwdg.de update/11.1 repomd.xml
    Get:1 http://ftp-1.gwdg.de 11.1/repo/oss/suse repomd.xml [951B]
    Fetched 951B in 0s (6395B/s)
    Err http://ftp-1.gwdg.de update/11.1/ primary.xml
      404 Not Found
    Err http://ftp-1.gwdg.de update/11.1/ filelists.xml
      404 Not Found
    Hit http://ftp-1.gwdg.de 11.1/repo/oss/suse/ primary.xml
    Hit http://ftp-1.gwdg.de 11.1/repo/oss/suse/ filelists.xml
    Failed to fetch http://ftp-1.gwdg.de/pub/suse/i386/update/11.1/repodata/primary.xml  404 Not Found
    Failed to fetch http://ftp-1.gwdg.de/pub/suse/i386/update/11.1/repodata/filelists.xml  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.
    

    thx

  13. 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.

    Peter

  14. 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…

  15. 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
    thanks

Leave a Comment