Thursday, December 17, 2009

Playing Videos on Android

Here's a quick and dirty way to get video playing on your Android phone from Linux.

These instructions are for Jeff Hamilton's free "Video Player" available on the Android Market.
I copied the mencoder command from here.

First encode the video in a format that the player can understand.

mencoder input.avi -o output.mp4 -vf dsize=480:352:2,scale=-8:-8,harddup -oac faac -faacopts mpeg=4:object=2:raw:br=128 -of lavf -lavfopts format=mp4 -ovc x264 -sws 9 -x264encopts nocabac:level_idc=30:bframes=0:bitrate=512:threads=auto:turbo=1:global_header:threads=auto:subq=5:frameref=6:partitions=all:trellis=1:chroma_me:me=umh

Plug your phone into the computer using the USB cable.

Mount the SD card by pulling down the top bar USB notification and pressing the "USB connected/Mount" button.

Mount the drive in Linux.

Copy the output.mp4 to the SD drive mounted in linux.

Unmount the drive in the phone by pulling down the top bar USB notification and pressing the "Turn of USB Storage" button.

Run the Video Player app on the phone.

Select your video, and enjoy.

Monday, October 26, 2009

Comparing Webcams

I've been looking for a webcam for Skyping and it turns out there is a wide range of webcams out there. This post outlines my experiences with a few different webcams. I hope it comes in handy for people choosing webcams so they don't have to buy a bunch of cameras. I tried a Philips SIC4750/27, a Logitech Webcam C500, and a Logitech Webcam Pro 9000.

To cut to the chase, here's a screenshot with the C500 on the left, and the Pro 9000 on the right. It's a bit overexposed, but smart software will adjust the exposure.

Here's a low-light screenshot with the C500 on the left, and the Pro 9000 on the right.

The Pro 9000 really is better, but it's up to you whether it is worth the extra cost (click to zoom).

To test the cameras I ran luvcview in Linux with out any options, so the cameras are outputting 640x480 without any fancy sharpening or anything.

The first camera I tried was an old Philips SIC4750/27 that I received from a friend. The Philips is a very old web cam (today it's 2009). It has very poor image quality, and poor low light capabilities. Unfortunately, I couldn't get it to work with luvcview, so I don't have a screenshot to show.

The second camera I tried was a Logitech Webcam C500. It has a glass lens and a 1.3MP sensor and according to the box, it can capture video at 1280x1024. I believe it has a fixed focus lens. This camera costs $40-50. The image quality is decent, but the image is on the blurry side. I tested the cameras in a low light environment. It is night time, and there is a single torch lamp in the corner of the room. The image shows a fair amount of noise in this low light environment. I'm used to nice SLR cameras, so I might be more picky than other people.

The third camera I tried was the Logitech Webcam Pro 9000. This has an autofocusing "Zeis" lens, and a 2MP sensor. This camera costs about $80-100. The Pro 9000 is clearly sharper than the C400, and has less noise in the same low light conditions. However, it is not as good as a $100 digital still camera (that can probably take video).

I'm keeping the Pro 9000; it is a bit more expensive than the C500, but the image sharpness and noise level is much better.

Monday, February 23, 2009

State of the Economy?

A couple days ago, on my way to lab I passed a parked car that looked funny; its right side was high up in the air. When I got closer, I saw that it had no wheels left and its right side was being held up by a yellow floor jack. It looked like someone had stolen the wheels and abandoned the jack. The car was a fairly nice sports sedan; it may have had a set of fancy wheels...

Regardless, I remember seeing stuff like that during the 1980s. I also used to see many cars abandoned at the side of the highways and people parked at the side of the road with car trouble. A few years ago, I mentioned to my parents that I never see abandoned cars any more who responded "yeah, because everyone has money now". I had figured automobiles were getting more reliable, but it's true that there were fewer old cars on the road as well.

A few weeks ago, I made a road trip to NYC and I saw at least 3 cars stopped at the side of the road. I noticed it, but I didn't think much of it. Now, I wonder it is a sign of the times.

Saturday, February 21, 2009

Tyvek Tire Boot

I have a set of cyclo-cross tires I use on my bike during the Boston winters, but last year I found a 9mm gash in the tread of one of them (all the way down to the tube). Luckily, it was at the end of the winter and these tires didn't have many nubs left, so I put the tires in the corner thinking I'd replace them the following winter. Well, when winter rolled around I threw them back on the bike but I booted the gash with two layers of Tyvek from a mail envelope.

After a month, I replaced the Tyvek with a fresh two-layer boot. One layer of the original boot had pretty much worn through. They don't sweep the roads during the winter, so there's a ton of sand and gravel on the road which worked it's way into the gash to abrade the Tyvek.

Today, after another month of commuting, I switched back to normal commuting tires without any flats due to the gash. I only ride about 5mi per day, but the tires lasted another two months; nice!

Sunday, February 01, 2009

Kleenex, Napkins, and Paper Towels

I used to use a lot of Kleenex to blow my nose and then one day a few weeks ago, I figured I would stop using Kleenex. Instead, I decided to get some handkerchiefs to wipe my nose. I mentioned this to my wife, and she told me we had some in the closet somewhere, so she dug them out and now I use them instead of disposable tissues! I use one for a few days until I use up all the clean surface of the cloth and then I wash them. I like the handkerchiefs; they work well at containing the snot and wash with the rest of the laundry (I have 4 handkerchiefs, so they last between washings). In summary, I think they're great, and I think they'll cut down on my use of paper tissues. The next step is to use cloth napkins instead of paper napkins.

In a related note, I floss my teeth in the bathroom at work after lunch so I stand by the sink for a couple minutes each day. Recently, I've been observing the bathroom users. Thankfully, almost everyone washes their hands before they leave (but maybe it's just because I'm standing there), but I also noticed that most people who use paper towels use 3 paper towels to dry their hands! I am positive that one does not need 3 paper towels to dry his hands; one is sufficient, and I usually just wipe the clean water on my pants. They take 3 paper towels and most of the towel surface is dry when they throw it into the trash (Keynesian economics at its best). I wonder if the same people who take 3 paper towels would do the same if they had to buy the paper towels themselves. I suspect this is just another example of waste caused by hidden costs. If every bathroom user is wasting 2 paper towels each time they use the bathroom, imagine the pile of wasted towels at the end of the day! Rainbow Light NutriStart Multivitamin Dietary Supplement Powder Packets for Children 6 Months to 4 Years 30-Count Boxes (Pack of 2)