Legend/Myth of the One-Day App, Day Seven

So, I prevaricated enough and the time was nigh to venture forth onto the developer site and get my app submitted for release. It was Valentine’s Day, a day that I loathe on principle, but, for the sake of my long-suffering wife and my own crumbling sanity, I needed to seize the nettle by the horns before I succumbed to my own madness and mixed metaphors.

The first thing I found out (as mentioned back in the original post, with all that future knowledge) was that my app’s name was already taken. I couldn’t call it Sleep Tight. So, after much petulant stomping about and hissing, I renamed it Sleep Well and tried to ret-con that title within my brain. Almost two months later, I am only just getting used to it.

Sleep Well is an app I use everyday and I love it, but I had no clue how desirable the great Not-Me might find it. After all, it was an app that fixed a problem that might only be peculiar to my Mac. And, as an app with just one button, were people going to chance their spare coffee money on it after glimpsing one screenshot?

No way in hell, I thought.

But imagine if they could see it in motion…

A little less of a long shot?

Yes: what this app needed was… a promo video!

Video Killed The iMovie Star

Yes, a promo video! I could waste days more on that…!

Oi! No! That’s not what I wanted! I resolved that I could come up with a perfectly serviceable video in just one remainder-of-a-day, render it and be done. Day 7, then. Finished in a week, and only the Almighty could say better that that!

Now, I don’t own any fancy software for videos or video-capture. But MacOS has inbuilt video capture (Cmd-Shift-5), and I remembered using iMovie in the dim-and-distant, so I would use those two tools.

Cmd-Shift-5 (what else shall I call it?) is a lovely little app. And it seemed to be just the ticket for me: I could place my app window over the desktop, select a region for capture and just hit the record button.

Unfortunately… it pretty much fails to capture when a Mac goes to sleep. Not so unsurprising, that. But since Sleep Well‘s #1 task was to put the Mac to sleep, getting a “good” recording, especially for those precious moments after the Mac wakes up, proved impossible. Would any other software work any better? Probably not. There was only one thing for it: Sleep Well needed a “fake sleep” mode.

This “fake sleep” would simply involve hiding the Sleep Well window behind its black screen when asleep, and show it again on waking up. It was a “feature” needed only for the sake of the promo video, and wouldn’t show up in the submitted version.

That worked. Cmd-Shift-5 offered up no more protests. My only problem was moving my mouse cursor properly. I’m serious: as soon as I hit record, my hand started becoming extremely mal-coordinated and jittery. I needed several takes to get it right. This is why I could never be a stage actor: I’d trip over my own face standing still.

I also needed to generate several other “screens” to stitch together for the video. It wasn’t too much of a hassle. I imported everything into iMovie, added some text, jiggled it all about a bit until it was “that’ll do” quality, and then hit the render button…

The magic of iMovie…

…And it turned out okay, so I attempted to upload it to Apple and then…

“Resolution not supported!”

I had rendered it in 720p. In my defence, my app has one button and a tiny window, so why did it need to be 1080p? Well, it just did need to be, didn’t it! So I went back to iMovie and then I noticed something horrible: iMovie wouldn’t let me render it above 720p.

what a lovely “feature”

It seems to be a rather-well-known bug in iMovie. Unless you have 1080p video “pieces”, it won’t scale up to 1080p. Why? Don’t ask me why! It seems absolutely nuts. But what do I know? Perhaps Apple want every bit of output to be crisp and un-blurred so, rather than have people complain about their mildly-blurry renders, they cheerfully disable the 1080p option for a video that might be better suited to 720p, no matter what the user wants…

Was there a workaround for this bug? Well, the solutions described after a long web-search did not fix it for me. Had I wasted my day on this? As I saw it, I now had three options:

  1. chalk the day off to experience, and submit the app without a video; or
  2. buy some better movie-generating software; or
  3. use ffmpeg or similar to up-convert the already-generated 720p.

I engaged Hubris Mode and chose option 4.

(to be continued…)


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s