Entries Tagged 'Useful Links' ↓

Setting Netflix / Silverlight bandwidth usage

The netflix watch on demand video player uses Microsoft Silverlight. Silverlight has an “adaptive playback” mode which attempts to choose one of multiple bandwidths for your video (and switch on the fly if your internet connection has more ore less bandwidth over time).

To see what it is currently using, press the Control, Alt, Shift and D keys all at the same time.
CTRL-SHIFT-ALT-D gives diagnostic information on-screen.

If you would like to force netflix to use a specific bandwidth (typical sizes are 500, 1000, and 1500 KBps, or 50, 100, 150 kilo-bytes a second), press the Alt, Control, Shift and S key at the same time.

CTRL-SHIFT-ALT-S allows you to manually force silverlight/netflix player to use a specific bandwidth for playback.

This can be useful if you want the absolute best quality (and are willing to pause the movie every so often to let it buffer), or if you are willing to use a lower quality than your full network connection supports so that some extra bandwidth is available for other users or applications.

NOTE: I was unable to get the key-combos above to work in full-screen mode. I had to have the netflix player in a browser window for them to work. In addition, sometimes I had to click within the siliverlight window (for example, by pressing the play/pause button) before the key combination would work.

Global search and replace in multiple files

Searching and replacing a bit of text in a lot of files is a very common problem. Lots of tools exist to get it done. On unix systems, awk is one favorite, and I found this webpage with a simple search and replace example.
Unfortunately, I wanted to search for \prob and replace it with %\prob. The difficulty is that the backslash character is “special”, so you have to escape it with other backslashes.

Here is my updated example command to run in each directory:

awk ‘{gsub(/\\prob/,”%\\prob”, $0); print > FILENAME}’ *.tex

It does a global substitution for the regex \\prob with string %\prob in the
whole input file ($0) for every file that ends in .tex

Passat Clutch Problem – Bleeding the Clutch on a Manual

Friday morning I got into the family car (1998 VW Passat with manual transmission) and, depressing the clutch, started the engine. The car rocked backwards (I normally leave the gearshift in reverse when parked, plus the parking break was on), the engine died, and the clutch petal stayed on the floor (not good!). The clutch petal had lost all resistance, so I couldn't shift the car. Looking under the hood, I found that a hose leading from the brake fluid reservoir had popped off and sprayed brake fluid around. I connected it back to the reservoir, and started the engine in Neutral, but the clutch didn't magically start working. (Sigh…I like easy solutions.) Twenty Dollar bike to the rescue!

Continue reading →

Free wireless at the Gamboa rainforest resort at the panama canal (Panama)

I was given the following 3 day access code for the wireless internet at the Gamboa Rain forest resort (at the panama canal):

username: 3day136

password: 6856670

However, the internet was turned on for everybody when I was there, so I didn't need to use it.  If you find yourself at the Gamboa resort, feel free to use this code if needed, but please post a comment telling me that it's been used up so I can delete the post.

Compressive Sampling: Beating the Nyquist Limit for certain signals

Compressive Sampling is a new field of sensing theory that sidesteps the traditional Nyquist sampling limit. The Nyquist limit is an information theory result that says to perfectly capture a signal which is bandwidth limited at a certain frequency, X, you must take 2 times X samples per second.  So for example, if you want to perfectly detect a 20Hz sine wave, you must take 40 samples a second. To perfectly represent audio that humans can hear (typically understood to be sounds in the 20-20,000Hz range) we must use 40,000 samples per second (40kHz). CD audio uses 44.1kHz, and professional audio systems typically sample at 48kHz a second.  [Note that the number of samples per second has nothing to do with the quantization, or accuracy of the samples, so audio that is sampled at 20 bits per sample has more information (and less noise) than audio sampled at 16 bits per sample.] Continue reading →

Phillips Webcam with Linux

I bought three Phillips SPC  900 NC webcams because they claim to support up to 90fps and I have had good luck using linux with the PWC drivers in the past.  Plugged into a generic Ubuntu 7.10 install, I found that 640×480 resolution was automatic, with 15fps. 320×240 worked at 30fps. (I tried 160×120 resolution, but wasn't able to get a speed faster than 26fps with that, so I'm doubtful of the 90fps claim from Phillips, at least with the stock Ubuntu drivers.)

This useful website looks to provide nice OpenCV support for this camera. 

I have also archived the relevant files on my site, in case the above link goes down. 

Webcam to OpenCV package

Webcam software manual

Freeing my V3xx phone from Cingular

After getting ATT/Cingular to take the subsidy lock off my phone, I decided to flash it with the generic International Motorola firmware. The advantages:

  • The Motorola firmware is not "branded" and gets rid of all of the "Shop Cingular" links, menu items, etc.
  • The quadband firmware claims to support all 4 GSM bands (instead of the 3 that the Cingular firmware supports).

The downsides:

  • The Motorola firmware is not "branded", and I had to re-configure any Cingular specific settings that I like, such as the MediaNet connectivity settings and Cingular Video bookmarks.
  • The Cingular version of the phone has a slightly different button layout than the Motorola generic version (the Clear key is swapped with the Cingular Video key) and I had to remap those keys back to match the custom key layout.
  • Because I flashed the phone, all of my previous SEEM edits and java fixes were lost, so I had to repeat them.

As daunting as the downside list is, I have to say that getting rid of all of the Cingular branding was like a breath of fresh air. You really don't notice how bad the branding was until it's gone. Then you just notice all of the extra room in the menus, bookmark lists, etc.

Continue reading →

Moving encrypted partitions from Mandriva to Ubuntu

Red Hat based distros such as Mandriva use loop-aes and losetup that have some default options that are different from a debian based distribution such as Ubuntu which use dm-crypt. To mount my "old-school" encrypted volumes I had to use the loopaes script from Gary Larson. (I also had to install the hashalot package that the script needed.)

D-link DWL-G122 with WPA under Linux

The D-Link DWL-G122 USB 802.11g (revision B1) wifi adaptor works great for open or WEP encrypted networks and is supported by Ubuntu out of the box. Unfortunately, the open source driver doesn't support WPA2 (and only supports WPA via non-standard iwpriv settings, and even then, the support is flaky).

I was able to get it to connect to a WPA network once, following Jermey's instructions. But the network connection was not reliable (as in, I never got it to connect again).

To make it work with the standard wpa_supplicant package, I had to break down and use ndiswrapper to wrap the windows XP drivers. (I also had to blacklist the default rt2570 kernel module). Hopefully the Open Source rt2x00 kernel module will start to support this device (and others based on this chipset) in the future for WPA/WPA2 security.

Even after I used the ndiswrapper, it would only connect to a WPA Personal / TKIP access point. (I could not get it to work with the AES or AES+TKIP settings on WPA or to work with WPA2 at all.)

To make the ubuntu system auto-load wpa_supplicant on boot, Continue reading →

Screen Scraping Amazon Album Art for MythTV

mythtv icon

I wanted to get Album Art for all of my (newly ripped) songs on my MythTV box. 

Thierry has a nice perl script which finds album art on Amazon and automatically downloads it, but unfortunately for me the music plugin for MythTV has upgraded their database schema and the script no longer worked.  I am using the trunk SVN code, so it's a bit more up-to-date than the latest packaged release, but this means that scripts designed for the packaged versions may not work. (This specific script had a problem finding the correct directory to store the album art, so all the album art was stored in the root directory, overwriting itself with each album.)

Luckily, I know just enough SQL and Perl to be dangerous, so I whipped up a few changes to his code that fixed my problem (after exploring the new database format). The updated script is here if anybody needs it.

UPDATE: I also added features that allow you to run the script multiple times (if an albumart.jpg file already exists, it will skip that album) and improved the searching (if "album by artist" is not found, it will try searching by "album" name only).

Amazon Album Art Scraper Script