Available languages

Useful links
Читать на русском

Saturday, April 23, 2011

Converting MP3s to M4B audiobooks, and M4B to MP3

Here’s how to convert M4B audiobooks (used by Apple iPod) to MP3, and how to create an M4B from one or more MP3s.
The easy bit first: M4B to MP3
For a single file:
ffmpeg -i -acodec libmp3lame -ar 22050
For a bunch of M4B files:
for m4b in $(ls -1 *.m4b); do ffmpeg -i $m4b -acodec libmp3lame -ar 22050 ${m4b}.mp3; done

The more involved bit is to create an M4B audiobook from a bunch of MP3 files, so I have an automated script.
First thing is to ensure all the MP3 files you want to include in ONE M4B have sequentially numbered names:
filename-01.mp3
filename-02.mp3
or, if you want to create the M4B from more than 100 M4B files:
filename-001.mp3
filename-002.mp3
etc.
Copy and save the script below to the file create_audiobook and make it executable:
chmod 755 create_audiobook
For each M4B audiobook optionally set the tags using environmental variables:
export AUTHOR="The Author"
export TITLE="Some Book"
export YEAR="2007"

Make sure you’ve got plenty of free space on the mount point the source files are on. If you need to have the HUGE temporary files put on another mount point with plenty of space (Allow for more than 3GB of free space) then set the TMP environmental variable to point to a location that has plenty of space and allows users to create/delete files:
export TMP=/tmp
By default, TMP is set to the current directory if not specified like this.
Now run the script, passing the output filename and the input file mask. Here’s two possible usages:
create_audiobook "Terry Pratchett - Colour of Magic" "Terry Pratchett - Colour of Magic - *.mp3"
create_audiobook "Terry Pratchett - Colour of Magic" *.mp3
Note the quotes around the two parameters that allows spaces in filenames.
#!/bin/bash
# create ipPod audiobook from group of sequentially named MP3 files
# Set environmental variables for track ID3 tags
# AUTHOR, TITLE, YEAR
# usage: create_audiobook
#
# Pass output filename on command-line with no extension, and use quotes if there are spaces in filenames
# e.g. create_audiobook "Terry Pratchett - Colour of Magic" *.mp3
# e.g. create_audiobook "Terry Pratchett - Colour of Magic" "Terry Pratchett - Colour of Magic - *.mp3"

if [ "x$TMP" == "x" ]; then
TMP=.
fi
echo “Args: $@”
echo “Author: $AUTHOR”
echo “Title : $TITLE”
if [ "x$1" != "x" ]; then
filename=$1
if [ "x$2" != "x" ]; then
echo “Output: $filename”
filelist=”$(echo “$2″ | sed -e ‘s/ /\\ /g’)”
echo “Filelist : $filelist”
echo “Writing HUGE temporary files to $TMP”
# Use a sub-shell to preserve spaces in filenames passed to mp3wrap
sh -c “mp3wrap -v \”${TMP}/${filename}\” ${filelist}”
if [ $? = 0 ]; then
mplayer -vc null -vo null -ao “pcm:nowaveheader:fast:file=${TMP}/${filename}.pcm” “${TMP}/${filename}_MP3WRAP.mp3″ 2>&1 | tee ${TMP}/create_audiobook_mp.log
# example from log
# AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)
AUDIO=”$(egrep ‘AO:’ ${TMP}/create_audiobook_mp.log)”
echo “Audio Format: $AUDIO”
RATE=$(expr “$AUDIO” : ‘AO: .* \(.*\)Hz.*’)
CHANS=$(expr “$AUDIO” : ‘AO: .* .*Hz \(.*\)ch.*’)
SAMPLESIZE=$(expr “$AUDIO” : ‘AO: .* .*Hz .*ch s\([0-9]\+\).. .*’)
echo “ENCODING: $RATE Hz, $CHANS channels, $SAMPLESIZE bit sample size”
/usr/bin/faac -R $RATE -B $SAMPLESIZE -C $CHANS -X -w -q 80 –artist “$AUTHOR” –album “$TITLE” –title “$TITLE” –track “1″ –genre “Spoken Word” –year “$YEAR” -o “${filename}.m4b” “${TMP}/${filename}.pcm”
rm -f “${TMP}/${filename}.pcm”
rm -f “${TMP}/${filename}_MP3WRAP.mp3″
rm -f “${TMP}/create_audiobook_mp.log”
echo -e “\n\nCreated ${filename}.m4b”
fi
fi
fi


Article is token from http://intuitivenipple.net/10/converting-mp3s-to-m4b-audiobooks-and-m4b-to-mp3

Thursday, January 27, 2011

Musea in de 21ste eeuw. Ideeën Projecten Gebouwen

Datum 29/01/2011 – 30/04/2011
Vanaf 29 januari tot en met 30 april kunnen jullie de lege zalen van het Koninklijk Museum voor Schone Kunsten Antwerpen doorlopen.
Maar waarvoor!? Lege zalen. Ze zijn toch met de renovatiewerken bezig, dacht ik.
Maar het blijkt dat de echte renovatiewerken pas in mei zullen beginnen. En in het einde van 2014 zal het museum de deuren weer open doen met een grote tentoonstelling over de invloed van Rubens op de Europese schilderkunst.
Vandaag staat het museum ook niet stil en houdt een tentoonstelling over musea gebouwen.
Musea zijn brandend actueel.
Mensen richten zichzelf tot kunst. Ze weerspiegelen het verleden, heden en toekomst. En uiteraard doet het iedereen op zijn eigen manier.
Schilders – schilderen. Dichters – dichten. En architecten – bouwen.
Denk maar aan het Parijse Centre Pompidou van 1977.
De expo toont prominente en toekomstgerichte bouwprojecten uit het voorbije decennium. Het gaat om projecten die in Europa, Noord-Amerika, Azië en Australië gepland, in uitvoering of voltooid zijn. Vier thema's staan centraal: renovatie en nieuwbouw; de uitbreiding van bestaande musea; museumarchitectuur in het weefsel van de stad en musea in de natuur.
Je kan ontwerpen bewonderen van internationaal gerenommeerde architecten als Tadao Ando of Jean Nouvel.
Ook de twee Antwerpse projecten, het Museum aan de Stroom(MAS) van Neutelings Riedijk Architecten en het KMSKA van Claus en Kaan Architecten Rotterdam komen aan bod.
Het gloednieuwe Museum aan de Stroom opent op datzelfde moment wanneer het KMSKA sluit de deuren dicht voor een ingrijpende renovatie en uitbreiding die enkele jaren zal duren.
Antwerpen staat niet stil. Laten we eens kijken wat er nog gezien kan worden.

Get .ppt and .doc files about this topic here.

Thursday, December 30, 2010

Mass printing... How to print locked pdf file. Part 2: Windows.

I've already described a way to solve this problem for Linux users here.
In Windows it can be solved even easier.
Just follow the instructions:

    Download pdf2djvu.
    unpack the downloaded archive
    copy a pdf file with ban on printing to the program directory(pdf2djvu directory).
    open a terminal in the program directory and run the following command:
         pdf2djvu -o output.djvu locked_pdf_example.pdf

    output.djvu - output file in djvu format
    locked_pdf_example.pdf - input file (name of the pdf file with ban on printing)

Output.djvu has a lot of advantages: it is usually smaller and you can print it!
To view djvu files you will need WinDjVu.


Copy music from iPod to PC

I'll give iPod 0 points in this case because it's not easy to get your music back from your iPod.

It's not a secret that all the music files on iPod are in the hidden directory \iPod_Control\Music\.
To see hidden files in Windows XP:
1. On the Tools menu in Windows Explorer, click Folder Options.
2. Click the View tab.
3. Under Hidden files and folders, click Show hidden files and folders.
Note: To access Windows Explorer, click Start, point to All Programs, and then click Windows Explorer.
To see hidden files in Windows 7:
1. Open Folder Options by clicking the Start button Picture of the Start button, clicking Control Panel, clicking Appearance and Personalization, and then clicking Folder Options.
2. Click the View tab.
3. Under Advanced settings, click Show hidden files and folders, and then click OK.
Copy all files/folders from \iPod_Control\Music\ to a folder on your pc.
But our adventure does not end here: the files have wrong names.
Download Tag Scanner and rename the files using a mask. E.g.: %artist% - %title%
Program interface is intuitive.

But the mp3 files may not contain ID3-tags(optional information). In this case you should switch to the "Tag editor" in the program TagScanner and add the information you know yourself. I added authors and titles for only 16 songs(out of 367).

Alternatives:
  • Practice in programming and write a little script. For example, using id3lib.
  • Use iTunes.

OpenGL, C++ and GLUT using CodeBlocks and MinGW

Original can be found at LevelByLevel.com: OpenGL, C++ and GLUT using CodeBlocks and MinGW – Updated.

On my old blog, CodieCode, I wrote a tutorial on how to set up an OpenGL, C++ and GLUT environment using the CodeBlocks IDE and MinGW compiler on a Windows XP and Vista machine. This was a popular post which seemed to help quite a few people. However time moves on, software updates and operating systems change. I’ve decided to update this tutorial with Windows 7 (though this should still work fine on XP and Vista) and the latest version of CodeBlocks and MinGW. Hope it helps

I would like to add that if you’re serious about learning OpenGL, I think it’s a must that you own “The Red Book” (OpenGL Programming Guide by Dave Shreiner). You can buy it from Amazon (with the link on the left) or wherever you normally buy your coding books. Either way it’s a fantastic resource to have and it’s helped me countless times in the past.

———

If you’re interested in coding in OpenGL and C++, a great way to start is by using GLUT. GLUT takes care of a lot of the difficulties in setting up an OpenGL project and lets you get started on your project quick and easily. In this tutorial I will guide you through installing and setting up the software you’ll need (CodeBlocks, MinGW and GLUT).
Before you can start you’re going to need a few things:

Windows – I’ve updated the steps below to run on Windows 7, Windows XP and Vista, If you manage to get this working on other operating systems, let me know

OpenGL – I’m not going to go into how to install OpenGL in this tutorial as most people will be using Windows XP or later and OpenGL comes ready in these operating systems.

GLUT – To download the GLUT files you’ll need click here and download ‘glut.zip’.

IDE (Integrated Development Environment) – While it’s possible to use an editor (such as Notepad++) and makefiles. I find the easiest and most efficient way to code is using a good IDE (be careful there’s some not-so-good IDE’s out there). The best that I’ve come across is CodeBlocks (I’m not a fan of using Visual Studio for OpenGL but you can use that too if you wish) and it’s this IDE that we’ll be setting up today.

C++ Compiler – The compiler I’ll be using is MinGW, there are many advantages to using this but I wont go into these here.

So without further ado, lets start:

Sunday, December 26, 2010

Bash Tips for Working Faster With the Shell

"Using !! "This command is used to bring back and automatically execute the last command in history. It is the same as pressing C^P followed by Enter). Here’s an example:

debian$ cat /etc/debian_version
5.0.7
debian$ !!
cat /etc/debian_version
5.0.7

"Using !text

"Replacing ‘text’ with any command will call the last command in the history which starts with ‘text’. Example:"

Original story:
10 Bash Tips for Working Faster With the Shell (Part 1 of 2)
In addition:

Thursday, December 23, 2010

Really clear...


Do you love him?

It is a very old story that goes from 1994...
But many people come to understand only now...

http://charter97.org/en/news/2010/4/7/27925/

If you don't know these people... left to right: Hitler, Lukashenko.