media comments edit

Canon VIXIA HF200 HD Flash Memory
CamcorderJenn and I picked up a Canon VIXIA HF200 HD Flash Memory Camcorder a bit ago since we didn’t have anything that’d capture decent video and we wanted something a little more than those little Flip Video deals that have become so popular.

I’ve been messing around with it and so far I like it a lot. It’s very light, it’s easy to work with, and the video that comes out of it is great - we’ve taken some test videos and played them back from the camcorder directly to the TV and it’s beautiful.

That said, I don’t want to be one of those people who leaves their videos on the camcorder and just buys new flash memory when it’s filled up. That’s dumb. I gotta get the videos off the camera onto the computer.

To that end, I looked at what the camcorder records. It uses the AVCHD format (.mts files), which, from what I can tell, is basically “the Blu-ray file format.” (Yes, I know that’s a technical generality and it’s not complete and correct. Just go with me here.) Honestly, I’ve lost track of all the different file formats for things and what to do with them all. I have my music in Apple Lossless (AAC) and MPEG-4 (also AAC, but not)… I have movies in full VIDEO_TS format (which is sort of MPEG-2 in disguise)… I’ve got some videos that are DivX, some WMV… and I just want to play the damn things.

So I started some research. Turns out I’m much less “in the know” about how these things work than I thought. Apparently some formats are just “containers” like Matroska (.mkv files) and they might contain video of any format (like H.264) with accompanying audio of any format (like AAC). ARGH.

When this happens, I start playing dumb. I mean, average people buy these things and somehow get them to work, right? They don’t go do all the research I do to figure out what’s what. That means - time to install the software that comes with the camera.

I did that - installed the bundled software - and it’s absolute garbage. The UI is confusing. The manual that comes with the software doesn’t actually get installed with the software so you have to go digging on the installer discs to find it. The manual says the software will work with certain disc formats and file types, but it’s wrong. In the end, the only thing it does reasonably is copy the original .mts file from the camera… but don’t move that file once it’s copied over or the bundled software will lose track of it and corrupt your video library. Absolute crap.

I went back to research because there have to be real, decent, non-bundled apps that will do… something… with these .mts files. Turns out I have a few options (including Nero 9 and Cyberlink PowerProducer). I’m also trying to figure out how to maybe get these things to play natively on… some device or another. Playstation 3 will play the files, but Windows Home Server (using old Windows Media Connect) won’t share .mts files because it doesn’t know them, so I have to sneaker-net them over to the PS3 on a USB stick. I can install a codec or three and get them playing in Windows Media Player, but I have to manually do a File -> Open on them because the extension (.mts) isn’t registered to anything. (Yes, I can fix that, but should I?) How do I get Windows Media Center in my other rooms streaming these videos? Is the Cyberlink HD264 pack the answer?

After going through all of this, I returned to my original question - how do average people get these things to work? I decided that they don’t. The difference between the average person fighting with this and me, though, is that the average person probably doesn’t care that it doesn’t work, or gives up in frustration and stops trying. I know enough to be dangerous and I care that it doesn’t work. That’s a dangerous, stressful combination. Maybe I need to just stop caring.

But if I don’t care, who will? And, ultimately, what will become of my videos?

I’m not sure what made me think of this story, but it made me snicker to myself so I thought I’d tell it.

Back in October of last year, Jenn and I went to Disneyland. One of the days we were there, we were wandering around in California Adventure checking out the Pixar attractions and we found a really neat cut-out of Wall-E that you could take your picture with. As we headed over to see it, one of the myriad photographers in the park approached.

“Would you like to get your picture with-“

“Wall-E?” I interrupted.

“-Frollo?” the photographer finished, and motioned to a character standing a few feet away.

I had to think fast on this one. To be honest, I didn’t know who Frollo was, but since the actor was standing not too far off, I kind of felt bad. I mean, regardless of who Frollo is, it didn’t look like he was as popular as a Jack Sparrow, for example. And how totally offensive would it be that the tourists would rather have their picture taken with a plywood cut-out than with you, the actual costumed character, live in the park?

“AND Frollo, of course,” I replied.

We headed over to the Wall-E cut-out, got our pictures there, and then over to Frollo, and got some additional photos. As we walked away, I had to ask Jenn, since we hadn’t consulted on this. “Who the fuck is Frollo?”

“I have absolutely no clue,” she said. We peeked behind us to get a second look at the character. Nope, no idea whatsoever. Didn’t even look remotely familiar.

It was only later in the day when we finally looked him up online. Apparently Frollo is the bad guy from The Hunchback of Notre Dame. Can’t say I’ve seen that one, even to this day.

It makes me wonder if that’s sort of punishment or something for the character actors there. “Piss us off, and we’ll suit you up as a partly-known character from one of the less popular films! That’ll show you!” Or are there actually people who hit the park and look for Frollo?

I might actually make it a game for next time we go to Disneyland - “Find Frollo.”

More interesting is the relative scarcity of Alice (from Wonderland). She’s my favorite, and I searched the park high and low for her, only to find her and the Mad Hatter making an exit for the break area. Frollo, more accessible than Alice? WTF?

net comments edit

Typemock Isolator 5.3.1 was released today, and with it the ability to mock base class constructors using a syntax like this:

Isolate.Fake.Instance<Derived>(Members.CallOriginal, ConstructorWillBe.Called, BaseConstructorWillBe.Ignored);

That’s pretty cool. But something I uncovered in working through a complex test scenario (and getting a little help from good old Typemock Support) is that you can mock a constructor N-levels deep using a slightly different syntax. The caveat is that it only works on types that have generic type parameters.

Let’s say you have a three-level-deep class hierarchy like this:

public class Level1<T>
{
  public Level1()
  {
    throw new NotSupportedException();
  }
}

public class Level2<T> : Level1<T>
{
  public bool Level2WasCalled { get; set; }
  public Level2()
  {
    this.Level2WasCalled = true;
  }
}

public class Level3<T> : Level2<T>
{
  public bool Level3WasCalled { get; set; }
  public Level3()
  {
    this.Level3WasCalled = true;
  }
}

You want to instantiate a Level3<T> object, and you want to run the Level2<T> constructor, but the Level1<T> constructor throws an exception so you want to stop running the real constructors there. It’s a little more complex setup, but you can do this:

[Test]
[Isolated]
public void SkipLevel1Constructor()
{
  var fakeBase = Isolate.Fake.Instance<Level1<string>>();
  Isolate.Swap.AllInstances<Level1<string>>().With(fakeBase);
  var fake = Isolate.Fake.Instance<Level3<string>>(Members.CallOriginal);
  Assert.IsTrue(fake.Level2WasCalled);
  Assert.IsTrue(fake.Level3WasCalled);
}

This test will pass. Now, granted, if you’re doing something more fancy, the Isolate.Swap.AllInstances call may have some unintended side effects since it’ll also intercept new instances of Level2<T> and so forth, but if you’re doing something reasonably simple where the Isolate.Swap.AllInstances is OK, here’s one way to skip an n-level deep constructor.

UPDATE: It appears you can use Isolate.Swap.NextInstance instead of Isolate.Swap.AllInstances, and that’s actually recommended so you have fewer potential side effects. No need to mock all instances if you don’t have to.

All of this, of course, gets the “Works On My Box” seal of approval, and the standard “if it totally hoses you or doesn’t work for you, sooooooorrrryyyyy” style disclaimer. Also, while I found this during sorting an issue out with Typemock Support, I can’t say they “officially support” doing what I’m telling you about here. It just happens to work. Whether it’s functioning as designed or whether we’re inadvertently exploiting something in the product that will be patched up later is yet to be seen.