Mar 28 2009

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

Mar 28 2009

Red Hat — Stand Alone Or Get Bought?

head_dunce writes “It seems that this economy has inspired a lot of businesses to move to Linux, with Red Hat posting profits that beat everyone’s expectations. There’s a dark side to being a highly profitable company in a down economy, though — now there are talks of Citigroup and Oracle wanting to buy Red Hat. For a while now, we’ve been watching Yahoo fend off Carl Icahn and Steve Ballmer so that they could stay independent, but the fight seems to be a huge distraction for Yahoo, with lots of energy (and money) invested. Will Red Hat stay independent? What potential buyer would make for a good parent company?”

Read more of this story at Slashdot.

Share

Mar 27 2009

Microsoft, Amazon Oppose Cloud Computing Interoperability Plan

thefickler writes “Microsoft is opposing an industry plan, the Open Cloud Manifesto, to promote cloud computing interoperability. Officially, Microsoft says the plan is unnecessarily secretive and that cloud computing is still in an early stage of development, but there are allegations that Microsoft feels threatened by the plan because it could boost Linux-based systems. The goal of the group behind the manifesto, the Cloud Computing Interoperability Forum (CCIF), is to minimize the barriers between different technologies used in cloud computing. And this is where the problem seems to lie, with the group stating that ‘whenever possible the CCIF will emphasize the use of open, patent-free and/or vendor-neutral technical solutions.’ Some speculate that Microsoft is actually worried that this will allow open source systems, such as Linux, to flourish, at the expense of Microsoft technology.” Amazon is also declining to support the plan, saying, “the best way to illustrate openness and customer flexibility is by what you actually provide and deliver for them.” Reader smack.addict contributes a link to an O’Reilly piece asking what openness really means for cloud computing.

Read more of this story at Slashdot.

Share

Mar 27 2009

‘Jaunty Jackalope’ Ubuntu springs into beta

Next version of the Ubuntu Linux distribution includes a new notifications system, changes to the start-up process, and the distribution’s first foray into cloud computing. Read this blog post by David Meyer on Business Tech.

Share

Mar 27 2009

Linux : Psyb0t Attacks Linux Routers (Update)

Already in January Australian Terry Baume had written a short paper describing the psyb0t malware that was beginning to crop up in Linux systems. Most of these are DSL routers, in that they allow a greater level of stealth because they are online longer than individual PCs.

Share

Mar 26 2009

Giving Linux That ‘XP’ Factor

Still holding out on the Vista upgrade? Now’s a good time to give Ubuntu Linux a try.

Share

Mar 26 2009

Quick htpasswd Creation on Linux. Only The Useful.

Quick htpasswd Protection Setup On Linux.


cody@taylor:~$  <--This is the prompt. You do not need to type this

In the console get into the directory that you wish to protect.

cody@taylor:~$ cd /var/www/protected

Get the full path to the directory if you don’t already know it.


cody@taylor:~$ pwd

Create the htaccess file and add the following lines.


cody@taylor:~$ vim .htaccess
AuthUserFile /var/www/protected/.htpasswd
AuthName "This Site"
AuthType Basic
Require valid-user

Next use the htpasswd linux command which should be in the most common distros.


cody@taylor:~$ htpasswd -c .htpasswd someguy
New password: 
Re-type new password:

Almost done. Now you need to set the permissions on the files we just created.


cody@taylor:~$ chmod 755 .htaccess .htpasswd

All good.

Share

Mar 26 2009

History Linux Command Overview/Tutorial. Only The Useful.

Linux / Unix Command: history

Linux Command Description
This command displays a list of the most recently executed commands on Linux and Unix workstations and servers.

For the impatient here is the proper syntax:


history
history [n]
history -c
history -d offset
history [-anrw] [filename]
history -ps arg

Here are the only real useful options for this very useful linux command.

-c will clear the history list.


history -c

will remove all entries in your history list.

-d will delete the command at the specified offset.


history -d 24

will remove the 24th entry. Each line is labeled so it’s easy to clean up after yourself if you don’t want your boss to easily find your blunder.

There are other arguments available but I’ve never had a use for them and you can always use the man pages to check up on them if you need to.

Sometimes the history file removes some entries in order to keep the list from taking to much space. This can be unpleasant when you’re looking for some nix command that you know you’ve executed but can’t remember the exact syntax of. To increase the size of the list you will need to edit your bash_profile in your home directory (That is, assuming you are using bash like most sane linux users). This can be done very easily :

Add these two lines to your .bash_profile. This will not take effect until your next login.


vi ~/.bash_profile
HISTSIZE=340
HISTFILESIZE=680

Share

Mar 26 2009

Is there life after Windows?

Linux is free, easy-to-use and is shedding its geeky image, thanks to fans who prefer it to Microsoft’s mighty operating systems. But is it for everyone? Jamie Merrill asks four rookies to put it to the test.

Share

Mar 26 2009

No Google Video Chat for Linux Yet! Where’s the Love Google?

“Developing and releasing Linux clients for Google services in parallelwith Windows client releases should be possible. C’mon, Google — isit any wonder there’s a perception that Linux ‘is not ready for thedesktop’ when companies like you shout out praise about open standardsand then fail to prioritize support for …” (Linux)

Share