Tuesday, February 24, 2015

Optimizing iPad Video for iBooks Author and Pages


Including video in an eBook, especially an eTextbook, has become essential and expected. If a still image is worth a thousand words, then the potential explanatory power of an image moving at 30 frames per second must be exponentially greater. Getting from potential to actual value, however, requires compelling content and clear, efficient video.

LifeOnEarthIntroVideo


The preeminent tools for creating eBooks and eTextbooks containing video are iBooks Author and Pages, both from Apple. The iBooks Author app comes bundled with MacOS X which is free and Pages comes bundled at no extra cost with all new Macs. There are no other apps on any platform that match both the affordability and ease of use of Pages and iBooks Author.

iBA&PagesIcons.001


However, there have been issues with the way these apps have handled eBook video in the past. Some of those issues have been documented here. This post is a re-examination of those issues to assess the current state of video in eBooks produced by these two apps. Have things gotten better, remained unchanged or gotten worse? That is the question.

The iBooks Author (iBA) application has had difficulty handling video efficiently. In version 1.0, authors had to meet very strict and vague encoding requirements in order to avoid rejection of a video file. In succeeding versions, Apple addressed the many issues arising from this situation by incorporating a video optimizing routine that would re-encode any video brought into an iBA project via the Media widget. Early versions of this new functionality solved the problems that authors were having with video encoding for their eBook projects but they did so by making those video files unnecessarily large. It was quite common for a video file to become three times larger than the original after being “optimized” in iBooks Author.

Jan Ozer developed a clever way to circumvent the iBA video optimizer using custom presets for the Handbrake video transcoder and he offered how-to workshops on that tactic. In June of 2014, however, Apple updated iBA and rendered this workaround ineffective.

Ozer iBA Workshop


The current version of iBA (2.2) was released in October of 2014. The status of the video optimizer has never been referenced in any iBooks Author version history or Read Me file. Our knowledge of it has only come about by comparing input to output and then inferring what goes on within the innards this black box.

Even less well known is the history of video handling in the Pages application. The current version of Pages (5.5.2) has an export to ePub function which silently and invisibly invokes a video optimizer that, like iBA, calls upon system-level routines such as AVConvert to optimize your media files.” Pages seems to have followed iBooks Author with respect to handling the inclusion of video in eBooks without requiring authors to become expert in the art of video compression.

So with the increasing importance of video in eBooks and especially in eTextbooks, it is important to stay abreast of the ways in which Apple’s iBooks Author produces *.ibooks files containing video and how Apple’s Pages produces *.epub files containing video even if Apple isn’t very forthcoming on the topic.

METHODOLOGY

Both Pages and iBooks Author output eBooks (*.epub or *.ibooks files) that share the same architecture. Each eBook is actually a collection of various files and folders in an enclosing folder that has been archived using the Zip standard. The suffix of the resulting *.zip file is then changed to *.epub or *.ibooks which enables eReaders to know that they can be rendered as eBooks. The free
ePub Zip/Unzip application handles this chore very nicely.

It’s being able to “look inside” that enables us to see what these video optimizers have done to the video we provided, comparing input to output, before to after. An inexpensive ($0.99) app named
MediaInfo provides us with detailed information on each version of the video we wish to examine. Less information can be gotten for free by using QuickTime X Player’s Get Info function.

So our methodology is to bring video files into our iBA and Pages projects, export as *.ibooks or *.epub, then deconstruct the resulting eBook by unzipping it, finding the video files, developing information about those files and, finally, comparing and analyzing the differences.

DETAILED RESULTS

Raw data, including test videos, with detailed analyses may be found in the following
eTextbook created with iBooks Author. Download this *.ibooks file and read it with the iBooks app on an iPad 2 or newer or a MacOS X 10.9 or newer computer. This volume will illustrate by examples precisely how the current (2.2) version of iBooks Author handles ingested video. It will also document what Pages does to ingested video.

eTextbook

EXECUTIVE SUMMARY

The iBooks Author (iBA) application has improved video handling to the point where corrective action after export is no longer warranted or recommended. The media optimizer in iBA 2.2 will increase file size only slightly over what was ingested. However, optimizing video with Handbrake prior to ingestion produced significantly smaller video files of equivalent quality and this is recommended as current best practice. The eTextbook cited above contains a link to the custom Handbrake preset used in these investigations with instructions on how to import it into the Handbrake app and use it.


Boy with Big Book



The Pages app, unfortunately, has not improved as much. Video files ingested by Pages 5.5.2 are typically inflated to three times their original size or more. The best practice response to this unfortunate situation is to use the deconstruction techniques used in this investigation to replace the inflated video file with a version encoded by Handbrake using the aforementioned preset. Stepwise instructions on how to do this are found in the eTextbook cited above.