Scott Hanselman

FIX: Missing Thumbnails for Videos (WMV, AVI, MPG) in Windows Explorer

April 18, 2007 Comment on this post [9] Posted in Tools
Sponsored By

Some time last months all the Thumbnails in Explorer disappeared for me. It might have coincided with me installing VLC Player on Vista. Either way, it sucked because I had family photos with thumbnails next to videos taken with the same camera with no thumbnails. It's no fun to lose functionality.

While poking around in the Registry trying to fix this issue, I noticed that Thumbnails for AVI files worked, while no others did. The only difference with that extension was this registry key:

[HKEY_CLASSES_ROOT\.avi\ShellEx\
{BB2E617C-0920-11D1-9A0B-00C04FC2D6C1}]
@="{c5a40261-cd64-4ccf-84cb-c394da41d590}"

So, I made a registry file with this entry for each extension I wanted thumbnails for. Merged it into the registry and, lo and behold, I have thumbnails again. The file is below.

As an aside, while I was trying to fix this, I also picked up a codec pack called the CCCP (Combined Community Codec Pack) and noticed while running through its settings that it had an option to "fix perceived types." I wish I'd known this last week when I fixed THAT problem with missing Media Center Thumbnails.

Switching over to the CCCP also had the added benefit of letting me watch my MP4 encoded PSP (Playstation Portable) files in Windows Media Player, and added Thumbnails in Explorer for MP4s as well via their settings dialog. Once I got MP4 working I exported those settings and appended to them to this file.

Also, by the way, did you know that the new location of the Explorer Thumbnail Cache is down here?

C:\Users\Scott\AppData\Local\Microsoft\Windows\Explorer>dir
Volume in drive C is 70 GIGS SYSTEM
Volume Serial Number is 98A2-64B2

Directory of C:\Users\Scott\AppData\Local\Microsoft\Windows\Explorer

04/18/2007 10:29 PM <DIR> .
04/18/2007 10:29 PM <DIR> ..
04/18/2007 10:29 PM <DIR> ThumbCacheToDelete
04/18/2007 10:29 PM 24 thumbcache_1024.db
04/18/2007 10:29 PM 1,048,576 thumbcache_256.db
04/18/2007 10:29 PM 24 thumbcache_32.db
04/18/2007 10:29 PM 1,048,576 thumbcache_96.db
04/18/2007 10:29 PM 4,064 thumbcache_idx.db
04/18/2007 10:29 PM 24 thumbcache_sr.db
6 File(s) 2,101,288 bytes
3 Dir(s) 21,871,742,976 bytes free

Crazy new stuff this Vista, eh?

No warranty or support, express or implied. YMMV. Backup your Registry before you do this and please don't come to me if your world is destroyed. You have been warned.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Network Connections: Using Verizon Broadband Access Wireless Internet without VZAccess Manager

April 18, 2007 Comment on this post [4] Posted in Musings | Tools
Sponsored By

I was talking to Juval Löwy today about wireless broadband access. We both use Verizon's VZAccess Rev0 network for Nationwide Wireless Broadband. I get decent results and have blogged about the service before, last year.

UPDATE: Some folks have reported that the Username and Password aren't needed. Some have reported it IS needed. Your Mileage May Vary.

One thing that irritates me and Juval is the VZAccess Manager application that Verizon provides to access the service. Fortunately , Juval figured out how to connect to Verizon's Wireless Broadband using Network Connections in Vista bypassing the VZAccess Manager. As Juval doesn't have a blog, I'm posting his instructions here with his blessing.

First, you need to manually create a new connection.

  1. Open VZAccess Manager, go to Help, about.
  2. Copy the phone number:

  1. In the Windows Control Panel, bring up the Network and Sharing Center.
  2. Click Set up a Connection or Network.

 

  1. Click Set up a dial-up connection

  1. Select the modem:

 

  1. Enter #777 for the number. For user name, plug your number from Step 2  plus "@vzw3com.com." For password use "vzw" (all lower case). Be sure to name the connection.

  1. Connect and run. Select public location for network type you are all set.

You can now use the connection without VZA.

Thanks Juval!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Automating Adding iTunes Album Art to MP3 ID3 tags from the Command Line in C#

April 17, 2007 Comment on this post [6] Posted in Podcast | Programming | Tools
Sponsored By

It's been bugging me that the album art for my podcast doesn't appear in Windows Media Player, iTunes, or in iPods.

I assumed, incorrectly, that this was an iTunes meta-tagging problem, but then I realized that this was an MP3 problem, not an AAC or WMA problem, although both formats support adding art to the file.

The ID3 format is pretty extensive. You can put a great deal of meta-information into an MP3. The Attached picture or APIC "Frame" in ID lets you embed in PNGs or JPGs, along with their respective mime/types. 

I googled around over lunch and couldn't find a simple, free, command-line program that would let me easily add pictures to not only the existing MP3s for our show on the server-side, but also could be integrated into our existing audio file production workflow.

I ended up finding this great little library from 2004 called the tagnetlib project source was offered for free from the Nancy Street Blog. I converted it to .NET 2.0.

Now, note that the tagnetlib project is currently deprecated in lieu of the NTag product that Greg Keogh started in 2005 and released in May of 2006. The NTag project is much more interesting and appears to be well thought-out. He intends to support WMA and OGG and turn the project info a "Meta Tag Tagging" project that would support all popular audio formats.

I used the Tagnetlib because it was quick, incredibly easy, and I only had my lunch hour to do this. However, he's pretty clear that Tagnetlib is, again, totally deprecated and unsupported. Perhaps one day I'll get to spend more time with the NTag library. For now, my little hack is used like this:

embedid3.exe file.mp3 file.jpg [optionally "mime/type", default is "image/jpeg"]

Disclaimer: This app does one thing. It adds images to MP3 files that don't have them. It has no error handling or checking and it doesn't care about you or your MP3 collection. Don't even think about running it over your collection or using it for any purpose. It's useful for one thing. It's useful to me. Your Mileage WILL Vary. You have been warned.

Do make sure you checkout NTag and what Greg's working on over there. It's really pretty fun code to read.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Expose and Vista-specific Alt-Tab Task Switchers

April 17, 2007 Comment on this post [11] Posted in Reviews | Tools
Sponsored By

I love the Exposé feature of Mac OSX. On Windows XP I ran TopDesk, an Exposé clone for a few years. Now that I'm on Vista and I find Flip3D to be a virtually useless way to switch tasks, I'm looking for a better task switcher again. I hope TopDesk jumps back into the party with new DWM support for Vista.

I still like TaskSwitchXP, but it's needed less with Vista's default ALT-TAB behavior.

When Vista runs Aero, the new Desktop Composition Engine, the possibilities for new Task Switchers becomes virtually unlimited. Early entries into the fray include:

  • My Exposé (Source Available!)- Released a CTP last November, and he's meaning to get a new one out, but has been busy. It's a LOT like Mac Exposé but it's got a LOT of screen-flickering and doesn't work well when your secondary monitor is taller (has coordinates ABOVE) than the primary monitor. Still, it's working good considering it was written BEFORE Vista RTM'ed
  • Switcher (Switcher Blog)- I was initially disappointed by this Task Switcher because its default mode is a strange "dock all running thumbnails to the top of the screen" place. And, there's no initial animation or transition. Then, I RTFM'ed, and noticed that you can switch between "dock" mode and "Exposé" mode using Page Down. Doh! After that, the choice is ssticky and you have the best Exposé in Vista I've seen. Brilliant and recommended. I hope he keeps developing it. I'm definitely using this one all day long.

With these two apps to choose from, and more, no doubt, on the way, the micro-market of Task Switching Software for Vista is looking pretty sweet.

If you're not sure if your TaskSwitcher is really using the Vista Aero DesktopComposition Engine, do a little test. Find a web page with a video or animated graphic or flash. Do a task switch and while in that "task switching mode" see if the animation is running inside the thumbnail. If it is, and running smoothly, that TaskSwitcher is using the DWM rather than static screenshots.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

XmlSerializing a Generic List<>

April 17, 2007 Comment on this post [10] Posted in Programming | XmlSerializer
Sponsored By

There's lots of good techniques out there for using the XmlSerializer to serialize a Generic List<> type. You can implement IXmlSerializable and some other trickiness.

Here's the simplest possible thing I could do to make it work while working on a hobby project over lunch today with a friend.

UPDATE: I'm a dork and didn't see the forest for the trees on this one. I don't need a parallel array at all. That's my old 1.1 brain creeping in. Thanks to folks in the comments. It works fine just like this. I'm not sure why I thought it didn't work when I tried it before. Thanks folks!

namespace Poo
{
    public class Foo
    {
        public Foo() { FooReadings = new List(); }

        [XmlArray("FooReadings")] //Even this attribute isn't really needed if you accept the default.
public List<FooReading> FooReadings; } public class FooReading { public FooReading() { } public FooReading(DateTime date, decimal thing2) { this.Thing2 = thing2; this.Date = date; } public decimal Thing2; public DateTime Date; } }

The technique below is useful for other things, but not in this instance.

namespace Poo
{
    public class Foo
    {
        public Foo() { FooReadings = new List(); }

        [XmlIgnore]
        public List<FooReading> FooReadings;

        [XmlArray("FooReadings")]
        public FooReading[] ArrayFooReadings
        {
            get { return FooReadings.ToArray(); }
            set { FooReadings = new List(value); }
        }
    }

    public class FooReading
    {
        public FooReading() { }

        public FooReading(DateTime date, decimal thing2)
        {
            this.Thing2 = thing2;
            this.Date = date;
        }

        public decimal Thing2;
        public DateTime Date;
    }
}

The "Real List<>" is ignored and the "fake" one is presented as an Array in the Getters/Setter. Not pretty, to be sure.

What better ways are there that you prefer?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.