« December 2008 | Main | March 2009 »

January 9, 2009

How to watch RealVideo-encoded video files in Ubuntu

I ran into problems opening a video file - neither Kaffeine, MPlayer nor Xine could open it due to a missing codec. MPlayer spewed out a lot of error messages like "Win32 LoadLibrary failed to load: drv4.so.6.0, /usr/lib/codecs/drv4.so.6.0, /usr/lib/win32/drv4.so.6.0, /usr/local/lib/win32/drv4.so.6.0" and "Could not open required DirectShow codec drv43260.dll", and seemed unable to find a codec called drvc.so. It helpfully adds, "Read the RealVideo section of the DOCS!"

Unfortunately, if you do manage to track that down - it's in the README - you're told to download an archive of binary codecs and stick it in /usr/local/lib/codecs. This won't work, because the archive doesn't actually contain drvc.so, the one needed for RealVideo. If you search around, you'll find a lot of confused forum and mailing list posts, mostly unanswered, and a number advocating things like symlinking that directory to /usr/lib/codecs or /usr/lib/win32 or variants thereof. Ignore all of that completely, none of it will work, and even if you did manage to find the magic voodoo chicken incantation to make it work it would be an ugly and tedious way to do it.

Thankfully, I discovered in the course of searching for a solution that there's a great Ubuntu package repository called Medibuntu ("Multimedia, Entertainment & Distractions In Ubuntu"), which is "dedicated to distributing software that cannot be included in Ubuntu for various reasons, related to geographical variations in legislation regarding intellectual property, security and other issues". That includes various binary video codecs, including the RealVideo one. Here's what you need to do:

  1. Follow the Medibuntu repository instructions. (Note: I hadn't heard of the /etc/apt/sources.list.d/ directory before, and simply dumped the repository location directly into /etc/apt/sources.list, and it worked fine; but if you're not used to working directly with that file, just follow their instructions and it'll be dandy.)
  2. sudo apt-get install w32codecs (or w64codecs or ppc-codecs depending on your platform).

That's it! Your video players should now be able to cope with RealVideo files. Happy viewing.

Posted by hex at 12:14 AM |