Silent Archimedes

Archive for the ‘Computers’ Category

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 »

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 »