Tuesday, August 3, 2010

What Nixonland means for EPUB

Update, 25 May 2011: I have recently published a new miniguide explaining exactly how to add audio and video files to your EPUB formatted ebooks so that they work properly and look great in iPad, iPhone, and iPod touch, as well as NOOK Color. You can find more information in this article.


I wrote last week about Simon and Schuster's new “enhanced” edition of Rick Perlstein’s Nixonland, with vintage videos, that had made it into Apple's iBookstore, despite not being able to pass EpubCheck 1.0.5, one of Apple's stipulated requirements for inclusion.

There are a couple of reasons why this is so significant. First of all, it implies that Apple has no interest in supporting XHTML 1.1's object element, which is an existing way of embedding video that would have passsed EpubCheck. I have experimented with many different permutations of the object element with iBooks with no luck at all. It not only doesn't show video, it doesn't fall back to the alternate content. Bascially iBooks doesn't seem to support object at all.

Second, it marks Apple's, and perhaps EPUB's, path toward HTML5. It is no coincidence that the one non-complying piece of Nixonland is a tag from HTML5. Not an Apple proprietary extension, not a weird JavaScript, but part of the language that both Apple and Google have been heavily promoting for the last year or so. How long can it be before EPUB supports HTML5, EpubCheck validates HTML5, and Nixonland and other video-containing ebooks are legitimate entries in the iBookstore?

Third, it's interesting to note that Nixonland uses .m4v videos, and that those videos are properly declared in the content.opf file as video/mpeg4. I recommend the rest of us do the same.

Fourth, there is no sign of audio in the Nixonland sample files, Apple says, "This book is enhanced with content such as audio or video..." but actually it turns out to be all video. I think that's because HTML5's audio element isn't yet fully baked (or supported). I can get audio to work, but it's buggy at best. (More on that soon.)

Fifth, the Nixonland sample contains four videos which all together contain eleven minutes and 15 seconds of video. The sample weighs in at 127Mb. The full book takes up 447 Mb. That's a pretty hefty file. Assuming the same quality, that means the full book has about 39 minutes and 34 seconds of video.

Finally, what I think Nixonland only begins to demonstrate is why we want video in a book anyway. I'm not a Nixon aficionado, so I can't begin to judge the usefulness and relevance of these videos given the surrounding text, but I'd be interested to hear what others think.

I've created a new, but still tiny example of a video enhanced ebook (with explanations) so you can pull it apart and look at the code, and also see why it might be a good idea to have videos in ebooks. There's a bit at the end with more explicit instructions. Even though it's tiny, with just 7 short videos, it still takes up 50 Mb! Note that the only errors that this book generated in EpubCheck are due to the use of the video element; that is, exactly the same errors that Nixonland produces.

19 comments:

  1. This example looks really nice. Thanks for sharing with us. Now we need Apple to provide us some "clues" about how iBooks deal with the specification. We're in the dark here.

    ReplyDelete
  2. Nice e-book and useful example!

    > How long can it be before EPUB supports HTML5

    Not long. It's in the agenda (EPUB 2.1)

    http://www.idpf.org/idpf_groups/epub21wg/IDPF-EPUB-WG-Charter-5-7-2010.html

    and Apple and Google will probably try to speed up the process.

    ReplyDelete
  3. I totally agree with you, Liz. I'm working on embedding audio in epub and I really appreciate this topic.

    ReplyDelete
  4. I am sure you know this, but your sample epub (and I presume NixonLand too) does not show video in Adobe Digital Editions. Just spaces where the video should be.
    Same with the desktop version of Sony reader.

    The ePub reader extension for Firefox does show the poster images and then a right click will show the video in a spawned window.

    Calibre shows the poster images but no video...
    Stanza for the MAC -- nothing at all.

    So, if you haven't got an iPad then it is really difficult to test.

    ReplyDelete
  5. Hi Chris: yes, you're absolutely right. Currently this works only on the iPad/iPhone. I assume others will catch up.

    ReplyDelete
  6. Hi Liz, just bought your newest eBook on making ePubs and have really enjoyed it and learned a ton. I had a quick question that is off-topic, but I didn't see any other email address or "contact me" form any where, so I hope it's OK to send it to you through this.

    Anyway, the struggle I'm having is in transforming my wife's book (which is a book with photography and the text embedded into the photos) into an eBook.

    Many of the photos span across two pages and I am trying to find a way to get one photo to span two pages without cropping the photos into two pieces. I've selected 'google account' below the comment box, so hopefully you will be able to email back your response if it is too long for the blog. By the way, I would be happy to send you some asp code that would create a form for folks to be able to send you emails if you wanted that.

    Anyway, thanks for a great book and blog!
    Brian Mize

    ReplyDelete
  7. Hi Brian:

    So glad you've found the book useful. I guess I should make my contact info easier to find :) You can email me here: http://www.elizabethcastro.com/epub/contact.html Blogger must've eaten your Google account info, because it didn't show up.

    So far, there's not away to span a photo across two pages (or do a landscape orientation at all). You're not the only one who wants to do it, though. iBooks, at least, now lets you double click a photo to see it full screen on the iPad, so maybe you could take advantage of that feature in your layout?

    best,
    Liz

    P.S. I think I need a bulletin board, actually.

    ReplyDelete
  8. Hi Liz

    You alluded to issues with the audio tag in iBooks ePubs on the iPad, and implied you would be following up on it? Do you have any more info on it.

    I'm working on an app that will allow end users to create epubs with audio and have seen issues with the audio. It plays but then you cannot replay the same clip without dragging the marker back to the beginning etc.

    Is this the same issue you have seen or something else?

    I'm not an iTunes Connect user so have not seen the Apple publisher guidelines, but wondered if they had any comments on how to overcome this?

    Thanks for all the great info. Have your EPUB book on my Safari bookshelf and it has been so helpful!!

    ReplyDelete
  9. One other comment regarding audio in iPad ibooks epubs.
    While it seems flaky on the iPad, it seems to work fine on my daughter's iPod Touch.!! Urgh!

    ReplyDelete
  10. Turns out the reason audio was not playing reliably on my iPad was because it was still running IOS3. Once I upgraded it to 4.2.1, audio seems to play great!

    ReplyDelete
  11. I have just created an enhanced ebook which is audio and text synchronized. Also it has a Read To Me feature which display the corresponding text when playing the audio. I tried to submit the epub book to iBookstore via lulu.com a few days ago. But unfortunately lulu.com has rejected my submission as at this time audio content does not pass validation on their side and hence they would not be able to submit my enhanced ebook to the iBookstore. I wonder if any of you could advise me how I can put this type of new iBooks (actually, I have run this on the iBooks application in my iPad and it works fine) to iBookstore. Thanks!

    Kevin
    (kevinkkkho@yahoo.com.hk)

    ReplyDelete
  12. @Kevin: A friend of mine, Christine Mark, has published a guide to using third parties to get ebooks into the iBookstore. You can find it here: http://www.gravityswitch.com/blog/guide-to-comparing-services-for-publishing-ebooks-to-ipad_119/

    You can also publish things to the iBookstore directly... it requires a US Tax ID, but that's not hard to get, other people in the UK have told me.

    ReplyDelete
  13. Thanks for your information. But do I need a US bank account?

    Regards,
    Kevin

    ReplyDelete
  14. @Kevin: Not according to the requirements listed on the iTunes Connect site. Go here: https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/wa/apply and then choose Books and continue to see Apple's official requirements for joining iTunes Connect

    ReplyDelete
  15. Hi Liz,

    I tried to apply an US Tax ID a few weeks ago, but still have no reply from the IR Department.

    As my epub book passed epubcheck1.0.5 and epucheck1.1, I submitted it to lulu.com 3 weeks ago, but recently they told me that the ebook may not pass Apple's new rule and may not be accepted by iBookstore.

    I recorded a demo and posted it on YouTube: http://www.youtube.com/watch?v=vU8BhuBkQZ8&feature=youtube_gdata

    Is it possible to submit to iBookstore? Grateful for your advice.

    Many thanks,
    Kevin

    ReplyDelete
  16. @Kevin: Wow, that's pretty cool. I'd love to see it if you want to share. Which rule wouldn't it pass? If it passes ePubCheck except for video/audio, Apple should accept it. Looks like there's some javascript in there too? Maybe you should give the US gov a call to see how the application is going.

    ReplyDelete
  17. It is what lulu said to me "Thank you for your email. Due to the new rules that have been implemented from iBookstore your epub will most likely be rejected. I recommend looking over the guidelines I have sent you and make sure that your epub follows those. Lulu will be sending out a mass email when epubs should be submitted once again." I have checked their guide line, but nothing special. Anyway, back to your question, I use HTML5 Canvas and Audio tags. Of cause, JavaScript is used to control the timeing and highlight sentences. By the way, thank you very much for your blog, I learn much technique from here ;)

    ReplyDelete
  18. Sebastian - Not in the USA? Want an EIN tax number.Go here, ring them up on the number given and get your EIN in approx 5mins over the phone.
    No expense.
    http://www.irs.gov/businesses/small/article/0,,id=97860,00.html

    ReplyDelete
  19. Thanks Titus. I finally got the EIN tax number via mail application. I will try to submit iBooks to Apple by myself later. Currently, I am constructing a web site to sell them online. :)

    Kevin

    ReplyDelete

More of my books