ScreenFlow: Review August 21st, 2009
Patrick Stein

I downloaded the trial version of ScreenFlow in early July. I performed a few simple tests with it, liked what I saw, and bought a license. Since purchasing the license, I have used it to record and publish six presentations. Overall, it is a wonderful program that more than lives up to the license price.

How I’ve Been Using It

I have a 2.4GHz MacBook Pro, a FireWire webcam, a stand-alone video camera, a tabletop tripod, and a BlueTooth headset. I brought all of this equipment to the TC Lispers meeting in July.

I failed to record the first presentation. The BlueTooth headset, of course, has a rather opaque user interface. It has an on-off switch. It is unclear which position is on and which is off. It has two buttons for volume control. It has one button that does everything else depending on the current state and whether you click, double-click, or triple-click. I did something wrong. This resulted in a recording failure that I didn’t notice until after the presentation. Most of this was the headset (and me). ScreenFlow could have done better at alerting me (more on that below).

For the other three presentations that evening, I recorded audio through the built-in microphone on the MacBook. This worked famously, and I used it to record the August presentations, too.

Because of the projector we are using, I record the screen at 1024×768. That resolution is plenty, in my opinion. For the July presentations, I recorded some video directly with ScreenFlow from the FireWire webcam. I recorded additional video with the stand-alone video camera. I used the video from the stand-alone camera in two of the final presentations in place of the webcam video because the contrast was better. I didn’t use the stand-alone camera video in the other presentations because I had to change tapes in the middle of one presentation and ran out of batteries in the other.

I forgot to bring my FireWire adapter to the August meeting, so I recorded all of that video with the stand-alone video camera.

After each presentation, I stopped recording and saved (more on this below). The next day, I prepared the final video. I resized the whole thing to 1024×640 to get a more dramatic aspect ratio and to give me a little room to put the screencast and video side-by-side. I added in a couple images (a TC Lispers logo and a Creative Commons logo) and a line of text.

For those presentations where I used the stand-alone video camera’s video, I imported that into ScreenFlow in the comfort of my own home. The audio from my stand-alone camera doesn’t import into ScreenFlow very well. As such, I ended up toying with the video until I got it synced with the audio I had recorded from the built-in microphone (more on this below). I think I’m going to use a clap board next time.

I positioned all of my pieces, added some shadows, added some reflections, and added some Video Actions to transition where the screencast and video sat in space.

Then, I exported the clips and uploaded them to Vimeo. I’m quite pleased with the results.

What It Does Wonderfully

If you can have ScreenFlow record your screen, audio, and video all at the same time, then most everything you’ll want out of this software is a dream.

You’ll have your screencast and video already there. You can add in text and stills. You can add in additional audio or video sources. You can position, scale, and tilt your visual elements. You can give them drop-shadows and reflections. You can adjust the volume of your audio or add audio effects to it.

You have a great deal of control over the text. You can change the font, the alignment, the fill color, the outline color, the background color, and the margin and corner-rounding on the text background. For those color adjustments, you can even adjust the opacity.

For shadows, you have control over the angle, color, offset, opacity, and blur-size. For reflections, you have control over the opacity.

You can add video or audio actions to any clip. You can select multiple clips at once to add an action to so that all of the actions happen at the same time. The actions aren’t so much actions as transitions. You can set the parameters: (opacity, scale, position, orientation, reflection, shadow, etc.) before and after the action. The action will transition from one to the other.

The actions take a little getting used to. When I first started, I had a tendency to try to set the position of a clip before and after an action. The tricky bit is that when you set a parameter before the action, that parameter has effect the whole way back to the last action (or the beginning when there are no prior actions). I surprised myself accidentally several times forgetting to put in an action at the place I want to transition. My workflow now is to get everything in its starting state, go through to where I want the first action, put in the action, and only change the parameters after the action. ScreenFlow inserts the action to finish at your current position in the timeline so this method is the natural way they envisioned, I believe.

Once I have all of my video imported and synced, it only takes me about fifteen minutes to place the logos, other text, get all of the parameters set the way I like (shadows on everything, reflections on screencast and video), add all of the actions that I want, and start exporting. Exporting at high quality takes hours and hours, but that it mostly a function of the multipass compression, not of ScreenFlow itself. You can export at low quality a good deal faster. My big concern though is to be sure you can read the slides and live-typing even after it comes through Vimeo though. As such, I let it export overnight.

What I Wish It Did Better

When you start a recording with ScreenFlow, it gives you a countdown to start recording. I put my Keynote presentation in Fullscreen mode before the countdown completed. It wasn’t until I closed my Keynote presentation that I saw that ScreenFlow had bailed because it could not get input from the microphone. Maybe ScreenFlow can’t bring up a dialog in front of a Fullscreen application, I don’t know. But, it could have told me audibly that it was having issues.

When I did test recordings, I didn’t do anything over five minutes. When I (successfully) recorded the first hour-long presentation, I hit Save. I got the spinning beach ball for a very long time. I was concerned that the application was hung. I am thinking that it was just recoding the video it had pulled in from the webcam. For the August meeting, I wasn’t recording video with ScreenCast during the presentation. Saving at the end of the presentation took no time at all. While I was watching the beach ball spin, I was starting to worry that I had paid a whole bunch for a license that wasn’t going to work for my purposes. The beach ball finished after about eight or nine minutes… just in time for the next presentation. Everything saved perfectly. I could have used a progress bar instead of a beach ball though.

ScreenFlow does not do well importing the audio from my stand-alone video camera. I can pull this audio into iMovie just fine. I might be able to pull it in with iMovie and add it into my ScreenFlow presentation. I don’t know. When I pull it directly into ScreenFlow though, the audio has terrible digital distortion like they made the wrong guess about signed or unsigned samples. You can still follow along enough to help synchronize it with the audio recorded from the built-in microphone, but you’d never want it in your final movie.

Synchronizing an independent video or audio source that wasn’t being pulled into ScreenFlow during the presentation is annoying. I think I can mitigate most of it by using a clap board before things get underway. Trying to do this retroactively was annoying. I had to move the screencast and the built-in audio clips away from time zero. Then, I had to find an area where there was a distinctive sound. I then had to play with moving the newly imported video clip back and forth in time until things were close enough. Fortunately, the human brain is very forgiving about badly synchronized audio and video.

Once I got the clips aligned, I had to move the scrubber back to the beginning of the built-in microphone recording, trim all of the clips from the front to the scrubber, and then move all of the clips back to time zero.

I tried using the markers feature to help me synchronize clips. Unfortunately, the markers are locked to the timeline and I couldn’t see a way to clamp a particular part of a clip to the marker.

I used the Show Audio Waveforms feature to help me synchronize the audio. This was a bit awkward because of the digital distortion in the video camera import. It was also a pain because the timeline is impossible to work with when it is trying to display the waveforms. You can’t have an hour long clip with a waveform and use the magnification slider on the timeline. You end up getting a beach ball part way through your drag. You have no idea where it will think you let go of things when the beach ball finally pops. You can’t move around the timeline or move things within the timeline with the waveforms displayed either for these lengthy clips. I turn off the waveforms as soon as I can. They don’t add much to my process, and they really get in the way.

The program has a feature to add Callouts. These can either highlight the mouse position or the foreground window. In my case, I wanted to retroactively add in Callouts. During the presentation, the presenter was pointing at the projected image with his hand. The callouts were locked to where the mouse was. It would have been fabulous if it would have let me position a callout during edit time instead of being stuck with where the mouse was during the presentation.

The Upshot

It has some frustrations, but it does most things very smoothly. Turn off the Show Audio Waveforms, use a clap board, and enjoy. The output is unmatched, and the interface is very easy to fall into.

Taking the Long Way Home August 14th, 2009
Patrick Stein

I was pondering non-deterministic, shareware nagging. Suppose that every time you performed a particular function, I wanted to randomly decide whether to nag you this time or not. Suppose further that I’d prefer not to have to keep track of how long it’s been since I last nagged you, but I’d still like you to be nagged about once every n times. Naïvely, one would expect that if I just chose a random number uniformly from the range zero to one and nag if the number is less than \frac{1}{n}, this would do the trick. You would expect that if you rolled an n-sided die each time, that you’d roll a one about every n-th time.

Me, I’ve learned to never trust my naïve intuition when it comes to probability questions. Well, it turns out that the naïve answer is perfectly correct in this case. Here is the epic journey I took to get there though.

Here’s what I wanted. I wanted to know the probability p needed so the expected number of trials until the first success is some number n given that each trial is independent and is successful p proportion of the time. Suppose for a moment that I decided I am going to roll a six-sided die until I get a one. What is the expected number of times that I need to roll that die to get my first one? What I want here is the inverse problem. How many sides should my die be if I want it to take n tries (on average) to get my first one?

tree In the picture at the right, each circle represents a trial. Each square represents a success. What I am looking for is what value should I pick for p so that if you go left p proportion of the time and go right the other (1-p) proportion of the time, you will expect to hit n circles along your descent. You could, if very unlucky (or lucky in this case since I’m going to nag you) go forever to the right and never get to a rectangle. So, already, we’re expecting an infinite sum.

Indeed, the expected number of circles you cross in a random descent of this tree is E(p) = \sum_{k=1}^{\infty} k \cdot p \cdot (1 - p)^{k-1}. Massaging this a little, we can get it into a simpler form: E(p) = \frac{p}{1-p} \sum_{k=1}^{\infty} k \cdot (1 - p)^k.

That infinite series is pretty nasty looking though. So, we whip out a handy table of infinite series and see that:

\sum_{k=1}^{\infty} k^m q^k = \frac{1}{(1-q)^{m+1}} \sum_{k=0}^m \left[ \sum_{j=0}^{k+1} (-1)^j { {m+1} \choose j } (k - j + 1)^m \right] q^{m-k}

Fortunately, in our case, m = 1. As such, we can reduce this significantly:
\frac{1}{(1-q)^2} \sum_{k=0}^1 \left[ \sum_{j=0}^{k+1} (-1)^j { 2 \choose j } (k - j + 1) \right] q^{1-k}

\frac{1}{(1-q)^2} \left\{ \left[ \sum_{j=0}^1 (-1)^j { 2 \choose j } (1 - j) \right] q + \left[ \sum_{j=0}^2 (-1)^j { 2 \choose j } (2 - j) \right] \right\}

Now, we note that when j = 2, the last summand is zero. So, \sum_{j=0}^2 (-1)^j { 2 \choose j } (2 - j) = \sum_{j=0}^1 (-1)^j {2 \choose j } (2 - j). As such, we can combine our two summations into one:
\frac{1}{(1-q)^2} \sum_{j=0}^1 (-1)^j { 2 \choose j } \left[ (1 - j) q + (2 - j) \right]

And, since j is only going from zero to one, it’s easy enough to write out both terms of the summation:
\frac{1}{(1-q)^2} \left\{ { 2 \choose 0 } \left[ q + 2 \right] - { 2 \choose 1 } \right\}

\frac{1}{(1-q)^2} \left\{ q + 2 - 2 \right\}

\sum_{k=1}^{\infty} k q^k = \frac{q}{(1-q)^2}

Whew! Big sigh. We’re through the ugly parts. Now, in our case, q = (1-p), and the equation we were interested in was E(p) = \frac{p}{1-p} \sum_{k=1}^{\infty} k \cdot (1 - p)^k. Plugging in (1-p) for the q in our infinite series solution, we find that

E(p) = \frac{p}{1-p} \cdot \frac{1-p}{p^2} = \frac{1}{p}

Two pages of ugly, ugly algebra bears out the simple guess. Wheee! If we want E(p) = n, then we have to pick p = \frac{1}{n}. Hooray!

Fun(??) with Backups August 13th, 2009
Patrick Stein

I live each day with the fear of a catastrophic disk crash.

Most of the data I care about lives on my MacBook Pro. My PowerBook had some disk drive issues at one point. Because it had been a month since I had backed it up, and that backup was partially scrogged, I lost about six weeks of work when that drive flipped out.

I mitigate this slightly by mirroring my VCS repositories to several different machines. I also download digital images to two different computers before deleting them from the camera. I still suffer through Retrospect backing up to DVD-R every few weeks.

I recorded the presentations from the last TC Lispers meeting. I expect to do the same at this month’s meeting. Because the raw material from last month was 48GB and because I only had about 45GB of space remaining on my drive, I needed to get that 48GB out of the way by next week. So, I was caught in a crisis.

It’s not data that I want to pay $0.15/GB/month to store. It’s not data that I just want to throw away. At the same time, I am probably not going to need that raw data again for at least a year.

After struggling through the first six disks (which took me eleven disks) trying to backup the data to DVD-R with Retrospect and having only backed up about a quarter of my data at this point, I abandoned trying to write use Retrospect to archive the data. So, now what?

Problems I Would Like to Solve

  • Day-to-day Peace-of-mind: If my drive crashes, I haven’t lost too much time or irreproducible data
  • Archival: There is some data I don’t want to throw away, but don’t need spinning next to me
  • Fire-safety: If a small nuclear device explodes in my computer corner, I haven’t lost too much time or irreproducible data

My solutions

I have added two 1TB disks to my Linux box. I have set these up as a RAID-1 (technically, as a RAID-5 with one faulty-by-way-of-being-absent drive). I have set this filesystem up to be shared via Appletalk, and I have set up Time Machine on my Mac to backup onto that filesystem. Turning on Time Machine was a significant pain. The how-to page is wonderful. However, File Vault and Time Machine don’t play nicely together. Turning off File Vault was terribly annoying. I will tell you more about that below.

So, this takes care of my Day-to-day Peace-of-mind. It has also given me a stop-gap on the Archival. I have a fair bit of space at the moment to drop 48GB. It’s spinning, but it isn’t costing me $7/month either.

I still have Fire-Safety to deal with. I have a 250GB external drive. I will probably use SuperDuper! or one of its cohorts to back up to that external drive. Then, I can lock the drive in the firebox or take it offsite. I will have to find some way to get backups from my Linux box onto the drive, too, but that seems fairly tractable.

For longer term Archival, I am going to give ArchiveMac a shot.

If I find a good archival solution, then I may go with one of the online backup services for my Fire-Safety and/or Day-to-Day Peace-of-Mind.

If any of y’all have a good Archival or Fire-Safety strategy, I’d love to hear it.

The Problems that I’ve had with Retrospect

Note: I am using Retrospect 6 even though they are currently on 8. I do not like 6 so I can’t imagine paying them more money.

I bought six because it was the only software I could find at the time that allowed me to do full and incremental backups and backup to DVD. Actually, it turns out that it would only let me have full flexibility on the full/incremental stuff if I backed up to big media. To do things to DVD, I couldn’t branch arbitrarily and do an incremental based on a chosen previous backup in the same heritage.

Even worse, Retrospect is very picky about both the drive and the media. I made many coasters trying to get backups working at all. Even when they were working, about three in eight disks were coasters before it even finished writing them. Of those it finished writing, about one in twelve were coasters-in-hiding.

Combining the coasters-in-hiding problem with the unable to pick the parent for my backup meant that if I didn’t do the backup with verification turned on, I couldn’t come back later and re-do the backup. Retrospect would consider that backup complete. If it wasn’t, then I had to go through and touch any files that I wanted to make sure got backed up on my next attempt.

The Problem with Time Machine and File Vault

I didn’t turn on Time Machine when I first upgraded to Leopard. I didn’t do this because Time Machine has no subtlety. It will keep that 48GB of data I may never need spinning and spinning. When Time Machine runs out of space, it starts getting rid of the oldest stuff. As such, until I run out of space, I’ve got this 48GB I may never need. Once it runs out of space, I don’t have old versions of things that have changed recently. It’s a nice Day-to-Day Peace-of-Mind, but it is not an Archival solution.

Early this year sometime, I turned on File Vault. There shouldn’t be anything particularly sensitive on my drive outside of my Keychain. On the other hand, there’s no reason someone stealing my laptop should get to have any of it. It seemed like an easy win.

Then, I went to turn on Time Machine yesterday. Time Machine warned me that my home directory was encrypted. As such, it could not backup my home directory as individual files. It could only back up my home directory as a whole. And, it could only do this when I am not logged in. When I am at home (which would be the only time I have access to the external drives that I’d be using Time Machine on anyhow), I am always logged in. I don’t want to have to restore my whole home directory somewhere to get back a file I shouldn’t have deleted. I would much rather it backs things up only when I am logged in. How often do my files change when I am not changing them?

Fine, I’ll turn off File Vault. That wasn’t so easy. File Vault wanted me to free up 128GB of space on my home volume so it could decrypt itself. I only had about 70GB of space available.

I had to back some stuff up so I could delete it so I could make enough room to turn off File Vault so I could turn on backup software! It’s brilliant, brilliant, brilliant!

I moved the 48GB of raw presentations over to the RAID on the Linux box. This took about 45-minutes. Then, I moved my iTunes Music and my VMWare disk images out of my home directory. This took about an hour.

Unfortunately, since File Vault was keeping my home directory as a Sparse Bundle on my main drive, moving things out of the Sparse Bundle and onto the main drive didn’t free up any space inside the Sparse Bundle. Thinking it would be faster to move stuff to a locally connected FireWire drive than over the network to the RAID, I deleted the 200GB of Retrospect backup catalogs that I had on the external drive and moved my iTunes Music and VMWare disk images over there instead. This took another hour.

Finally, I got to turn off File Vault. I didn’t wait around for it to figure out how long it thought it would take. It took more than half an hour and less than an hour-and-a-half for it to finish that.

Then, I moved my iTunes Music and VMWare disk images back from the external drive (another 45-minutes or more).

Then, finally, I turned on Time Machine.

I spent more time turning off File Vault and turning on Time Machine than I did buying disks, creating the RAID, setting up Appletalk under Linux, and plopping the 48GB of raw presentations across a network onto the RAID.

Ask a simple question… August 8th, 2009
Patrick Stein

Ask a simple question, spend the next forty minutes sifting through integral tables. Earlier, I took some code that was uniformly selecting points from a square centered at the origin and converted it to code using points from a normal distribution. For my purposes, I used a standard-deviation for the normal distribution that was half of the in-radius of the box. It wasn’t at all exact in any way.

What if I wanted to be exact? Suppose I wanted to switch from points uniformly distributed in a box to points from a normal distribution while maintaining the expected distance from the selected point to the origin.

What exactly is the expected distance from a selected point to the origin if one picks each coordinate for the point from a uniform distribution on the range [-1,+1]? Let’s start with the one-dimensional case. The probability density is \frac{1}{2} everywhere. So, the answer is 2 \int_{r=0}^1 \frac{1}{2} r dr = \frac{1}{2} as we would expect.

(image created in Lisp using Zach's Vecto library)How about two dimensions? This is immediately more awkward. The one-dimensional disk looks exactly like the one-dimensional square. In two dimensions, the disk and square are quite different. We either have to integrate over the square and calculate the radius of each point, or we have to integrate over increasing radii and be careful once we get to the in-radius of the square. (image created in Lisp using Zach's Vecto library)

I originally chose to try to integrate over the square. The probability density is \frac{1}{4} everywhere. This means the expected radius is \int_{y=-1}^1 \int_{x=-1}^1 \sqrt{x^2+y^2} dx dy. This gets to be no fun very fast since the inner integral comes out with a logarithm in it. I mean, do you want to finish this integral?

\int_{y=-1}^1 \left.\left( \frac{1}{2} x \sqrt{x^2 + y^2} + \frac{1}{2} y^2 \ln \left( x + \sqrt{x^2 + y^2} \right)\right)\right|_{x=-1}^1 dy

It may be easy. I didn’t want to mess with it. I suppose once you evaluate the x terms, it reduces a fair bit (if I did that all right):
\int_{y=-1}^1 \left( \sqrt{1 + y^2} + \frac{1}{2} y^2 \ln \left( \frac{1 + \sqrt{1 + y^2}}{-1 + \sqrt{1 + y^2}} \right) \right) dy

I still don’t want to touch it.

So, how about integrating over the radii? Again, the probability density is \frac{1}{4} everywhere. This makes the expected radius:

\int_{r=0}^1 \frac{1}{4} \cdot 2 \pi r dr + \int_{r=1}^{\sqrt{2}} \frac{1}{4} \cdot 8 \left( \frac{\pi}{4} - \arccos \frac{1}{r} \right) dr

With a little massaging, you can move the \frac{\pi}{4} from the second integral into the first instead:
\int_{r=0}^{\sqrt{2}} \frac{1}{4} \cdot 2 \pi r dr - \int_{r=1}^{\sqrt{2}} \frac{1}{4} \cdot 8 \arccos \frac{1}{r} dr

This is hardly consolation though. Here is where we get lost in our table of integrals for the better part of an hour.

And, this is only the two-dimensional case! In my original problem, the ambient space was 32-dimensional. My, oh my.

Axiom of Choice Joke: Now for Sale August 7th, 2009
Patrick Stein

There’s an old math joke that goes like this: The Axiom of Choice is obviously true. The Well-Ordering Theorem is obviously false. And, Zorn’s Lemma is just too complicated to be sure. It is a joke because it is easy to prove that they are equivalent.

MathSignLang For a month now, I have wanted to turn that joke into a Sign Language for Mathematicians picture. I finally got to it this evening. You can see the result on the right.

You can purchase it on a t-shirt or mug over at Zazzle, if you like.

The intuition

I am going to try to paraphrase the Axiom of Choice, the Well-Ordering Theorem, and Zorn’s Lemma to try to give you a sense of why each statement in the joke seems intuitively correct.

Suppose that I have infinitely many boxes. Each box contains one red ball and one blue ball. You can, with or without the Axiom of Choice, pick one ball from each box unless you are colorblind. If you are colorblind, you need the Axiom of Choice to pick one ball from each box even if you don’t care what color that ball is. What a wacky world it would be if a colorblind person could not pick a ball from each of these boxes. So, obviously, the Axiom of Choice should be true.

Suppose you have all of the real numbers from zero to one including both zero and one. If I asked you to give me the smallest number you’ve got, you could hand me the zero. Now, if I asked you to give me the smallest number you’ve got, you’re stuck. What the Well-Ordering Theorem says is that there is some way we could sort your collection of numbers so that no matter how many of them I take away (so long as I don’t take them all), you will never get stuck. It seems crazy that you can just shuffle your collection of numbers to keep me from thwarting you.

As the joke mentions, Zorn’s Lemma is complicated. On the one hand, Zorn’s Lemma says that if you took the genealogy of all people born in the last 8,000 years, then there exists at least one person with no ancestors born in the last 8,000 years. On the other hand, Zorn’s Lemma says that you didn’t need to shuffle your numbers so that you could still give me the smallest number in your hand after I took away the zero.

How it looks on a t-shirt

Updates In Email

Email:

l