Donnerstag, 17. Mai 2012

AVCHD and avidemux

Many current camcorders store video according to the AVCHD specification. This is a MPEG2 transport stream with video encoded in H.264 and audio in Dolby AC-3 format.

avidemux which usually is my Swiss army knife for video conversion could not handle the .MTS files produced by the camcorder - at least not the version which are currently available in the Ubuntu repositories (avidemux 2.5.x).

After visiting the avidemux homepage I was pleased to find out, that version 2.6 can handle that format.

This post describes how to compile avidemux 2.6. It mostly reflects the process laid out in the avidemux wiki with some additional information to avoid some pitfalls.

I tested it on vanilla installs of Ubuntu Natty and Precise and the compilation works like a charm. Please keep in mind that you compile from nightly builds and not all functions are implemented yet (May 2012, git revision 7949).


First we need git to pull the source code:

sudo apt-get install git

For the core application

sudo apt-get install libxml2-dev gcc g++ make cmake pkg-config libpng12-dev fakeroot yasm

For the GUI (QT4)

sudo apt-get install libqt4-dev

For the common plugins

sudo apt-get install libaften-dev libmp3lame-dev libx264-dev  libfaad-dev libfaac-dev

For the PulseAudio plugin

sudo apt-get install libpulse-dev

Download the source

git clone git://

Compile it

cd avidemux2-6
bash bootStrap.bash --deb

This will produce four .deb files in the ./debs folder.

Install it

cd debs
dpki -i *

Run it


Configure it

Sometimes you have to select the correct audio device in Edit - Preferences - Audio - AudioDevice:


avidemux homepage + wiki

Donnerstag, 29. März 2012

Current versions of blender under Ubuntu

The normal way to stay current with your blender version is to download it from

You can use the following commands to get it using the normal Ubuntu updates via ppa:

sudo add-apt-repository ppa:cheleb/blender-svn
sudo apt-get update
sudo apt-get install blender

How-to abcde from an audio CD image

abcde is a command line CD encoder.  It rips CDs and encodes it in MP3, OGG or other formats.

By default it reads from your CD drive.  If you only have an image of your CD you are out of luck. You can either first burn the image on let abcde work on the CD, or use the only other format abcde currently accepts as input: a flac file with embedded cue sheet.

There are two common images files for audio CDs: cue/bin and toc/bin

The bin file contains the digital representation of the audio, whereas the remaining file describes where the tracks start and end.


You can create the flac file from cue/bin files using the following command:

flac --best --force-raw --sample-rate=44100 --channels=2 --bps=16 --endian=big --sign=signed --cuesheet=image.cue image.bin -o image.flac

Check the compression ratio after flac has finished.  A ratio of approx. 0.99 usually indicates that the byte order is reversed.  This may happen if the image was created on a Mac. If you play back the flac file, you will hear mostly noise. In this case change the byte order to


Normal compression ratios are in the range of 0.6 to 0.7.

You can then convert the flac file to single tagged MP3 files using:

abcde -d image.flac


flac can't process TOC files. You have to convert them into the CUE format. Fortunately there is an app for that: cueconvert from the cuetools package:

cueconvert image.toc image.cue

I had to find out that cueconvert will abort with a syntax error when I used toc files created by Brasero.

In this case load the toc file into a text editor and remove the CD_TEXT { … } block, if present.

And while you're at it, delete all lines containing ISRC codes, as flac does not like these.

After the conversion use the resulting CUE file as described earlier.