Sunday, May 13, 2012

Apple's Keynote has synchronisation problems - here's a short diagnosis

EuroSTAR virtual is coming up, and I'm not keen on presenting live without an actual audience. Brrr.

So I decided to pre-record my talk. Turns out the audience want slides, not a talk, and I assumed that I would put the slides together in Keynote, and click along to the pre-recorded sound of my own voice. However, the client wants PowerPoint, which I don't have. I could play it live on the day, but I was doubtful whether gotomeeting would take audio from a prerecorded source along with live video, and I certainly didn't want to sort all this out on the day and to deadline. I decided to export the audio and slides to a quicktime movie. Keynote says it can, so I assumed it could. And we all know where that leads.

If you've got a pre-recorded backing track, Keynote gives you a one-shot go at recording all the side transitions as it plays. The talk is around 30 minutes long, so I needed to put the rest of my world on hold and tap along to the sound of my own voice for half an hour. If I made a mistake at the end, I'd need to do it again from the start. This is clearly not ideal*, and I wondered how well the supporting technology might work

For the sake of this posting, let's ignore the ever-yawning pit of despair as I listened to my stumbling and ill-chosen words over and over again, but I challenge you to listen to a talk of your own and not cringe. Let's also ignore Keynote's habit of telling you the recording is 'out of sync' whenever you change anything, at all, and not withdrawing its warning when you undo the changes. Let's just say that, some time later, I had a recording of clicks to go with the recording of my voice, and that Keynote wasn't being neurotic about the sync.

I exported to a Quicktime movie. It took, for a 30-minute movie, about an hour. Bear in mind this is mostly still, white slide-deck - and even my grimy old kit converts HDTV to 720p H.264 Quicktime at double speed. On playback, the slides ended well before the words, but I didn't watch the thing through to see where it had gone out - it was correct at the start, way out at the end, and it seemed to get worse as the deck went on. Putting that one down to experience, I decided that a plausible cause was that I was asking my kit to do too much, or that a visually-heavyweight regular request (I prefer to dissolve from one slide to another) caused it to go out of sync by a little, often. I took out most of the dissolve transitions, turned off everything else the machine was doing, re-recorded all my clicks, tried exporting again.

And it was a bit better, but not right.

Now I could have gone on incrementally changing, but I'm a tester, and I don't believe my own hypotheses. I exported again, immediately. Another hour. I went for a bike ride, came back and cooked. The second was differently out, and it was worse. I watched, as far as I could bear it, flipping back and forth using a binary search approach to isolate momments where things went way out. In the first, a particular and simple transition did not complete. It ended late – subsequent slides tried to catch up, but went far too early. In the second, a short video that should play as soon as a slide was shown started after a long pause. I made a few changes to those bits, ignored the now meaningless** sync warning, and exported again, just to see. The third export was rubbish, as you'd expect, but differently rubbish; the problem transitions worked this time, but subsequent slide transitions were more banjaxed than before. Oddly, the sync wasn't as far out at the end.

Noticing that you can get Keynote to simply play back automatically without export, I re-recorded (a familiar process by now) and played back. Remember, I was using no export – just automatic transitions as if a ghostly machine hand was pressing buttons, not me. The presentation was borked in the first three minutes; one slide hung on far too long. I didn't stick around to see what else was going to go wrong.

I felt I should have tried this earlier. Clearly, no matter what was recorded, the playback itself was a problem – though not one related to CPU usage or contemporaneous export. And not one related to the rate of slides; Keynote happily works for me, but not for pre-scripted changes. The problem didn't consistently make the slides faster than the audio, or vice-versa.

I flipped open the source*** – the recorded timestamps were fine. Indeed, I've used them as a script for whichever poor AV person at the client gets the job of clicking through my deck. This information confirmed my hypothesis.

My diagnostic process, such as it was, was hampered by how long it took to set up an experiment and get the results (around two hours for each). I didn't bother try find a minimum viable set as I was trying to find a workaround, not trying to work out what was going wrong. I did try to eliminate some plausible problems, and I got good information while trying to get beyond the emergent behaviour, and into the internals of what was going on.

If I wanted to carry on, I could create a selection of Keynote files to see whether playback is a problem in all circumstances, or just some. I could consider a disconfirming hypothesis (maybe it's not playback, maybe it's my machine and playback, or maybe there's another set of corrupted timestamps that I've not looked for). I could waste more days of my life trying to get to the bottom if it. Apple, if you're out there, buzz me and pay me and I might just take it on.

But for now, I'm done.

I've taken the timings as a script. I've exported the slides to an obscure Quicktime format that contains unstoppable audio and all the transitions. It plays automatically, and happily moves on at a human-driven keypress. It's the right quality, the right audio, the right collection of transitions in the right order. I hope it suits the client – but I'll wait to see.

We already know that PowerPoint is no fun to work in. However, if you need to work on a self-playing prerecorded presentation, I suggest that Keynote is as much use as a banana lightsaber.

For an inspiring alternative, watch the video for Bob Dylan's Subterranean Homesick Blues. True fact, trivia fiends: It was recorded in London behind the Savoy Hotel. La di bloody da.

The EuroSTAR virtual conference is on Wednesday. Be there, or be somewhere else. Sod that - be there, and be somewhere else. I shall be.





* I've checked the manual, and there is a way of pausing, but no straightforward way of undoing a moving a mistaken slide change.
** If it's wrong when it doesn't warn you, why pay attention when it does.
*** deep breath: I'm not using packages (it's a silently-changed option in Keynote 09), so the saved file is obscured. For Keynote, thankfully, there's a way out: change the file extension to .zip, and unzip it to a folder. Inside the folder, I looked into the ugliest large-ish file (index.apxl, here), recognised it as not-really-XML (the file chewed up textmate and spat it out), found timestamps tagged with narration-event that seem to correspond to my expectations, clipped that bit out and fiddled with it until the events, slides, builds and timestamps were unfogged and human-readable. I may be a Mac user, but that doesn't mean I'm so much of a numpty I can't get down to business.

4 comments:

  1. Thanks for your blog post, James. I was trying to use the playback option in Keynote at 20 second intervals in order to get ready for a Pecha Kucha presentation that I was mailing in....couldn't get my audio to sync at all with the timing of the slides and vice versa. I'm going to try exporting the whole thing to iMovie and having a go with Garageband to see if I can get it to work. Boo hoo. So much promise to be awesome! My diagnosis: too many feathers and not enough chicken.

    ReplyDelete
  2. This is my recommendation.

    Step 1) Create your Keynote presentation.

    Step 2) Record your speaking part (separately) with an audio recording program.

    I recommend Audacity. It's a great free application. You can download Audacity from www.sorceforge.com among other places. You'll also want to get the Audacity LIB file that is needed to export your audio recording to .mp3.

    3) From the Keynote Inspector, under the Document tab, go to the audio section and add your new voice recording file to the Soundtrack.

    4) From Keynote, go to File, Record Slideshow.

    While the audio plays, click through your slides. This is getting the slide change time down.

    5) From Keynote, go to File, Export. Make sure to have the following settings:

    Playback Uses: Recorded Timing
    Include audio (sound files, movie audio): NOT SELECTED
    Include the slideshow soundtrack: NOT SELECTED
    Include the slideshow recording: SELECTED!!!

    Click next and your Keynote presentation should export to a .mov file (keep in mind, this .mov file has no audio. we'll take care of that in the last steps).

    6)Open the new .mov Keynote presentation in Quicktime Pro.

    7) Open the original .mp3 sound file in Quicktime Pro.

    8) Select All of the .mp3 file and then click CTRL + C to copy it.

    9) Go back to the .mov Keynote file and Select All. Then go up to Edit > Add to Movie.

    This adds your sound and movie file together.

    10) Finally click on File > Save As. Select, Save As A Self-Contained Movie and you're done.


    I Hope This Helps!

    ReplyDelete
    Replies
    1. Rich - thanks for the detailed suggestions. I hope that they help other readers of this blog.

      I may need to try it soon, and I'll report back here (memory willing) if I do.

      As I'm a software tester, I'm honour-bound to ask: have you tried this yourself?

      If you have, and if this works consistently, then one difference between your keynote [exporting the right timings] and mine [exporting the wrong timings] is that I've ticked the "include the slideshow soundtrack" option. I might try a bit of diagnostics around this...

      Cheers - James

      Delete
  3. I also had issues playing back a presentation with Recorded slide timings that I had synced to a pre-recorded audio voice over. Hence searching for a solution and finding your blog.
    Luckily the exported movie played perfectly, not sure if this would help the OP but fine for my product demo www.touchtraining.co.uk

    ReplyDelete