Archive for November, 2009

* convert ogg files to mp3

Posted on November 28th, 2009 by jitu. Filed under Linux.



Unfortunatley and despite of its advantages the majority of handheld devices do not support ogg format so far. Music collections have to be converted into mp3 before copying them to the handheld device. However many devices read out the ID3 tag in the mp3 files to sort them internally into a library. Most conversion methods and tools convert the ogg file into mp3 format flawlessly, but they do not transfer the tag information that is eventually stored in the ogg file.

The little script (copyIDOgg2MP3.pl) attached to this post, helps in that case. It also contains an shell script example (ogg2mp3.sh), how a whole folder can be processed in a single shot.

Usage/Installation

There is no installation as such. Untar the downloaded archive and execute copyIDOgg2MP3.pl OggFile MP3File
Both audio files must exist. So far only ID3 tags in the version 1.1 are supported.

License

The script is published under GPLv3 and comes without any warranty.

Download

copyIDOgg2MP3.tar.bz2

.



* iisc notebook drive

Posted on November 23rd, 2009 by jitu. Filed under IISc.


There are many activities and clubs in and around IISc in which students can be involved. However one of my most memorable experience was with an activity called Notebook Drive (NBD). Once in a year volunteers collect money from the students to support government schools in and around Bangalore. The support is not in money but in useful items such as notebooks (hence the name), pens, utilities for drawing etc, given to the pupils of those schools. This year the donation caused a surplus in the cash register of NBD. So members of the NBD thought about a useful way to spend and to support the local schools again.

In the end they had the idea to give prices to those students who are overall the best in his or her year. A good student was not only the best in reading, writing, maths, etc, but in e.g. discipline and behavior. This time Amrish, a member of NBD asked me, if I would like to join.

So we left IISc on bikes and loaded backpacks full of prices at 8AM on Saturday, 14th November 2009 (which was also celebrated as Children’s Day). We went to 3 different schools, all of different sizes and grades. It was that time when I learned that all the money in the world is nothing and worthless compared to the happiness expressed in the face of a child.

Useful links:

It might be interesting to see, how children learn in government schools. There are quite a few differences compared to the schools in Germany. Starting from the missing tables and chairs. All kids sit on the floor. A separate class room for each and every class seems to be beyond luxury.

.



* slow usb pen drive in linux

Posted on November 16th, 2009 by jitu. Filed under Linux.


I experienced slow USB mass storage devices such as USB pen drives, attached to a USB2.0 port. The writing speed usually did not cross 600KB/sec. To solve the problem I am mounting the pen drive with the async option set.

The manual of mount in NetBSD says about async:

All I/O to the file system should be done asynchronously. In the event of a crash, it is impossible for the system to verify the integrity of data on a file system mounted with this option. You should only use this option if you have an application-specific data recovery mechanism, or are willing to recreate the file system from scratch.

Since I am using pen drives to move data only e.g. for a presentation, it is no big issue to reformat the pen drive in case of a crash. With async set the writing speed increases to around 8MB/sec. To make the change persistent, add async in your fstab:

/dev/sdb1 /media/usb0 auto noauto,noatime,nodiratime,user,rw,exec,suid,async,uid=1000,gid=1000,umask=0072 0 0

Or, if you use usbmount to mount the pen drives automatically add async to the MOUNTOPTIONS in /etc/usbmount/usbmount.conf

It is always a good idea to sync or to umount the drives before you unplug them.

.