Showing posts from 2012

Adding "Stereo Mixer" to Windows 7 with Conexant sound card

This procedure worked for my laptop (Thinkpad E530) with a Conexant 20671 sound card, but I suspect it will work for other sound cards in the Conexant family.

I was playing with CamStudio to do a video capture of a Flash-based cartoon so that I can put it on the WDTV media player and play it on the big screen in the living room for my kids. The video capture worked brilliantly, but to do a sound capture, I needed to do some hacking.

Apparently, there was this recording device called "Stereo Mixer" that was pretty standard in the Windows XP days. This allowed you to capture whatever was played to the speaker in all its digital glory. Then under pressure from various organizations on the dark side of the force, Microsoft and soundcard makers starting disabling this wonderful feature from Windows Vista onwards.

So after much Googling around, I found out that for most sound cards, the hardware feature is still there, just not enabled on the software side. Unfortunately, to enabl…

Using Google Dashboard to manage your Android device backup

I used to use AppBrain/Fast Web Install to keep track of which apps I have installed on my phone, and to make it easier to reinstall those apps when the phone gets wiped or replaced. But AppBrain had been going down the tubes, and Fast Web Install had always been a hit-and-miss affair.

Android's own "backup to the cloud" system had previously been even more unusable. There isn't a place where you can see what has been backed up. And when you setup a new phone with your Google account, you just have to wait and pray that your favorite apps will be restored to the phone. Typically all the stars have to be aligned just right for this to happen. More often than not, after waiting for an hour or so and nothing happens, you just curse under your breath and proceed to install your favorites apps manually via the Play Store.

But I just looked again recently and was pleasantly surprised that things are much more civilized now. Firstly there is a place now where you can look a…

Sex and its irrationality

I am probably your average heterosexual male specimen. Having gone through a younger period where sex is at the top of my list of priorities, my hormones have calmed down somewhat and now it appears I can finally examine sex with more rationality.

Recently it is beginning to get to me that sex is not something that one can rationalize. It lies outside the realms of rationality. The fact that a heterosexual male gets aroused by the sight of breasts or the vagina is not something one can deconstruct. In fact, there is nothing inherently attractive about these things other than the fact that millions of years of evolution have built their sense of attractiveness into us, without which our species cannot survive. If an alien from another planet were to land on Earth, they will never understand why we find breasts or vagina sexy, much as we can understand how a peahen will find the large and bright tail of a peacock sexy.

And we have discovered for a long time that there is a large variety…

Roomba navigation algorithm

I have been a long time user of the Roomba vacuum robot, starting from version 1 till now. It has made a big difference to my life, and I enthusiastically recommend it to all my friends.

One thing that stands Roomba apart from other vacuum robot is its navigation algorithm. There is no high-level mapping involved. Instead it uses localized decision making, much like how insects forage for food:

Our robot computes its algorithm 67 times every second, constantly stitching together information about its environment and recomputing its path. When it starts you’ll notice a spiral pattern, it’ll spiral out over a larger and larger area until it hits an object. When it finds an object, it will follow along the edge of that object for a period of time, and then it will start cris-crossing, trying to figure out the largest distance it can go without hitting another object, and that’s helping it figure out how large the space is, but if it goes for too long a period of time without hitting a wal…

Shipping times from Chinese gadget sites

I like buying cheap novelty items from Chinese gadget sites. I have bought hundreds of items from various sites so far, and have had a surprisingly good experience with them overall. Incredibly I have never had an item lost thanks to AusPost.

Most items are as described and satisfactory as long as you have done your research and know what to avoid. In general, I try not to buy gadgets involving flash memory chips and batteries, because most times, you are getting inferior stuff. Lower tech items are generally OK eg. toys, phone/tablet accessories, houseware etc.

The sites I have used so far are DealExtreme, DinoDirect, Lightake and Focalprice. I am eying a few others like TinyDeal and TMart. The only problem with buying from these sites is the long shipping times. I am using this post to keep track of the delivery times of various purchases to Melbourne (Australia):

DinoDirect: Printer Ink Refill
Ordered: 9 Sep
Shipped: 13 Sep
Received: 26 Sep
Time taken:  18 days

DealExtreme: Novelty C…

Yield comparison on toner cartridges/refills

Following my initial encounter with the starter toner cartridge on the Brother Hl-2132 laser printer, I have been experimenting with different toner cartridges/refills and noting the cost/yield with each method.

I bought an OEM high yield toner cartridge for $32 (excludes shipping) that claims a yield of 2600 pages. That only gave me 870 pages of actual output at about 30% coverage. The toner is also a little too light for my liking.

Then I bought a toner refill set for $47. All-in-all, I got about 600g worth of toner, even an accessory kit to convert the starter cartridge to high-yield cartridge (which I have not tried yet, but it looks easy enough). After viewing a few YouTube tutorials about the process, I set about putting 100g of toner into the empty toner cartridge.

It was surprisingly easy, much easier than filling up ink cartridges. The cap on the OEM cartridge was a snap to pop off and replace, and to my surprise, the cartridge worked flawlessly after I refilled the toner. Th…

Volume normalization of MP3 audio track in AVI video files

For AVI video files with MP3 audio tracks, the best way to normalize its volume without recompression involves using FFMpeg and MP3Gain:

> ffmpeg -i input.avi -vn -acodec copy -y audio.mp3
> ffmpeg -i input.avi" -an -vcodec copy -y video.avi
> mp3gain /r audio.mp3
> ffmpeg -i audio.mp3 -i video.avi -acodec copy -vcodec copy -y output.avi

In fact, AACGain in the previous post could substitute for MP3Gain as well.

So the process basically involves extracting the audio and video tracks separately from the original video file, normalizing the audio track using MP3Gain, then muxing the audio (normalized) and video tracks back again.

Since everything is command-line driven, it will be quite straightforward to create a batch/script file that performs all 4 steps in sequence.

Volume normalization of audio track in MP4 video files

I am currently looking at how to "normalize" the volume of various video files without recompression, and documenting my findings here.

For MP4 video files, an easy solution appears to be AACGain, a command line utility that handles AAC audio. Simply run:

aacgain /r *.mp4

and all MP4 video files will be normalized. The process is entirely reversible (using the /u command), and involves no recompression at all.

Brother HL-2132 - Lousy Yield on the Starter Toner Cartridge and How to Work Around it

I bought a Brother HL-2132 mono laser printer from Offceworks recently. Like almost all printers these days, it came with a "starter" toner cartridge that promises 700 pages of print. Well, guess what? The "Replace toner" LED came on after printing only 199 pages! How do I know? More on that later.

A quick search found a number of proposed solutions on the Web, ranging from taping the optical window to resetting the flag gear on the toner cartridge. Well, the starter cartridge I got came with neither of these mechanisms. Seems like Brother has read all these solutions and decided to lock down their starter cartridges even further!

What finally worked for me was to factory reset the printer. This can be done by the following steps:

1. Open the front cover and remove the toner cartridge. Leave the front cover open!

2. Turn the printer off.

3. Press and hold the "Go" button while turning the printer on. All LEDs will light up. Release the "Go" butt…

Life's a Bitch

When we are little, we master our physical self. Witness the toddler who can't seem to stop smearing his sleeves with food.

When we grow older, we master our emotional self. Witness the young adult who goes in and out of relationships. Witness the husband and wife who quarrels over little things every day.

When we are old, most of us (hopefully) would have discovered our true "self". We have achieved mastery of our inner nature.

Then it is time for us to leave the world.

Ain't life a bitch?

Booting to DOS from a USB memory stick

Now that the floppy disk is ancient history and optical media is not far away, it seems we still have to boot to DOS from time-to-time to perform certain tasks, whether it is to flash a BIOS, or perform some hardware diagnostics. The preferred way of doing it these days is via a USB memory stick, and the easiest way to prepare your USB memory stick to boot to DOS is via a freeware tool called Rufus.

With Rufus, a few clicks is all you need to prepare your USB memory stick to boot to DOS. It comes with two DOSes embedded: MS-DOS and FreeDOS. No extra files are needed. After you are done preparing the stick, you can simply copy the extra application files you need over via Windows Explorer, whether it is to flash the BIOS or to diagnose that network card. It is pretty straightforward.

In addition, Rufus also lets you prepare the USB memory stick to boot to supported ISO images, including Parted Magic, Ultimate Boot CD, Windows 7 Setup etc., even Windows XP Setup (but I haven't teste…

Using Google Docs to monitor your website

There are many different ways to monitor your website. You can run a program (eg. Integrio Uptime Scout) locally on your own machine, you can use a web service (eg. FreeSiteStatus), and now you can summon the might of the entire Google infrastructure to tackle this task (via Google Docs) for free.

The whole thing is surprisingly easy to setup. You first make a copy of this spreadsheet. Then within your own copy of the spreadsheet, change the URL to point to the website you wish to monitor and the email address to be notified for uptime and downtime.

Then in the Google Docs menu, select Tools –> Script Editor to bring up the script editor window. Then select Resources –> Current Script’s Triggers. Under the "Run" drop-down menu, select "isMySiteDown". Then under "Events", select "Time-driven", followed by “Minutes timer” and choose how often you want your website to be checked (eg. Every 15 minutes). Now save the trigger and authorize Googl…

Speed comparison of USB 2.0 vs USB 3.0 portable hard drive

Here are the CrystalDiskMark numbers of a USB 2.0 portable drive (Samsung G2 Portable 640GB):

and a USB 3.0 portable drive (Seagate Expansion 750GB):

So although the theoretical bandwidth of the USB 3.0 interface is much higher compared to USB 2.0 (48MB/s vs 480MB/s), it is limited by the throughput of the mechanical hard drive. So at best you are looking at a 2x throughput improvement when moving to USB 3.0 for mechanical disks.

Performance of SATA-to-SATA HDD caddy

The CrystalDiskMark figures for the Cosair CSSD-F80GBP2 running in the slightly reengineeredHDD caddy purchased from DealExtreme is as follows:

Not top-of-the-line, but very good for running virtual machines without being bogged down by the mechanical HDD.

Compared that to the Seagate ST9500420ASG, which is a 7200rpm unit that is probably pushing the performance limits of consumer-grade mechanical HDDs:

The 4K read/write performance of the SSD gives it the extra edge when running multiple VMs on the same machine.

64-bit Windows = 64-bit Java?

Here's one of those counter-intuitive situations that give tech such a bad name and make even an experienced user such as yours truly (with over 20 years of IT involvement) want to throw my arms up in despair. If you are running a 64-bit version of Windows, which version of Java should you install? The 32-bit or 64-bit variety? If you choose 64-bit, you are wrong!

Take a look at this little snippet of information at the official Java website. If you are planning to use Java in your browser (IE, Firefox or Chrome), you'd better install the 32-bit version of Java. The reason is because most browsers are still 32-bit, and they can't access the Java runtime if it is 64-bit. And as far as I know, the 32-bit and 64-bit versions of Java cannot co-exist on the same system, so 32-bit is really the only way to go.

You probably only install the 64-bit version of Java on servers where you need the extra "omph" and in-browser Java support is not required. For the rest of us, …

Thinkpad Edge E530 won't wake up from sleep

I recently purchased a Thinkpad Edge E530 laptop from Lenovo. I think it is great value. I ordered it with the default 2GB RAM and bumped it up to a nice pair of Kingston HyperX 4GB DDR3 RAM, bringing the total up to 8GB. The whole thing costs me only about S$600.

But there was only one problem with the laptop. It wouldn't wake up from sleep or hibernate properly. I have to force power off the machine and boot it up again after sleep. I tried everything. Updating the BIOS. Updating the drivers. Nothing worked. It was frustrating.

After a tedious round of elimination testing, the culprit was finally tracked down to a HDD caddy that I purchased from DealExtreme. This is one of those gadgets that lets you install another harddisk into your space-scarce laptop by using the slot reserved for the optical drive. I use it to add a 120GB SSD drive into the laptop and use it to run certain I/O intensive applications (eg. virtual machines).

As luck would have it, I chanced upon a discussion

Make Google Chrome Portable the system default browser

Making Chrome Portable the system default browser turned out to be more complicated than I'd expected.

I am currently running Windows 7 x64. I first tried Change Default Browser, which seems to be the tool recommended by everybody, but that didn't work for some reason. I tried a few other methods, but none of them worked. Finally I found salvation in this discussion, in the last post made by jonasformolo.

What is needed is to created the chrome.reg file, then fire up the text editor and replace all occurrences of:


with the full path to Chrome Portable on your system (mind the double backslashes!). Finally double-click to enter it into the registry.

However, there is one additional and crucial step to take which is missing in the original instructions. Since you can't easily edit the value in:


with a text editior (unl…

Turning off numerical sorting in Windows Explorer

Windows XP introduces the concept of "numerical sorting", where filenames in Windows Explorer are sorted by evaluating their numerical value instead of the ASCII order. For example, if you have a bunch of files:


they will be sorted as:


because 3 < 2 < 111, get it?

This is very confusing to those of us who expects things to be sorted logically i.e. in ASCII order. Who's the idiot who made this "numerical sort order" default on all Windows after XP?

Anyway, one way to right this wrong is as follows:
Press [Win-R], type "gpedit.msc", then press [Enter] to bring up the Local Group Policy Editor.Select "User Configuration", "Administrative Templates", "Windows Components", and finally "Windows Explorer" in the treeview on the left of the editor.Double-click on "Turn off numerical sorting in Windows Explorer" in the "Setting" pane on the right of the e…

How to install Windows XP from a USB memory stick

Note to self after having to do this a couple of times. If I need to install WinXP from a USB memory stick, the absolute no-brainer way to do it is WinToFlash. The keyword here is no-brainer, because there are tons of tutorials out there that require you to have a rocket science degree and a PhD to follow. Not so for WinToFlash. Run the program, point the source path to the WinXP install files, point the target path to the USB memory stick and click a button. Then go for a cup of coffee and you are done.

Here is how it looks during bootup:

Option 1 is for the first bootup where you get into the text mode setup, configure and format your partition and copy essential files.

Option 2 is for the second bootup where you actually see the Windows XP splash screen and then it starts to configure devices and settings.

I have no affiliation with the company that produces the software. It has a free, ad-supported version if you are a casual user. There is also a personal, professional and busine…

Dealextreme Aggregator

Just stumbled across this website called GadgetzFinder that aggregates products from a couple of DealExtreme-like sites (including DealExtreme itself). For those of you who are not familiar with DealExtreme, it is the granddaddy of Hong Kong-based B2C websites that list all kinds of Made-in-China gadgets and offer free shipping for all purchases. Almost all the items are a fraction of the price of similar items sold in western developed countries. For example, I bought this laptop security cable recently for under $4, where it would have cost me $20 in local stores.

The downside to that cheap price is the long waiting time for the purchased item to arrive. On average I have to wait about 3 weeks for an item, but surprisingly I have received every single item I have purchased so far, and believe me, I have bought a lot of items from DealExtreme and others. Kudos to the global postal system! Also be prepared for some hits and misses in terms of product quality. But the novelty, convenie…

Export to PDF on Firefox

Looked around for a way to export web pages to PDF on Firefix. Most of the existing addons for exporting to PDF involve doing so via a web service, which has security implications, especially when the web page to be exported contains sensitive information.

The Firefox addon that I finally settled on is PDFIt, which as far as I can tell does not involve any web service but does everything on the client web browser. Once installed, the PDFIt menu appears in the "Tools" menu as well as the context menu.

The PDFIt addon not only lets you convert web pages to PDF, it lets you convert to PNG or JPG as well. In addition, you can add a custom title to the output with full control over the font color, size and position. You can also apply a filter (from a total of 16) to the output, including rotation, flipping, sepia, reflection etc.

The only downside I can find is that the output PDF is an image of the web page i.e. even text on the web page are converted to bitmap. If you need tex…