Archive for the 'linux' Category

Ubuntu vs AAC (round 1)

Saturday, June 7th, 2008

For better or for worse, (generally for worse) a lot of multimedia systems seem to like making peoples lives difficult.

This is painfully obvious with AAC and the formats that use it (think mp4).

Luckally, playback can be assured by using a nice arrangement of plugins that are downloaded just in time to play the offending file on your computer (thanks ubuntu).

This help doesn’t extend to re-encoding though, so for those of you lucky enough to have an mp4 capable phone (like the sony erricsons), you can find that putting the latest Bleach on your phone to be an exercise in frustration.

The reasons for this are numerous and complexe but come down to the simple fact that if cannonicle put aac encoders in Ubuntu they’d be sued to kingdom come in the states (thank god I don’t live there ;) ).

Help is at hand though, since even if the versions of the enncoding tools included with Ubuntu don’t come equiped, you can re-compile them so that they work as intended.

First up: ffmpeg

FFmpeg is one of the many swiss army knives used for video encoding available with Linux. It’s probably the easiest to use, and like it’s cousins, the ubuntu version comes cripled.

What to do?

First of all, make sure we have what’s needed to re-build it

sudo apt-get build-dep ffmpeg

Then add a few libraries (that add the magic support)

sudo apt-get install libfaac-dev libfaac0 libfaad-dev libfaad2-0 libfaad0

Finally, get the source code to ffmpeg

mkdir ffmpeg
cd ffmpeg
apt-get source ffmpeg

Now the fun starts, you should have 3 files and a directory before you.

Cd into the directory.

Now let’s move this thing arround a bit:

Open: debian/rules

This file tells dpkg how to build ffmpeg, we want to add a config flag so go to the lines that start with “confflags” and add on to one of them:

–enable-libfaad –enable-libfaac

Save, and quit, now all you have to do is re-build the package

dpkg-buildpackage

go have a coffee while it builds, and then install the result:

cd ..
dpkg -i ffmpeg*

To use, something like this is needed:

ffmpeg -i Source.avi -vcodec h263 -b 400 -s 352×288 -acodec aac -ab 64 -ar 48000 -ac 2 -f mp4 Dest.mp4

Update:

For the lazy, here are the debs that need installing:

-
ffmpeg_0.cvs20070307-5ubuntu7_i386.deb
libavcodec-dev_0.cvs20070307-5ubuntu7_i386.deb
libavcodec1d_0.cvs20070307-5ubuntu7_i386.deb
libavformat-dev_0.cvs20070307-5ubuntu7_i386.deb
libavformat1d_0.cvs20070307-5ubuntu7_i386.deb
libavutil-dev_0.cvs20070307-5ubuntu7_i386.deb
libavutil1d_0.cvs20070307-5ubuntu7_i386.deb
libpostproc-dev_0.cvs20070307-5ubuntu7_i386.deb
libpostproc1d_0.cvs20070307-5ubuntu7_i386.deb
libswscale-dev_0.cvs20070307-5ubuntu7_i386.deb
libswscale1d_0.cvs20070307-5ubuntu7_i386.deb

Bye bye Dapper, Welcome Hardy

Sunday, April 27th, 2008

I’ve just finished upgrading my server to Ubuntu Hardy, with virtual no trouble.

The only problem came from the kernel, which now calls  ide drives ’sd…’ instead of ‘hd…’ so hda1 becomes sda1.

Update grub or face the consequances.You have been warned!

Zabbix

Thursday, February 7th, 2008

Sometimes things that seem completely harmless just come and hit you over the head…

That’s what happened to me with Zabbix yesterday. I was going through some items and cleaning up, when suddenly, 4 hosts went off-line. Except that they hadn’t.

I couldn’t understand why Zabbix refused to see them (the agents were responding fine).

I finally found out that it was because of the way that Zabbix calculates the ’status’ item, which has a value of 0 if alls well, and 2 if the host is off-line.

Zabbix looks at the first item to be taken of the host, if that item returns an empty string, Zabbix decides that the host is dead and raises the alarm, even if the host has 150 other items all working perfectly. This bizzar to say the least, but workable. If this happens, a quick fix is to deactivate the offending Item, so that the first Item checked returns a value, then the host comes back :)

Any how, I thought I’d just document this in case anyone else starts loosing hair over the issue :)

Geek’s dream…

Tuesday, December 11th, 2007

Or mabey not, anyhow, here’s a quick counter to tell you how far away KDE4 is… :)

KDE 4.0 Release Counter

VMware Server +nat -dhcp?

Saturday, November 10th, 2007

I’ve just been testing an install CD for enkix, our custom Debian installer, to make sure it works next week when I re-install some servers in Paris.

The problem is that our datacenter lacks a dhcp server (everythings static), whereas I had never tested enkix using static IPs before (all installs were done at the office).

Vmware was my poison of choice for this task, since it offers sevral network parameters: Bridged networking using the offices DHCP, net using it’s own DHCP, and a host only network using…. it’s own DHCP. Hmm… and what happens if you just don’t like DHCP? What if you want everything static? Or if you prefer Avahi? Or, as is in my case, you’re testing for a DHCP-less environment and DHCP is the last thing you want?

After a few fruitless searches on the web, the solution was revealed by probing /etc/vmware. In the network sub directories (vmnet0-vmnet8), those which have a DHCP server have a dhcp sub directory, the others don’t.

Solution: Just create a natted vmnet, then pop into the corresponding directory, rm -rf dhcp and /etc/init.d/vmware restart, problem solved.

One last thing: if you do this, please make a note of the network parameters before hand, since it’s always some funny value like 192.168.28.x

I’m a beta tester - Yay!

Friday, August 17th, 2007

Yesterday I received my very first piece of beta-hardware : the OpenGate (http://www.easyneuf.org).

It’s currently sitting on my desk at home waiting to be played with :P

I’ll be posting some updates and a review in the coming days.

Oh, and no, I don’t mean to go this long between blog posts again ;)

David

Ubuntu Feisty and IDE (pata) drives

Saturday, May 12th, 2007

One thing that buggs me about Ubuntu Feisty (yes, some things do ;) ) is that it didn’t recognise my cdroms (ide, secondary bus).

Apart from an inability to use the drives, and lshw that stalled when reading IDE, the only hint was a ‘hdc: lost interrupt’ that dmesg spewed after having correctly identified the drives. This particular bug also stopped the Feisty live CD from booting.

After much googleing and even more frustration, the solution seems to be to add ‘irqpoll’ to the default kernel line in /boot/grub/menu.lst. irqpoll seems to be a workaround for some bizarre kernel bugs, in any case for me it worked in fixing my install (I haven’t yet checked it on the live cd, so YMMV).

The bug itself seems to stem from the unified disk model present in the kernel 2.6.20 which handles scsi and sata a treat, but has some problems with legacy pata systems.

A week without mail…

Thursday, April 19th, 2007

… is something I don’t want to experience.

I’m currently in the final stages of preparing a switch-over from a standard mail server to a virtual user based one, the transfer will be at just after 20:00, or in slightly more than half an hour.

Wish me luck!

Go Go (Gadget) Free Nvidia drivers

Wednesday, January 10th, 2007

Congratulations to David Nielsen on completing his pledge in support of  project nouveau.

I know that the developers are far too modest to want to accept the donation, but I hope they do anyhow. Guys, just use it for food/beer or whatever you want if you don’t needed it for hardware etc…

The pledge is still active until February 8th, so if anyone wants to show commitment to Free graphics drivers, head on over.

Anyhow, time for sleep :)