Archive for January, 2009

Batch resizing images with ‘convert’

Posted by Cameron Stokes on January 27, 2009
geek, script / No Comments

I’ve hosted a photo gallery in some form or fashion on my site for about as long as I’ve had my own domain. I first used Gallery and switched to zenphoto sometime last year for reasons I can’t remember now. Having close to 7,000 photos as of this post I was using up a lot of disk space on my host and was close to running out of available space. 7,000 photos isn’t an excessive amount but when each full-size photo is roughly 2 MB, it adds up. I decided the best way to free up space was to resize all of the photos down to the default view size of zenphoto and not allow the full-size versions to be viewed online. A quick test showed this would reduce the average photo down to about 100 KB, a significant reduction.

Having several thousand photos, I needed to find a way to batch resize them all. A quick googling found that convert from the ImageMagick software suite could do exactly what I needed. Using convert, find, and xargs I was able to put together a string of commands that found all of my images and converted them to the size I wanted:

find . -type f | xargs -i convert -size 480x480 {} -resize 480x480 {}

This command finds all regular files under the current working directory and calls convert on each file, resizing the photo, and replacing the original file. Be sure to have a backup of your photos in case you mistype any part of the command. Since convert is replacing your files you won’t be able to undo any files that are processed before you stop the command from running.

convert outputs an error when it encountered video or PNG files but kept processing the JPEGs normally. I found that when I ran this on images that had already been resized, convert wouldn’t resize them again or if it did the new file wasn’t affected as the file sizes before and after were the same.

I freed up over 9 GB on my host by running this. Going forward I’ll just run this on every new album I upload.

Tags: ,

Netflix video quality survey

Posted by Cameron Stokes on January 22, 2009
netflix / No Comments

Netflix recently opened up their Watch Instantly service to external platforms such as the XBOX 360, TiVo, Roku, and others increasing their potential audience of the service to users who don’t want to sit at their computer to watch a movie or TV show.

I’ve since watched over 40 videos through the service on my 360 and after the most recent one I received an email from Netflix asking me to rate picture quality was.  The options are The quality was very good, The quality was acceptable, and The quality was unacceptable.  The survey seems simple and innocent enough but has some interesting implications behind the answers.

Determining your video quality

Determining your video quality

The quality of your video stream is determined when you first start the video and adjusts if the player notices your connection slowing.  A change in quality is fairly seamless on a computer and happens while the video streams.  If it happens, you’ll see the sharpness of the video increase and decrease as the video continues to play.  The player on the 360 has to stop the video and re-buffer the stream when changing the quality.

What makes the survey interesting is that it allows Netflix to conduct an a/b test to find the right blend between quality and cost to stream a video.  Netflix can test different levels of stream quality, say on a scale of 1-5, and then survey their customers to find the ideal quality level right between where their customers are happy and when they start to complain.  If customers complain at level 2 but say level 3 is acceptable then Netflix can stream at level 3 and no worry about the added cost of levels 4 or 5.

Netflix could take this a step further and adjust stream quality per user based on their individual feedback.  If I consistently rate videos streamed at level 4 as acceptable and level 3 as unacceptable yet another user rates level 3 as acceptable and level 2 as unacceptable, they could customize the stream quality for each of us to minimize their cost.  Again, there’s no point in streaming at a higher quality if neither of us notice.

This is the ideal case when it comes to conducting a/b testing and gathering customer feedback.  This allows Netflix to better serve their customers and also reduce their costs.  In the end, I answered the survey that the The quality was acceptable.  I’m not sure what video quality I was receiving but it was perfectly watchable and I never once thought that it didn’t look as good as it should.  At the same time, it was an older movie and not one that would be commended on its special effects or impressive scenery so I didn’t think it deserved a The quality was very good.

You can read more about how Netflix’s streaming technology works in a surprisingly detailed post on their blog titled Encoding for streaming.

Tags:

2009 New Year’s Resolutions

Posted by Cameron Stokes on January 14, 2009
plans / No Comments

Having taken a look back at 2008, it’s time to look forward to 2009.  Here are my New Year’s resolutions:

  • Plan more – Be more proactive and less reactive.
  • Spend less – Reduce money spent on luxury items, particularly eating out.
  • Consume less – Not from an anti-consumerism perspective, but from a resource perspective e.g. paper, plastic, water, fossil fuels, etc.
  • Post more – Post here more frequently.
  • Exercise – At least 4 times a week.
  • Eat better – Reinstate my “don’t finish your plate” diet.
  • Drink more beer – Not in quantity but variety.
  • Brew more beer –  Learn to brew good beer consistently.
  • Read more – Catch up on all the books I bought last year.
  • Adopt a mileAdopt a road near my neighborhood.

I’ll revisit this list throughout the year and certainly at year-end to see how I’ve done.

Tags:

2008 in review

Posted by Cameron Stokes on January 04, 2009
retrospective / 1 Comment

Now that 2008 is over, its time for a look back…

On the professional side of my life:

  • In January, I celebrated my five-year year anniversary at InterContinental Hotels Group (IHG).
  • In February, I was promoted to a management position in the call center software development group at IHG.
  • In March, I traveled to the Philippines to see IHG’s latest reservations software in use at 2 of its call centers. Photos are here, here, here, and here.
  • In August, I traveled to Boston, Massachusetts for the Akamai Customer Conference.
  • In October, my ex-boss returned to IHG to his previous role and is now my boss again.
  • In November, I began working on a project to replace the legacy customer service application used by IHG’s call center agents.

On the personal side of my life:

  • In January, I bought a Pentax K10D DSLR, a purchase I’ve been wanting to make for a couple years now.
  • In March, we threw a party for my cousin who turned 30 years old. Photos are here.
  • In May, my girlfriend, Rhonda, finished her undergraduate degree in aerospace engineering at Georgia Tech and started her first full-time job in the industry. Photos of the graduation ceremony are here.
  • In June, I went to the my 4th Bonnaroo Music Festival. Photos are here.
  • In July, I started this blog.
  • In August, my girlfriend met me in Boston after the Akamai Customer Conference for a much needed vacation. Photos are here, here, here, here, and here.
  • In September, good friends of ours, Rich and Marilyn, had their first baby, Ian. Their website is here.
  • Also in September, a friend and I tried our hand at homebrewing. So far we’ve brewed an English Pale Ale, a Weizenbier, and an Indian Pale Ale. Photos are here, here, here, and here.
  • Later in September, I went to the Rock and Roll Hall of Fame Benefit Concert in Cary, NC. Photos are here.
  • In November, I played in my third Bosnian Open, a golf tournament hosted at Candler Park. Photos are here.

All in all no major life changes this year. Rhonda graduating and the promotion at work are the most significant events to take place. I traveled a fair amount, though never as much as I would have liked and I found 2 new hobbies, photography and homebrewing. Its been a fun year, one that went by way too fast.

I’m looking forward to 2009.

Tags: