Installing coreAVC on Ubuntu with WINE Tutorial and Troubleshooting. Only the Useful.

My H.264 videos were not really playing well with the regular codecs on my ubuntu 8.04 64 bit desktop box.
It’s my primary workstation so this blew. I looked into getting coreavc on linux. There are apparently a number of ways to do this.
This is how I did it and the issues/problems that I had getting it to work.

CoreAVC is a high performance video codec for the H.264 video format. It is not free. While it would be very easy to find a license in some dark corner of the web that is unethical.

Researching coreavc and linux on google got me this link.
I decided to go the xine way because I’ve already got Kaffiene using xine and it seems to playback smoother than mplayer.
Except for the load times which blow.

Turns out I had to install dshowserver which seems to be a way to use coreavc with all normal media players on Ubuntu.
Dshowserver is also the only supported way to use coreavc with xine.
Since I’m using 64 bit I downloaded the static libraries from here.
Put those binaries in their proper places by typing the following commands at your ubuntu command line:


cd /place/where/I/put/files
sudo cp dshowserver /usr/local/bin
sudo cp ../loader/registercodec /usr/local/bin 

Using Wine I then installed CoreAVC and moved the CoreAVCDecoder.ax from it’s installed directory to /usr/lib/win32.
That directory didn’t exist so I had to create it using


sudo mkdir /usr/lib/win32

I tried to verify that it was working with this command:


dshowserver -c CoreAVCDecoder.ax -s 1280x720 -g 09571a4b-f1fe-4c60-9760de6d310c7c31 -b 12 -f 0x34363248 -o 0x30323449

It errored out on me with this output:


No id specified, assuming test mode
Opening device
Called unk_IsDebuggerPresent
Creating new registry
MSGBOX 'Serial Number Missing!' 'CoreAVC Professional Edition' (327680)
Win32 LoadLibrary failed to load: 
Warning: DS_Filter() could not open DirectShow DLL.  (DLL=CoreAVCDecoder.ax)
Failed to create DirectShow filter
Failed to open win32 codec CoreAVCDecoder.ax

Apparently my license wasn’t found. It would be nice if Wine took care of that but I guess I have to do it manually.
I found some instructions here.

First execute this from the ubuntu command line:


export REGISTRY=$HOME/.mplayer/registry32

Then


registercodec -r $REGISTRY -k "HKLM\\Software\\CoreCodec\\CoreAVC Pro\\Serial" -v "55555-55555-CORE-55555-55555"

where 55555-55555-CORE-55555-55555 is your personal serial number.

To finish up execute :


registercodec -r $REGISTRY -k "HKLM\\Software\\IniFileMapping\\CoreAVC\\Settings\\C:\\coreavc.ini" -v "ilevels=2 olevels=2 di=3 deblock=7 ai=0 crop1088=0 vmr_ar=0" 

Now when I execute the same linux command:


dshowserver -c CoreAVCDecoder.ax -s 1280x720 -g 09571a4b-f1fe-4c60-9760de6d310c7c31 -b 12 -f 0x34363248 -o 0x30323449

I get a this output from dshowserver:


No id specified, assuming test mode
Opening device
Called unk_IsDebuggerPresent
len: 992
ProductVersion: 1.7.0
Decoder supports the following YUV formats: YUY2 UYVY YV12 I420 
Decoder is capable of YUV output (flags 0x2b)
Setting fmt
Starting
Initialization is complete

Which is good.

Now time for the xine patch for coreavc.
The guide said I needed the source files so I go here and download both
xine-lib-1.1.15.tar.bz2 and xine-ui-0.99.5.tar.gz
I extract them both and, back to the terminal, I change my working directory to the path to the xine-lib source directiory that I just downloaded and extracted.
Then I run the patch command:


patch -p1 < <path to coreavc-for-linux>/xine/dshowserver.patch

This is the output I got from the xine patch:


patching file src/libxinevdec/Makefile.am
patching file src/libxinevdec/dshowserver.c
patching file src/libxinevdec/nal_parser.c
patching file src/libxinevdec/nal_parser.h

While still in the xine-lib directory I try to compile xine using:


./configure
make

Which gives me these error messages:


gcc: /usr/lib/libasound.so: No such file or directory
make[2]: *** [xineplug_ao_out_alsa.la] Error 1
make[2]: Leaving directory `/home/thadeus/core_avc/xine-lib-1.1.15/src/audio_out'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/thadeus/core_avc/xine-lib-1.1.15/src'
make: *** [all-recursive] Error 1

I check to make sure I have alsa installed properly. I do.
So I look around the /usr/lib folder for something odd.
Turns out libasound.so.2 is in there….Not sure what the 2 is for so I copy the libasound.so.2 to libsound.so:


sudo cp libasound.so.2 libasound.so

I try compile xine again.
After maxing out my CPU for longer than I expected I finally get back to the prompt.
Time to try installing.

sudo make install

All seemed well. Now the H.264 files run relatively well using the coreAVC codec on my primary ubuntu desktop….although not as good as my windows boxes.
Thats the price I pay for using Linux.

-Cody Taylor

Share

Leave a Reply