Silent Archimedes

Archive for March, 2009

Netflix Watch Instantly Silverlight workaround for Windows XP

Posted by silentarchimedes on March 29, 2009

Netflix Watch Instantly Silverlight 2.0 workaround for Windows XP

I might have a pseudo-workaround for this problem… At least it worked for me.

Like many people, I have been having choppy streaming video using Silverlight on Netflix’s Watch Instantly on my Windows XP computer. The problem appears to be that Silverlight does not buffer ahead enough. The next problem is that Silverlight dynamically determines the play speed (500, 1000, 1500 Kbs) and the accompanying buffer rate (500, 1000, 1500 Kbs) so the user has very little control over it. This is the sequence I noticed every time:

1. Start Netflix player

2. Video is smooth for the first 10 sec or so.

3. Video begins to become choppy (frame dropping) and unwatchable.

And it never recovers.

DIAGNOSTICS

So SIlverlight comes with a hidden diagnostic menu. On my XP, press Shift-Alt at the same time and click on the video with the left mouse button. A Diagnostic menu shows up under the mouse pointer (Figure 1).

Press Shift-Alt and click on video

Figure 1: Press Shift-Alt and click on video

Click on the A/V menu item. What I noticed was this:

1. Start Netflix player.

2. Press Shift-Alt and click on the video with mouse (Figure 1).

3. Bring up A/V menu item. I noticed the Playing video bitrate was 500, and the Buffering video bitrate was 1500 (Figure 2). Sounds good right? Well…

Figure 2: Initial play/buffer rates when player starts

Figure 2: Initial play rate is 500 and buffer rate is 1500 when player starts

3. After about 10 sec, the play rate started to dynamically increase from 500 to 1000 to 1500. I noticed that the instant the play rate went up to 1000 and then 1500, the video became choppy. I also noticed the buffering bitrate dropped to 1000. Now the play rate was faster than the buffer bitrate! At the bottom of the A/V Stats, the Dropped Frames (/sec) had also increased to 15-20+ (Figure 3).

Figure 3: Video becomes choppy. Play rate:1500, buffer rate:1000

Figure 3: Video becomes choppy. Play rate:1500, buffer rate:1000

SOLUTION

So the key here is how to decrease the play rate or increase the buffer rate. This worked for me:

1. Press Shift-Alt and click on the video with mouse.

2. Click on Stream Manager and check the Manual Selection box. Then check the 500 bitrate box (Figure 4).

Figure 4: Open up the Stream Manager Menu

Figure 4: Open up the Stream Manager Menu

3. Now bring up the A/V menu item again. You will notice that the playrate is still 1500, but the buffering rate is now 500.

4. The video will remain choppy until Silverlight recognizes this major discrepancy. For me, the playing bitrate eventually dropped to 500 to coincide with the buffer rate. This could take a few minutes. What worked really well for me was moving the playbar back to the beginning. When they are both even at 500, the video was no longer choppy and was watchable for the rest of the video. When it works, the Dropped Frames (/sec) never goes above 2.

Figure 5: Smooth video. Rates both at 500.

Figure 5: Smooth video. Rates both at 500.

If this didn’t work, look at the important notes below:

Important note 1: I noticed that clicking on the Manual Selection box and 500  doesn’t always update the rates right away. The A/V Stats still showed play rate at 1500 and buffer rate at 500. I would go to the Stream Manager, and although the Manual box is still checked, the bitrate had reverted back to 1500. Try moving the play bar around… maybe to the beginning of the video. For me, this would instantly switch both rates to 500.

Important note 2: If it still doesn’t work, try clicking again on the 500 box. Get out of the menu. Check the A/V Stats, and the play rate should eventually drop to 1000. When it happens go back to the Stream Manager, and the 500 bitrate box should now be checked and set. When it works, the Current at the top should say 500, and the play rate and buffer rate in A/V Stats should both say 500.

If the playrate is not automatically dropping to 500 after a while, try moving the play bar to the beginning of the video. Or restart your browser and try again.

Important note 3: If both rates say 500, but the video remains choppy and then the play rate goes back up to 1000, it is because the video is so far behind, it it is having a hard time catching up. So what I do is either move the play bar ahead or to the beginning.  I usually do that anyways,so I can watch the video from the beginning!

Important note 4: You will have to redo the whole syncing process if you watch another video, so it’s a crude workaround. Also, sometimes I noticed if I watched another video in a sequence (like a sitcom) by clicking on the arrows at the bottom; although both rates were at 500, the dropped frames/sec was still somewhat high (~10). One work around for this is to close and open your browser again. When it works, the Dropped Frames (/sec) should never go above 2 or 3.

This method seems to work for me every time and playing at the 500 bitrate was very watchable. It gets faster too once you get the process down.

The computer I tried this on is a pretty old computer:

Dell Precision Workstation 420 MT, 512RAM, Pentium IIIE, 1000Mhz
Microsoft Windows XP Professional with SP3
Matrox Graphics Millennium G400 MAX AGP
Dell 17″ monitor at 1280×1024

My Internet connection is Fast Ethernet. And it worked with both IE6 and Firefox 3.0.8. It did seem that this method was more reliable for IE than Firefox though.

Let me know if this method worked for you or if it didn’t. If you also have other experiences regarding this method or suggestions, please post a comment so others can learn from it.

Good luck!

Posted in Computers, Technology, Windows | Tagged: , , , , , , , , , , | 60 Comments »

Book Review: The Walmart Effect

Posted by silentarchimedes on March 20, 2009

The Walmart Effect

How the World’s Most Powerful Company Really Works – and How It’s Transforming the American Economy

Author: Charles Fishman

walmart-effectWHY I READ THIS BOOK

I do not like Walmart, yet I shop there. It is messy and dreary, yet I plan a trip to Walmart every few weeks. It is expansive, yet crowded and claustrophobic. I feel like I’ve spent just as much time there looking for either a product or an employee to assist me as I have actually shopping. I try to minimize my time there but the trip always ends up over an hour and I’m beat by the time I leave. Why do I keep going back there? To make things worse, all these stories about Walmart’s secrecy and unethical business practices keep popping up. Yet that has not stopped me from shopping there. The fact that Walmart has become ubiquitous with middle-class (and poorer) shopping has led most people to subconsciously accept it. So what is going on with Walmart?

THE AUTHOR: CHARLES FISHMAN

It must take someone with guts to take on the Walmart behemoth; especially after you read the book and realize that for most of its  history, Walmart has considered any type of publicity and media a threat to its business model. But Fishman has been known as an investigative reporter that attempts to bring to light the workings of institutions or groups that have been relatively unknown. According to the book’s website, Fishman has spent the past 20 years investigating organizations such as NASA and Walmart. He was also the first reporter to be allowed inside a Tupperware factory, and first in 30 years inside the nation’s only bomb factory.

SHORT SUMMARY

walmart_lowpricesIn an attempt to understand the inner workings of Walmart Inc. and its effects on job creation, global economy, work environments, suppliers, competitors, communities and other issues, Fishman talks with everyone that might be affected by Walmart but Walmart itself. Due to the secrecy of Walmart and the lack of transparency in its statistics, Fishman is forced to rely specifically on his investigative acumen. What he finds out is that Walmart is the ultimate definition of a dichotomy, a contradiction that baffles all levels of society; from the individual to the community to the country to the global economy. On one hand, Walmart is unpretentious, is no frills, provides hundreds of thousands of jobs, provides the cheapest prices for consumers and has always stuck to its core values. However, on the other hand, it has a dictatorial grip on its suppliers and competitors, kills almost as many jobs as it creates, indirectly destroys local natural ecosystems, promotes cheap labor and unfair labor practices, has no transparency or guilt and chips away at the core values of the free market system. It pushes the limits of good and bad capitalism and is the poster child of globalization.

REVIEW

This book really does a good job of trying to understand the Walmart effect. However, although Fishman tries to stay neutral on the positives and negatives of the issue, it is more common that his investigations lead to a negative perception of the company. It’s hard not to have a more negative view after reading the book. There is only one major positive about Walmart, it provides the lowest prices for many of the things families need. However, this is a huge positive and is shown even more during this recession. Walmart’s growth in same store sales have been increasing for the past 22 months while Target’s have fallen the past eight months (Source: Walmart vs. Target: No Contest in the Recession, Time Online). It’s not even a contest and shows that this positive is all that consumers need to turn a blind eye on all the other issues. And for sure, there are a lot of other issues, which Fishman does a great job of detailing and bringing out.

The book flows really well, from the beginning to the end… although the last chapter is the required “so after all this investigative work, what should we do or care about Walmart to make this world a better place?” The first chapter is pretty much a summary of Walmart’s influence on society. The rest of the book goes into detail about each issue by discussing academic studies on the company dating back to the mid-1980s, successful and failed interviews with former supplier executives from big and small companies, the impact of Walmart on things we take for granted now (like deodorants that sell without the useless boxes they used to come in) and talking to opponents of Walmart, from environmental groups to factory workers of their suppliers.

The most damaging against Walmart has to be that a lot of the investigation leads to the same conclusion, Walmart is a big cheapskate. Which was fine when it was a small company, but now that it is the biggest in the world, this sense of being cheap at all costs seems somewhat unfair. Unfair to other companies and unfair to the ecosystems and poor countries’ lax labor laws it depends on to produce such massive quantities of products. Fishman tries hard to not take a position, but the writing is in the book. There are no positives about Walmart that can be concluded from the Chilean Atlantic salmon farms, or the countless companies mentioned in the book that went belly-up after becoming a supplier of Walmart. There’s just too many examples to list. And it’s quite obvious that even the large companies that work with Walmart are under the control of Walmart.

There are some interesting stories in the book. The one I like best is about the company that decided supplying to Walmart was detrimental to its future existence, so it decided to end the relationship. However, Fishman argues that companies that don’t supply to Walmart are highly affected by them anyways because of the devastatingly low prices. Another interesting tidbit was that Fishman believes Walmart may hit a ceiling at some point and there could be, what he calls, Walmart saturation and exhaustion.

VERDICT

This is a very insightful book. Although there are only a few unbiased and encompassing studies on the Walmart effect, Fishman does a good job of investigating and doing his own research. This book sums up my initial motivation for reading  about the world’s largets non-oil company. Walmart is such a dichotomy it’s really difficult to come to a conclusion on whether it is good for society or bad. It has changed so much of everything that it is beyond anyone’s control. Many of the numerous statistics in the book are downright unbelievable. The book is a quick read, very interesting to read and will make you think twice about globalization and also your personal moral responsibilities to it.

The book was written in 2006 and only talks about the perceptions and actions of Walmart in the context of 2005. The major views of Walmart has not changed since then. However, the signs of Walmart exhaustion have gone out the window now that we are in a recession and most people have turned even more to Walmart for cheap prices. Walmart also has done more to improve the negative perception against it. Just a few days ago Walmart announced that they would be awarding $2 billion dollars to their employees. If Walmart decides to also target the higher end products, like Target, this might create a whole slew of new problems.

walmart_smileywalmart_smileywalmart_smileywalmart_smileywalmart_smileywalmart_smileywalmart_smileywalmart_smileywalmart_smileywalmart_smiley_gray

Rating: 9 out of 10 Walmart smileys


Posted in Books, Economics, Ethics, Reviews | Tagged: , , , , , , , , , , , , , | 4 Comments »

Psycho cats – Why cats are just in a world of their own

Posted by silentarchimedes on March 15, 2009

This video that my friend Aniello linked to me is one of the funniest videos of why cats are just plain crazy:

If you are on Facebook, there’s a better unedited version at:

http://www.facebook.com/video/video.php?v=1105166182043&ref=nf

And just for good measure, do you like cats or dogs better?

Posted in Observations, Poll | Tagged: , , , , , | 1 Comment »

Can Alex Rodriguez jump like Cody Ransom? 60in vertical landing jump!

Posted by silentarchimedes on March 14, 2009

I must say this short YouTube video of Alex Rodriguez’s replacement while he’s out with an injury, Cody Ransom is pretty impressive. The guy is 32 years old this year and still has major ups. He IS 6’2″ so he might get thru as a small point guard in the NBA, but still… They should make the vertical landing jump a measurement in addition to the traditional vertical jump in the combines, not that it correlates well in a real football game.

Posted in Opinion | Tagged: , , , , , , , | Leave a Comment »

Problem: Maximum number of files in NTFS in Ubuntu

Posted by silentarchimedes on March 12, 2009

So I do a lot of image processing in my work, and I ran into a problem today that I still haven’t found a logical answer to:

On my Ubuntu 8.10 computer, I have a 1TB internal harddrive /dev/sdc1 mounted in NTFS format. After the initial format, My max volume size is stated as 931.51GiB. On this drive, I have lots of folders, and many of them have thousands (1K to 6K) of small images, in formats of jpg, png, ppm. Today, one of my scripts crapped out when it tried to create a new image and returned “Operation not supported.”

Even when I used touch or a simple vi created file, I could not create any more files. The current disk usage on the harddrive is:

Contents: 704,324 items, totalling 826.3 GB

And Ubuntu tells me I still have 102.5 GiB of space left. So I started thinking if I’ve reached my inodes limit because of the number of files. However, when I do a ‘df -i‘, I am no where near the limit:

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sdc1            108159004  706236 107452768    1% /media/sdc1

When I look online, all the documentation and search says that the maximum number of files in NTFS is 2^32-1. The only other thing is the master file table (MFT) and how it might increase it’s size if more files get created beyond those specified in MFT. However, I haven’t been able to confirm this.

Anybody have an explanation for this? It’s really bugging me that it’s happening and I can’t figure it out.

Posted in Computers, Linux, Technology | Tagged: , , , , , , , , , , , | 3 Comments »

DBP, mogrify, convert – How to batch crop, resize, rename, format convert images in Ubuntu

Posted by silentarchimedes on March 11, 2009

DBP – David’s Batch Processor for GIMP

If you want to do this in the context of GIMP, download and install DBP (David’s Batch Processor). It will show up as an option under the Filters menu list. Just click ‘Batch Process’ and a GUI will pop up. You simple add files to the input list and you can do various basic image processing operations on it. They include any combinations of rotate, blur, colorize, resize, crop, sharpen, rename and image format conversion.

One drawback to DBP is that it does not allow you to add a directory or directories instead of a list of individual images. For some people that need to batch process directories of images, you will have to either manually do a directory one at a time or temporarily put all your images into one directory. This is a bit of a pain.

mogrify or convert – ImageMagick tools for Linux

If you are more of a command line guy or if you do need to batch process directories of images, mogrify or convert is the way to go. The man page of mogrify states, ‘mogrify – resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more. Mogrify overwrites the original image file, whereas, convert(1) writes to  a  different image file.’

You can simply put a bunch of mogrify commands into a script file and let it run in the background. An example mogrify command to resize all your jpegs to 256×256 looks like:

  mogrify -resize 256x256 *.jpg

An example convert command to resize all your jpegs to 256x256 gifs with a prefix of images looks like:

  convert -size 256x256 *.jpg images%0d.gif

Look  at the ImageMagick’s mogrify page or convert page for more info. Speaking of, if you don’t have ImageMagick installed on your Ubuntu system, you should. 🙂

What if you want to command line convert images and put them in another directory, but keep the same names as the original images?

So at first it seemed like convert was the way to go since mogrify is supposedly only for modifying the original images in place. However, convert‘s way of doing it requires a bit of linux scripting. There is a easier in mogrify. It  has an option -path that allows you to specify an output image path.

In the following command, I want to crop out a 320×480 subimage beginning at location (160,0) in all the ppms in the tempim directory. I want the processed images to have the same names as the originals but to put them in the tempim2 directory:

mogrify -path tempim2 -format png -size 640×480 -extract 320×480+160+0 tempim/*.ppm

Posted in Computers, Linux, Technology | Tagged: , , , , , , , , , , , , , , , | 7 Comments »