Convert .wma to .wav and .mp3 on Linux
This is a little trick on how to convert music files in Windows Media Audio (WMA) format into wave file (WAV) and MPEG Layer-3 (MP3) format.
In order to use this technique, these prerequisites are needed to be install.
mplayer ,win32 codecs and lame
Then follows these step:
1. Use Mplayer to convert wma to wav
mplayer -ao pcm:file-name-in-wav.wav file-name-in-wma.wma
2. Use Lame to convert wav to mp3
lame file-name-in-wav file-name-in-mp3.mp3
There are many Lame properties: use lame --help for more detail.
OpenCV on Linux again with G++
After a long way try to develop C program with OpenCV library on Ubuntu Linux using NetBeans and Eclispe IDE, no succeed at all. There are always some problems occurs and the project cannot move on further so everything has to be move back onto Windows to be developed. But now all these thing can be developed in Linux by using traditional GNU C Compiler (GCC) that most of Linux users know it very well. This is the complete procedure from the beginning(install) till the end(compile-build).
Part A. Install OpenCV 2.0.0
1. Install prerequisites
Enter this line into Linux Terminal:
$sudo apt-get install libavformat-dev libgtk2.0-dev pkg-config cmake libswscale-dev bzip2;
All these packages are the prerequisites for compiling and running OpenCV.
2.Get OpenCV 2.0.0 sourcecode
Obtains the sourcecode of OpenCV by visit Sourceforge or by enter this line to Terminal:
$wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.0/OpenCV-2.0.0.tar.bz2
3. Extract and Compile OpenCV 2.0.0
3.1 Extract by enter
$tar xvjf OpenCV-2.0.0.tar.bz2
3.2 Enter the directory
$ cd OpenCV-2.0.0/
3.3 Create a output directory
$mkdir release; cd release
3.4 COMPILE The OpenCV
This is the important one! For more information please see in Ref1 below.
$cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON ..
3.5 Install OpenCV
$make
$sudo make install
3.6 Exporting Part
$export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
$sudo ldconfig
Part B Compile application with GCC using G++
This part is amazingly easy as eating an ice-cream!
All we have to do is to get into your project directory in Terminal, then use this command to compile your program!
$g++ `pkg-config opencv --cflags --libs` ProgramName.c -o ProgramName
That’s it! And we can execute our program by using command:
$./ProgramName
That’s all we need to do to use OpenCV 2.0.0 on Linux system.
Part C Program Example
Example code of OpenCV application can be found on Ref1. below.
This is the screenshot of my running program.

Reference: http://www.linuxconfig.org/introduction-to-computer-vision-with-opencv-on-linux
TUSO is twitter friendly!
Because there are so many TUSO member using Twitter lately, so now twitter is become one of the most important communication channels between our group. Actually we use it in place of telephone, chat room, sms, and even mouth! , for both serious data and “Krean”-type data. Yesterday, one of my friends (@leelaS) ask me to bring a tag “twitter friendly” and attaches it at TUSO’s door. After spend an hour (which almost not enough for use already!), I got this thing:

I think this should be look nice enough isn’t it? It’s very pretty especially the blue violinist on the right of the tag ^^. I’m personally like this “violinist” very much, so cute! May be I will introduce another twitbird musicians next time (then end up with the twit-orchestra).
Bigger picture for blue twitbird violinist:
Its face SURELY looks innocent! If it’s a true TUSO bird, no wondering what it’s think when its face looks like this
Internet 40th Anniversary
In this day, 29 October 2009 is the day we can say ” Happy Birthday” to the Internet, the world-wide computer network that many people will be die if they lost it. This day in past 40 years ago, 29 October 1969, is the day the first 2 letters be transmitted from a computer (at University of California Los Angeles) to another computer (at Stanford University), so we says this day to be the very first day of the Internet, which at that time named Apanert.
From day to day, 40 years are passed. nowadays Internet is just like the entire world, the entire knowledge of human being, and most of all, Internet not belongs to anyone, INTERNET IS OUR.
History of Internet
“TUSO Piano Festival” Live audio record
This is what everyone waiting for! The recorded audio from “TUSO Piano Festival”, the latest concert of Thammasat University Symphony Orchestra, AVAILABLE FOR DOWNLOAD NOW. This record contains 13 pieces from 9 piano solos, and TUSO String Orchestra.
TUSO Piano Festival
Song list:
First Half
1. Alkan: Les regrets de la nonette by อรวี ชินโนรส DOWNLOAD
2. Paul Harvey: Rumba Toccata by ฟ้าใส ปุญปัน DOWNLOAD
3. Chopin: Ballade No.1 in G minor by พชร พรประกฤต DOWNOAD
4. Beethoven: Allegretto in C minor by นันฐภรณ์ สุวรรณโพธิพระ DOWNLOAD
5. Durand: Valse No.1 in E flat, Op. 83 by นราธิป ชำนาญศรี DOWNLOAD
6. Beethoven: 2nd movement from Piano Sonata No.8 in C minor by วีรวิทย์ รัตนศรีวิจิตร DOWNLOAD
7. Joaquin Turina: Vals romantico by ธัญชนก นาคมณี DOWNLOAD
8. Beethoven: 3rd movement from Piano Sonata No. 3 in C major by ธัญรดา มุ่งธัญญา DOWNLOAD
9. Chopin: Waltz No.7 Op.64 in C sharp minor by วิชชุ โสภานะ DOWNLOAD
Second Half
10. Bach: Brandenburg Concerto No. 3 by TUSO String Orchestra DOWNLOAD
11. Tchaikovsky: Elegy (in the memory of I.V. Samarin) by TUSO String Orchestra DOWNLOAD
12. Arcangelo Corelli: Concerto Grosso No. 4 by TUSO String Orchestra DOWNLOAD
13. Carl Jenkin: Paladio by TUSO String Orchestra DOWNLOAD
And also wait for Live video record available soon!
p.s. Anyone please create a CD cover for this album (^ __ ^)
TUSO Piano Festival
Yesterday I just performed in TUSO Piano Festival as a part of TU string orchestra (For those who don’t known, I am also an amateur Double Bassist). This is a first semester concert of Thammasat University Symphony Orchestra (TUSO for short), and this is the very first time of piano concert, 9 pieces from 9 piano soloist. This concert divided into 2 parts, the Piano solo part and string orchestra part.
1st Half, Piano Solo
This half is the piece performed by TUSO’s pianist group, which is the main objective for this concert to make an opportunity for these people to perform to public. Actually there are so many pieces so I even can’t remember all of them (I don’t have the program note right now). But I can says that this is the one of the best and highest quality concert ever! Most of the pieces played are very popular and impressive, the soloists also did their best to bring his/her pieces to the audience with real taste of the pieces.I also can says that I really like some pieces so I decided to practice them myself in case that I have my free time. Pathetique Sonata of Beethoven and Rumba Toccata by N’Fah are an example of those pieces.


2nd half, String Orchestra
In the 2nd half is the pieces performed by TUSO String Orchestra, which I also played in this part. There are 4 pieces totally for this part, which are Bach’s Brandenburg Concerto No.3-1, Tchaikovsky’s Elegy, Colleri’s Concerto Grosso, and Jenkin’s Paladio. For me, the Brandenbung concerto is the HARDEST piece I ever played in my life as double bassist. Actually the reason that I can played this thing is because I tried to play this thing more than a year ago, from that until now, I can’t says I can played this piece perfectly. Yesterday concert is just an biggest successful survival of mine. Someone says that I can really graduate from Music college if I can play this piece successfully. Moreover, practicing this song together with many Quintet performance already make me to see doctor for healing my hand. Elegy is the piece that make me got an headache due to their very hard figure in the piece. Fortunately, the group of low string can manage to pass through this easier than I thought. The last piece is Paladio, the song which wake up most of audience and make concert got very big ending.


Audience Feedback
As I heard from my friends, my juniors, and the others member of TUSO, the sound of this concert is very good. Actually everyone say that this is one of the best concert ever heard, how surprise! Even though some of them have headache for consuming too much Chopin as a first classical concert. I have to say that I, myself, also really happy and proud in this concert. Thank you for everyone who join us, all my EC juniors, Pao and Pong, N’Ja and Haru, and, most of all, our TUSO!
Convert .bin/.cue to .iso in Linux
If you ever encountered situation like this:
- You want some program so you find it in google
- You found that program, how fortunate, their are disk image available for download
- You download that program, full of hope and happy
- Download is completed. You open it, and SHOCK! That image is in .bin and .cue format!
- You found no way to mount, to burn, or just to read that disk image.
- You tried to use google to find the way. Google tell you that .bin/.cue can be opened by either Nero, Deamon Tool, or Alcohol every popular disk mounter support this file type.
- Then what! You are using Linux, those programs are not for you for sure! (Or even Windows Vista and Windows 7 user, you also encounters some problems with those programs for sure!)
- At last, you can just say good bye to that image and you downloaded program. No hope , so sad.
But wait! if you are Linux user (especially Ubuntu, Mint or whatever in this family), their are a way for you!!
Just like a light for heaven, sending by God, Just like a drop of water in the great desert. Just like a …. thing that Windows cannot DO!
This is the program called bchunk (BinChunker) .
This very little, Terminal base program can convert those troublesome .bin/.cue files into a very simple, useful, lovely .iso format! If you interested in using this program, this is the way to do:
1. Open Terminal
2. Install BinChunker by this commade:
sudo aptitude install bchunk
3. After install complete, just using it!
BinChunker syntax
bchunk [-v] [-p] [-r] [-w] [-s] {image.bin} {image.cue} {basename}
Available options:
-v – Makes binchunker print some more unnecessary messages, which should not be of interest for anyone.
-w – Makes binchunker write audio tracks in WAV format.
-s – Makes binchunker swap byte order in the samples of audio tracks.
-p – Makes binchunker go into PSX mode and truncate MODE2/2352 tracks to 2336 bytes at offset 0 instead of normal 2048 bytes at offset 24.
-r – Makes binchunker output MODE2/2352 tracks in raw format, from offset 0 for 2352 bytes. Good for MPEG/VCD.
Example:
bchunk IMAGE.bin IMAGE.cue IMAGE.iso
From now on, their are no need to care about that .bin/.cue anymore. Just use .iso to mount, to burn, and to install downloaded program that you’re waiting for a long time!
credit: http://www.ubuntugeek.com/how-to-convert-bincue-files-to-iso-in-ubuntu.html
Spaz Twitter client and Adobe AIR
Linux Mint and Twitter Client
This post is a result from finding some Twitter client that can be run on my Linux Mint 7.
After some minutes of finding, I found some popular programs such as
gTwitter, gWibber, Twittux and so on.
I can guarantee to you that in case of you want some eye candy, these program is totally eye pollutions for you.
Then I found some better looking clients, that are twhirl and Spaz.
Twhirl itself is quite well known, so I choose Spaz instead. However, both program required Adobe AIR for running.
What is Adobe AIR
Adobe AIR is a platform to develop an applications with rich of effect and great user interface. In order to use program developed in Adobe AIR platform, user need to install Adobe AIR client and Installer. By following this step:
1. Download the file from here:
http://airdownload.adobe.com/air/lin/download/1.5/AdobeAIRInstaller.bin
The name of the file is AdobeAIRInstaller.bin
2. Save the file in the Home folder (Places > Home Folder)
3. Open the Terminal
4. Run this command:
chmod +x AdobeAIRInstaller.bin
5. Now run this command:
sudo ./AdobeAIRInstaller.bin
6. Follows installer instruction until finish.
After done, we can install Adobe AIR applications by double-click on its installer.
credit: http://www.sizlopedia.com/2008/04/06/how-to-install-adobe-air-on-ubuntu/
Spaz installation
After Adobe AIR is installed, you can just go to
http://funkatron.com/spaz/#desktop-download
then download the Spaz from website.
Then just double-click on the installation file and done.

OpenCV with Netbeans IDE
From previous blog, I already mention what the OpenCV is and how to install OpenCV on Linux. For those who have not install OpenCV, following this link: http://rorasa.wordpress.com/2009/08/19/opencv-with-linux/
But since the writing C++ language without any help from GUI is such a very bitter taste, many developer tends to use GUI for theirs projects. In OpenCV wiki (http://opencv.willowgarage.com/wiki/Welcome) mentions how to setting up OpenCV with MS Visual Studio, and Eclipse. But after I tried for a few hours, I found that Netbeans IDE is much easier to use. This is the step to setting up OpenCV with Netbeans.
1. Download latest OpenCV here
2. Untar and Install Netbeans. Goto Terminal->to folder
sudo sh .sh
Then follow the install instructions.
3. Open Netbeans then do the following:
Select Tools -> Options -> C/C++ -> Code Assistance -> add Include Directories
(For me, /usr/local/include/opencv)
4. Create new project, then:
Right click on Project Name -> Properties ->Build -> C++ Compiler -> Include Directories
Include Directories : /usr/local/include/opencv
5. Right click on Project Name -> Properties -> Build -> linker ->
Include Directories : /usr/local/include/opencv
Additional Options : -I/usr/local/include/opencv -L/usr/local/lib -lcxcore -lcv -lhighgui -lcvaux -lml
Then writing program and compile!!
OpenCV with Linux
OpenCV (Open-source Computer Vision) is a open-source C library for handling with image processing. Actually most of nowadays computer image applications is based on this OpenCV. The OpenCV can do the following tasks: Basic image processing (all Photoshop can do), very easy Real-time and hardware interfacing, GUI library, and so on.
In order to use OpenCV with Linux, there are quite complicate task. this is the step for setting up my own Linux Mint for using OpenCV.
1. install compiler, open the Terminal and type this command:
sudo apt-get install build-essential
2. install related dependencies:
sudo apt-get install libgtk2.0-dev libavcodec-dev libavformat-dev libjpeg62-dev libtiff4-dev
3. Download OpenCV source files from http://sourceforge.net/project/showfiles.php?group_id=22870&package_id=16948, untar and place it wherever you want OpenCV to be at.
4. Type command as follows:
./configure --prefix=/opt/opencv --enable-apps --enable-shared --with-ffmpeg --with-gnu-ld --with-x --without-quicktime CXXFLAGS=-fno-strict-aliasing
make
sudo make install
sudo nano /etc/ld.so.conf.d/opencv.conf
Then add this /usr/local/lib into a file.
sudo ldconfig -v
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
That’s all. Now we can test this OpenCV by using examples in /opencv/samples/c
by: sudo sh build_all.sh
./edge (or any others examples)

credited: http://dircweb.king.ac.uk/reason/opencv_cvs.php
http://tspp.exteen.com/20090816/beginning-opencv-in-linux
