Can’t see videos with vlc in Debian Lenny

If you have problems (i.e. blank or green screen or the error “main decoder error: no suitable decoder module for fourcc `XVID’” in vlc) viewing XviD videos in Debian Lenny and you are using debian-multimedia repository then here is how to solve temporarily the problem.

What we are going to do now is to downgrade the minimum set of libraries for restoring vlc/totem capability to play videos. In addition we will tell apt-get not to upgrade those libraries next time we run apt-get upgrade. The latter is just temporary, as hopefully the problem will be solved in a few days weeks (months?).

Here is the two simple commands:

# apt-get install --reinstall libavcodec51=0.svn20080206-8 libavformat52=0.svn20080206-8

Then edit /etc/apt/preferences (normally it doesn’t exist) and add:

Package: libavcodec51
Pin: version 0.svn20080206-8
Pin-Priority: 900

Package: libavformat52
Pin: version 0.svn20080206-8
Pin-Priority: 900

To get vlc working you may need to delete .vlc in your user home directory:

$ rm -r ~/.vlc

How to get back

If something went wrong and you want to get back to the state before this pointless article, you just have to remove the previous lines in /etc/apt/preferences and type:

#apt-get upgrade
Why this happens?

For those who want to know why this happens: it seems that is just library name collission which causes multimedia apps (reying on those libraries) not to work with those found in debian-multimedia repository. By the way, a guy reported a bug in the Debian bug tracking system.

None
A comma-separated list of terms describing this content. Example: funny, bungee jumping, "Company, Inc.".