Tom Lachecki

(Tomalak Geret'kal)


PowerPoint and the Windows MCI

Microsoft PowerpointA few months ago a friend came to me with a problem. She is a college lecturer teaching the use of IT programs, including Powerpoint. When compiling a lesson one day she found that she could not persuade Powerpoint to embed a video clip taken on her digital camera. It would play fine when opened in a media player, but not in Powerpoint.

The object pane would be rendered but would simply show a very old-fashioned error message in MS Sans Serif, which read: "Video not available, cannot find vids:mjpeg decompressor".

Clearly a codec problem, right? Wrong. Well, not really anyway.

It turns out that when applications such as Powerpoint embed sounds and movies, they use the MCI built into the Windows API to play them back. This makes sense, as you don't really want to rely on (potentially) third-party playback software installed on the computer where you plan to run your presentation.

Fancy intelligence, and the archaic tools that don't have it

Windows MediaBut it causes a slight complication.

See, the line between MPEG and Microsoft's 'avi' format have blurred significantly as the media age progresses and we develop ever more sophisticated technologies. Since both formats are just containers for video data, the actual information inside .mpg files and .avi files could be encoded using any number of codecs which have to be installed on the target system. Although modern developments such as DivX and AC3 audio require downloading, there are some common ones which Windows comes with because they've been in common use for over a decade.

There's a convention that certain types of movie data are named .mpg, and others .avi, but in practice the difference is almost negligible. That is, modern media players are capable of handling an .mpg file which contains video data encoded with a codec that would usually be used for files of the .avi type, and vice versa.

Seemingly, this would make things a lot more streamlined and it wouldn't really matter if your video clip were named .avi or .mpg because the end result would be the same, as long as sufficient decompressor information was available within the file to tell the player how to deal with it.

But Microsoft's "Media Control Interface" built into Windows is not a modern media player. It's a set of API functions that has been built into their OS since the Windows 3.x days, and although it's a modular system, no-one really cares about updating the various playback modules to give them fancy modern functionality because in general it's not required. After all, the MCI is used for playback of system sounds and mIRC's /splay command and .. well, that's about it.

Oh, and OLE media objects.

So, Powerpoint is calling the MCI to play back your camera video. The problem being, the MCI is old… very old. It doesn't have the fancy intelligence used by modern players to blur the line between .mpg and .avi. But digital camera manufacturers don't bear this in mind when they produce equipment which outputs video encoded with MJPEG but gives the filenames an .avi extension. The MCI can't handle it, because MJPEG is a part of the MPEG family of decoders, and so it expects this to be found in an .mpg file, not an .avi file.

Hence the error.

El solution

MPEG iconThe good news is that this problem is fairly easily solved.

Due to the aforementioned 'blurring of the line', renaming a typical video file from .avi to .mpeg, as long as it's encoded with a suitably independant codec (for example MJPEG), won't affect playback in typical modern players.

We can use this to our advantage because the MCI wants the file to be .mpg, but no-one else really cares. So we should just give the MCI what it wants and rename the file to give it an .mpg extension, right?

Right!

In this day and age, we can simply rename the video from .avi to .mpg. How cool is that? Apparently even renaming the file to .qt, .mov or .m1v will help. This technique should give a greater success rate with AVI files from digital cameras that create movies.
This method can be attempted if you receive the error "Cannot display this type of sound or movie" or "MMSYSTEM006 There is no driver installed on your system", or if you "insert movie from file" and powerpoint simply ignores you.

Linkage

Thanks to awesomebackgrounds.com for reminding me how to fix this when I decided I felt like writing an article about it.

There's also a well-known multimedia tutorial for if you are still having trouble with this issue which might be caused by a slightly different problem.

Tags:
Permalink | No Comments  
Give Me The Time Of Day

The DHTML / Javascript Calendar in actionIn my work creating a fault logging system for a client wanting to improve their support services, I found the need to present editable date and time fields in an HTML form. Clearly free-text for this function is messy and horrible, so I wanted a pop-up DHTML date/time picker (aka calendar) to do the job for me. The support guy would just click on a little calendar icon next to the input field, then choose a date from a pretty popup.

I'd found a fairly cheap and nasty one which did the job. Although I don't like to name and shame, I will say that I was using a script called "My Date Time Picker" which had been written late in 2003 and which I'd gotten off HotScripts.com.

It worked. It produced horrible HTML and didn't use CSS at all, but it worked. I got half-way through attempting to modify its behaviour slightly to follow the principle of least astonishment by being a little more intuitive, when I realised that it was a nightmare and wondered just what the hell I was doing.

So I uncharacteristically left the script alone and went on a second surf around the web to find an alternative script to save me all the work, vaguely aware that I'd not searched for long the first time.

And what should I find but the answer to any desires any man or woman could ever have had for a DHTML date/time picker?

Enter dynarch

I'd actually run across dynarch's The DHTML / Javascript Calendar before, but seem to recall finding that it was a commercial product. That's probably because the owner signed an agreement to allow Zapatec to offer their own commercial version.

I've yet to determine the improvement shown by the pay-for version, as the open-source script is certainly a work of art. dynarch's script even 'interfaces' to a point with PHP, as it comes with a PHP wrapper which makes calling the date/time picker an absolute breeze.

Right through to the choice of skins (I'm using 'Aqua') the entire thing leaves the web developer end-user with barely any work to do whatsoever. So I'm happy.

Except that I'm starting to inevitably feel a little sorry for the script I dumped. :/

Tags: ,
Permalink | No Comments  
Bit Late For Standards Now, IE

IE7It's nice to hear that IE7 is going to address many of the well-known "sidesteps from convention" when it comes to CSS standards, but isn't the damage already done?

Sure, box model variations and various other anomalies in Microsoft's flagship internet-facing client have annoyed web developers and designers alike for years on end. But the short-term effects are often countered with various hacks, at least on sites written and designed by fairly competent individuals.

The true long-term effects are surely the pollution in the internet gene pool of all the crappy code which has seeped into circulation thanks to the less competent individuals who have only written with IE in mind.

For example

The problems created by these people fall into two main categories:

The most obvious example of the latter problem is in JavaScript, where people use a generic element ID as an object instead of locating an element in the DOM with the document.getElementById() method.

For example, the following will work fine in newer IEs but error out in real browsers:

The outcome in IE is that 'Some text' gets replaced with 'Different text'.

The correct way to do this is:

It's hardly a strenuous change, but because IE will allow the erroneous former version, a lot of new scripters or novice website owners don't realise that what they're doing is incorrect and won't work anywhere else but on IE. Especially when they aren't aware of the whole standards compliancy issue and in cross-browser compatibility issues.

So we find that IE passively, or perhaps actively, encourages bad code to seep onto the internet and before long you have packaged scripts on developer sites with such errors inside.

Solution on the horizon?

I've strayed a little from the CSS issue at hand, but in my mind Microsoft's alleged continued drive towards compliancy encapsulates — or should encapsulate — Javascript, CSS and all sorts alike.

So what's the problem with their claims about increased compatibility in IE7's standards-compliant mode?

Well, I don't think that there's any "problem" per se, even when I see comments around the web implying that the developers at Microsoft might not actually be working true to their word.

However, I'm sceptical as to what good it'll do us all now. In my mind, the damage has been done, and a long time ago at that. There are countless websites out there designed for IE, with buggy CSS and JavaScripts full of errors.

Although the Standards Mode vs Quirks Mode concept is supposed to help get around the immediate pain of transition, the fact is that only proper developers know about Standards Mode and know/want to use it. These are the people who write valid code anyway. I see no evidence that breaking half the sites on the web, however gently, is going to fix anything now.

Now don't get me wrong, I am very hopeful that future IE versions are going to come back to Earth with real standards, and quickly. I'm just not convinced it's going to be that easy to get the amateur webmaster to start writing proper code which takes advantage of the newly-enforced standards.

Tags: ,
Permalink | 1 Comment  
The End Of Sane Life As We Know It?

The Electric ChairI love this techdirt article:

People often point out just how litigious American society has become, with people trying to sue just about anyone over anything that upsets them. Apparently, this is beginning to filter down to children as well.

A 14-year-old girl has decided to sue her friend, after the friend screwed up in returning the iPod she had borrowed. Rather than handing the iPod back to Shannon Derrik, Stephanie Eick apparently placed the iPod on her friend's school desk, where some other thief in their class pocketed the device.

Rather than working it out between themselves (or hunting down the thief), Shannon went to court. As you might expect when two teens go to court, it certainly sounds like much of this is being driven by the parents, while most everyone else wonders why the two families couldn't figure out a more reasonable way to settle the dispute.

Among the points of disagreement are that Stephanie's parents want to buy a refurbished iPod, while the lost iPod was still pretty new. Also, Shannon had about $45 worth of iTunes songs on the iPod, which she claims she can no longer listen to. Instead (gasp!) she's forced to listen to the radio. Correct me if I'm wrong, but songs you buy on iTunes should also be available on your computer — but perhaps that's nitpicking.

As for the two girls, they are no longer friends, but: "If I had to work with her for a project, I think I could do it," Stephanie said. "I know we're probably not going to be good friends again, but I don't hate her or anything."

The comments on that article start off with the inevitable comments about the increasing insanity of North American society — which I agree with, incidentally — but quickly devolve into bible-bashing (not that I'm religious at all), religious defense and (gasp) older folk suggesting children should not be allowed to take iPods to school because they're there to learn. Not that there are breaktimes or long travel times at all.

I'm slowly losing hope for the world. No wait, actually just the world on the other side of the pond. points

Tags:
Permalink | No Comments  
Not So 'Smart' Now

The University of Nottingham has just decided to make blanket changes to infrastructure that will cause disruption right the way through the first term of the new year.

Over the summer all door card readers will be replaced on all UK campuses. You will be issued with a new University Card (as the new card will be known) which will provide access once a card reader has been changed. Nedap will start the production of these cards during August and your new card will be available for collection from your School Office.

You will need to retain and carry your existing Smartcard for a number of weeks as it will still be needed to gain entry through doors which have not yet been upgraded. You should also carry both cards for borrowing books from the library during the transfer period.

(http://www.nottingham.ac.uk/universitycard/intranet/students.htm)

Why couldn't they start production of the new cards in July and have them all ready in time for the new year? The way they've done it, this is really going to screw up the new Freshers who are going to have an old-style Smart Card and a new Uni Card to begin with.

How are they going to understand the difference? Why should they have to? They may even have to pay for both cards. All this is unnecessary if a little foresight is given to the project.

Tags: ,
Permalink | No Comments  
Beatles webcam helps foil burglary

LONDON (Reuters) – An American helped foil a burglary in northern England whilst watching a Beatles-related webcam over the Internet, police said Friday.

The man from Dallas was using a live camera link to look at Mathew Street, an area of Liverpool synonymous with the Beatles and home to the Cavern Club where the band regularly played.

He saw intruders apparently breaking into a sports store and alerted local police.

"We did get a call from someone in Dallas who was watching on a webcam that looks into the tourist areas, of which Mathew Street is one because of all the Beatles stuff," a Merseyside Police spokeswoman said.

"He called directly through to police here." Officers were sent to the scene and three suspects were arrested.

I'm told there was a similar story from Australia last year: Exergy couldn't remember if it was a British guy who called police in Sydney or the other way around. But by my way of thinking if a British guy were remotely watching a crime taking place in Australia in real-time, the only call he'd make would be to his mates to joke about the awful irony.

Either way it's a quality story.

Tags: ,
Permalink | No Comments  
Spam By Co-Incidence

PlusNet logoWhen I started getting spam on an ISP email account that I don't even use, I got suspicious. At first I wondered if PlusNet had leaked account names or something. But eventually I figured it out.

See, PlusNet ADSL customers get fixed IPs and reverse DNS with a hostname like accountname.plus.com. For the purpose of this post imagine mine is kera.plus.com (note: it actually isn't).

Although I don't use the email account other than for the service announcements which I can't not get on the admin account, I have the default setup whereby everything sent to strong>@kera.plus.com goes to my mailbox anyway. But the most obvious address is strong>kera@kera.plus.com which is the 'default' account owner email address.

And I was getting spam on this address.

I got scratching my head, because I've never sent out a mail from it, and never written it anywhere online. I did briefly use strong>ds5-domain@kera.plus.com as the Whois contact email for one of my old domains, but I never got spam off that and it's a different address anyway.

It seemed totally ridiculous.

But the answer is quite simple.

See, the reverse DNS means that when you connect to most IRC servers, they see you as your hostname and that's the address that everyone in the channel sees when you join, part, etc. Further, since my account name is a name I use online frequently (deliberately), it's hardly a co-incidence that my chosen ident username is the same word. Because that's my identity.

So I end up joining channels with lines like this:

* Joins: tomalak (kera@kera.plus.com)

And quitting like this:

* Quits: tomalak (kera@kera.plus.com) (Reason: bored)

Half by co-incidence and half not by co-incidence, that IRC address (em>ident@host) is identical to that unused email address (em>accountname@accountname.plus.com). And although I can not immediately find any Google results for that address, I figure it's getting onto the web in published archives of IRC channel logs. Ripe for the picking by spambots.

And that, my friends, is how my unused email address is getting harvested: not even as an email address.

Although this won't be a problem for most with stupid hostnames like 69-11-54-253.ath.ma.comcast.net, that might be something to watch out for if you have a nice, short reverse DNS that might mirror an email account.

Tags:

Permalink | No Comments  
IE Is Background-Image Shy

As I began sprucing up my Portfolio a little, I came across a nasty IE bug that I'm sure I'd read about before. I was disappointed to be able to find precious little about it on the web but one blog which explains it quite nicely.

Roll on Jason at izzywizzy.org:

I've been wrangling with what appears to be a strange bug in IE, both 5.5 and 6, in the display of background images. For reference, Mozilla Firebird, my default browser, does not have any such problems. I think this problem has existed for some time now, but in testing my recent changes before migrating them over here, I tested in both versions of IE and the problem stuck out like the proverbial sore thumb.

In IE6, the image does not seem to appear at all. If I scroll so that the title is off the page and then scroll back, the image magically appears. In either version, if I hover over the title (which is also a permanent link to the entry) or any link in the subsequent body of the post, the image disappears — but frustratingly, only if the page is at certain positions. If I scroll up or down, even a little, it may not have any problem.

I would certainly appreciate any input or thoughts anyone may have on this.

Specifically this is happening to a

within a bunch of nested

s. They are displayed and undisplayed by altering their .display properties in JavaScript, but Jason's experiences lead me to believe this is not the whole cause. And I do want to retain that functionality.

When the (dark) background image isn't rendered, the (white) heading text appears invisible on top of the page's (white) background. The obvious thing to do is to give the

a black background so that the text will be visible even if the background hasn't rendered.

Naturally, IE decides to ignore that too. The colour disappears just like the image. Could this be isolated to the heading tags?

The fix

Reading on, I found this page on an interesting site about modern browser bugs, Position Is Everything. I've bookmarked that one.

Anyway, I got three things out of this find.

  1. The bug has been experienced by others, and documented. Quite a while ago, actually (July 30, 2004).
  2. The bug is not limited to heading tags. The PIE page uses lists (unordered and definition) to make their point.
  3. The bug is fairly easily solved.

So what's the fix?

position: relative;

Ah, the cure for all ills. Or pretty much, anyway.

Unintentionally Outrageous URLs

This post at Independent Sources reminds me of how kera.name came to be — as a typo. I decided 'kera' would be the name for my new website and for my new hard drive, even though it's a misspelling of Kara, the BSG character from which I drew inspiration.

Lucky for me, though, I actually prefer 'Kera' and my sticking with it hasn't led to any horrendously embarassing situations.

One can't say the same for these companies who didn't think their choices through all too clearly.

  1. A site called ‘Who Represents‘ where you can find the name of the agent that represents a celebrity. Their domain name… wait for it… is
    www.whorepresents.com
  2. Experts Exchange, a knowledge base where programmers can exchange advice and views at
    www.expertsexchange.com
  3. Looking for a pen? Look no further than Pen Island at
    www.penisland.net
  4. Need a therapist? Try Therapist Finder at
    www.therapistfinder.com
  5. Then of course, there’s the Italian Power Generator company…
    www.powergenitalia.com
  6. And now, we have the Mole Station Native Nursery, based in New South Wales:
    www.molestationnursery.com
  7. If you’re looking for computer software, there’s always
    www.ipanywhere.com
  8. Welcome to the First Cumming Methodist Church. Their website is
    www.cummingfirst.com
  9. Then, of course, there’s these brainless art designers, and their whacky website:
    www.speedofart.com
  10. Want to holiday in Lake Tahoe? Try their brochure website at
    www.gotahoe.com

Hee hee.

Baby Names

It's interesting to see that other people are giving their filesystems interesting names.

I myself have gone through a whole bunch of names on various machines, and their names almost offer an insight into how my TV viewing habits have changed over the years.

My current main desktop machine is called PILOT (Farscape). This is also the name of the single partition on the primary harddrive. The original second (media) drive was TALYN (also Farscape). And my first laptop was named MOYA. Around the same time I won a 512MB USB flash drive (then worth £50) and named it AERYN.

Then that laptop died and I didn't have one for a good long while. TALYN, a 120GB Seagate Barracuda, died at some point. It was replaced by PROMETHEUS (SG-1).

I started getting interested in external harddrives: Lacie 250GB, naturally. Over the past year or so I've stocked up three.

The first was DAEDALUS, because it was around the time that the Earth ship of the same name first appeared on Stargate Atlantis. At this point I finally got a new laptop, and named it HERMIOD after the Daedalus's resident Asgard engineer on the show.

The next was AURORA, because it was around the time that the Lantian ship of the same name briefly appeared on Stargate Atlantis.

Then I got into Battlestar Galactica. I renamed PROMETHEUS to KERA because I fell in love with the name. Actually, the character I had in mind was Kara 'Starbuck' Thraice, but I was never good with the spelling. The same typo eventually led to the naming of my new site, kera.name.

Then I got into Alias, and named my third Lacie drive NADIA. Nadia Santos. Mia Maestro. Mm mm.

So there you have it. PILOT, TALYN, MOYA, AERYN, PROMETHEUS, DAEDALUS, AURORA, KERA, NADIA. I also recently moved into a student house in Nottingham and named our new wireless router/network ATLANTIS, just for completion.

My home network is named TIMANFAYA which is completely unrelated to TV and stems from a favourite family holiday in Lanzarote.

Hey, I never said it was a funny story.

Next Page »