Tuesday, May 17, 2011

Audio and Video in EPUB - New Straight to the Point Miniguide #2

One of the most obvious and impressive advantages that electronic books have over their print counterparts is the ability to contain moving images and sound. While at first the EPUB spec didn't contemplate multimedia much at all, Apple's decision to use the new HTML5 video and audio elements in order to incorporate multimedia in ebooks clearly pushed the EPUB spec in that direction. Barnes & Noble now also supports these same tags for creating enhanced ebooks in its NOOK Color.

coverAVshadowMy new 29 page Audio and Video in EPUB miniguide explains just how to create enhanced ebooks with video and audio files, and includes information about how to choose and set the aspect ratio, format, and size, and then how to embed these multimedia files into EPUB format ebooks that look beautiful and play properly in iPad, iPhone, iPod touch, and also in Barnes & Noble's new NOOK Color.

With the information and techniques you'll learn in my Audio and Video in EPUB miniguide, you'll be able to create enhanced ebooks that satisfy Apple's requirements for the iBookstore, and if Barnes & Noble ever accepts enhanced ebooks from independent and self-publishers, which it doesn't yet, but it may someday, your code will pass muster there as well. Of course, you can also sell ebooks directly from your own website (as I do), and thanks to this guide, they'll look good in whatever ereader your audience has.

One of the cool things about tablets like the iPad and NOOK Color is that they make sense for viewing so-called tall screen video, which is taller than it is wide. Tall screen video is great for showing things that are, well, tall. Imagine a video of the Empire State Building or Gaudí's Sagrada Família. Part of this Audio Video miniguide explains how you can create and insert tall screen video in ebooks that again, work in both iOS devices and the NOOK Color.

The Audio and Video in EPUB miniguide costs $5, and includes the 29 page miniguide in EPUB and PDF formats plus several example EPUB files. You can unzip any of the files to look at the code they contain. It is only available directly from me. I hope you enjoy it. One of the things that I love about EPUB is that it enables us all to publish books with very little infrastructure or up-front investment. I think it's about time we were able to create enhanced ebooks as well.

I thought a long time about whether to offer this miniguide for free like I did the Fixed Layout Miniguide in the hopes of encouraging people to buy my EPUB Straight to the Point book. In the end, however, I've decided that this miniguide is worth every penny and more of the $5 I'm asking for it. I hope you'll agree.

As always your comments are more than welcome.

65 comments:

  1. Way to go Liz! Loving this! I'd happily pay 5$ for it!

    ReplyDelete
  2. Well worth $5...well worth $25 dollars!
    Thanks for making life a little bit easier once more. :)

    ReplyDelete
  3. Perfect timing! I recently purchased Al Gore's "Our Choice" app (really an app, not an ebook) and it made me appreciate how the effectiveness of an educational ebook can be enhanced by well-integrated video and audio. It's great to have instructions for how to implement these features in ePUB, which I am planning to do for my first ebook project.

    ReplyDelete
  4. Hello Elizabeth,

    I want to create simple "quiz" ebooks (books containing with fill in the blanks, true/false type exercises) in EPUB format for my iPad. My question is whether its possible to create such type of ebooks in EPUB? I read the Table of Contents of your book "EPUB: Straight to the Point" but I didn't find the information whether such functionality is possible with EPUB books.

    Looking forward to your reply. :)

    ReplyDelete
  5. Karn Chandra,

    I think that a fill-in-the-blanks scenario would require JQuery or something similar to function within an EPUB format. One example of some tests of this sort of thing can be found at http://www.sunbi.co.jp/?download=jQuery_20110310.epub

    ReplyDelete
  6. I am a teacher, and I have been creating simple digital texts for my students using Word and PDFPen Pro. However, these have never really satisfied me. These latest developments are really exciting, and I want to create ePub documents for my students. Before I purchase your miniguide and dive into a project, however, I need to know that all of my students will be able to open, read, and interact with the text. Can an ePub document be read on a Windows machine as well as an Apple? Can an ePub work on an iPhone and iPad?

    Thanks in advance for your response!

    ReplyDelete
  7. @Anonymous: EPUB definitely works on iPhone and iPad, complete with video and audio as described in my guide. The only other EPUB ereader that I've tested with video and audio is NOOK Color.

    Desktop EPUB-compatible ereaders are trickier. They exist, but they don't always support the same features. Stanza is lovely on iPhone (though it doesn't support video) but terrible on Mac. There are also web-based ereaders, but I just tried IbisReader to see if it supports video, and it doesn't (yet?). Nook for Mac doesn't support video or audio (though it does pretty well with images, text, and styling). I also often use Lucifox (an extension to Firefox) that opens EPUB in the browser (for Mac and PC).

    I honestly don't know of any desktop reader that supports video.

    ReplyDelete
  8. Thanks for your quick reply. Is there a different format that you would recommend? What I am hoping to do is take the text of something like Macbeth and supplement it with short video files, explanatory notes, hyperlinks, and maybe fixed textboxes in which a student might answer a prompt. I really appreciate your advice.

    ReplyDelete
  9. @Matt: And it has to be available on a PC? Would a website not do the trick?

    If you're going for a book, I'd definitely do EPUB. It's the best thing going.

    ReplyDelete
  10. I have used iWeb to create a course website, but I had not thought of using it for the actual book. How would a student go from one page to the next? I hate to take up so much of your time, but no one at my school has any idea what I am talking about!

    ReplyDelete
  11. @Matt: Seems like a wiki might do the trick. I like PMwiki, it's not too hard to set up. And the kids themselves could collaborate--if you wanted them to.

    ReplyDelete
  12. I've used a wiki before, although it did not look anywhere near as nice as the one you directed me to. I noticed that you used iWeb for your page about your apartment (very nice, by the way). Would you avoid iWeb for the purposes I listed?

    Thanks for everything.

    ReplyDelete
  13. Regarding desktop EPUB-compatible ereaders, I often use the Firefox add-on EPUBReader. With this one, you can't play a video embedded, but clicking on it a pop-up window appears from where you can visualize the video.

    ReplyDelete
  14. My thanks to both of you for your advice. I have bookmarked this site, and I will return to it often. I will be back to purchase your book and to ask more questions!

    In the meantime, I need to start shopping for an application so that I can start creating my documents. Which do you recommend?

    ReplyDelete
  15. I have your E Pub Straight to the Point -which is fantastic. Is the mini guide 2 something extra or is this info already in the first book?

    Thanks
    Liz Fraser

    ReplyDelete
  16. @Liz: The book has a short overview of adding video. The AV Miniguide covers the topic much more in depth, with much more up-to-date information, and also includes info on audio and NOOK Color. The Fixed Layout Miniguide is also extra, but is free to anyone who has already bought the book (I just need a proof of purchase).

    ReplyDelete
  17. I'm curious if you have seen any epub 3.x compliant eamples yet, which show off media-overlay sync capabilites?

    ReplyDelete
  18. Can one link to an external javascript file using something similar to
    a href="file.js"? Every time I try linking to an external javascript file it fails epubcheck. Does an epub not have to pass epubcheck to be accepted to iBooks?

    The reason I'm asking is I would like to put my popups and (hopefully) sound javascript in one external file.

    ReplyDelete
  19. @Anonymous: I have seen Javascript declared in the manifest as "text/plain", does that help?

    ReplyDelete
  20. Hi Liz - any thoughts on the e-pub for Android tablet scene at the moment? Do the workflows in your e-pub books apply to Android as much as iPad? Best wishes MH

    ReplyDelete
  21. Hi Liz,

    Will the miniguide #2 tell me about how to incorporate videos into Apple's Pages to produce epubs that pass epubchecker?
    Thanks,
    Robin

    ReplyDelete
  22. Hi Liz, is Straight to the Point, Fixed Layout, and Audio and Video books hard copy are or can we buy them as e-books? I want to buy so would appreciate knowing which. MH

    ReplyDelete
  23. Hi @Anonymous. EPUB Straight to the Point is available in EPUB version from my site, and in print on Amazon, Barnes and Noble, and in local bookstores. Peachpit Press (my publisher for this book) sells EPUB, PDF, and print versions.

    Both miniguides are available only in EPUB and PDF, and only from my site:
    Audio and Video in EPUB and Fixed Layout

    ReplyDelete
  24. Liz,

    I brought both “Audio and Video in EPUB” and “Fixed layout EPUBS” miniguide. I was able to add an audio to a fixed layout ePUB for an iBook I was creating, but the only problem was that the audio controller is very small and is located at the very top of the page. Is there any way to control the location of the audio play and make it bigger!

    Thanks

    ReplyDelete
  25. Hi Liz,

    New here, terrific site and resources. I've been an iPad App Developer for sometime, but am interested in expanding into enhanced picture books for iBook and Nook color. I didn't realize that Apple had finally opened the door to small publishers for enhanced Children's picture books. How does B&N handle submissions for these on Nook? I figure it's different then say App development for Nook Color (aka Angry Bird type apps). And would you say InDesign CS5 would be the best choice for such 'semi' interactive picture books?

    Thanks,
    B

    ReplyDelete
  26. Hi Brendan: Welcome and thanks for the kind words. B&N doesn't accept enhanced ebooks from independent publishers, unfortunately. I give instructions for keeping enhanced EPUBs compatible with NOOK Color because it makes sense to be ready, and to make your book as universally supported as possible.

    And no, InDesign is not that great for creating Fixed Layout books. I end up doing most of the coding by hand since it's all absolute positioning. InDesign is much better at regular, flowable EPUBs.

    ReplyDelete
  27. Liz, glad I found you.
    I understand you will be creating another mini guide for read and listen a.k.a. Read-aloud books (iBooks). Do it fast, ok? No pressure, but can I buy it by Friday?
    I hope your book covers how to DIY add VoiceOver file(s), how to highlight the word read (like Daisy on iBooks), how to do this with image books (pictureu books) only (if possible) and how to do it with mostly image-some text.
    My goal is short picture books read aloud.. Few words, outstanding art, unforgettable stories and most of all FREE.

    ReplyDelete
  28. Hi Fairview. It is coming and it will have all that, but... it won't be Friday :) Stay tuned!

    ReplyDelete
  29. I wish this guide had included more information on using InDesign CS5.5 to include video since your "Straight to the Point" book relied on InDesign so heavily. Although it appears easy to embed video with CS5.5, all the features don't seem to work as described...in particular poster framing with multiple videos. It would be nice to see some more information about how to control the display and location of videos with InDesign CS5.5 in a future update to this miniguide. Thanks, as always, for posting it since there is barely any info out there on this topic!

    ReplyDelete
  30. Hi Liz,
    Been following your blog for awhile--thanks for your great info!

    I've followed your instructions in this ebook, but still get a merely a black box, with a slashed out play button. *whine* Did my coding in Dreamweaver and my video conversion in Adobe Premiere. Have you ever gotten this dreaded black box and how did you troubleshoot it?

    Could it be the poster size is wrong? I left that off b/c I could tell how to write it in regard to the {}. Should the

    {width: 368px; height: 207px}

    be inserted like this?

    div.video {width: 368px; height: 207px}{
    text-align: center; margin-left: auto; margin-right: auto; }
    video {
    margin-left: auto; margin-right: auto;
    }

    ReplyDelete
  31. I have the same issue as above. I just tried the example ePub included in the mini guide and neither the video or audio one play. I am running iOS 5 beta 5. Not sure if that could be causing any issues.

    ReplyDelete
  32. @Anon Pretty sure the iOS5 beta is the issue. Someone else had this problem and when they updated iBooks, it was solved. Let me know.

    ReplyDelete
  33. Hi ! You talk about iPad and Nook Color, but what about the Kindle ? Any news ?

    ReplyDelete
  34. iOS 5 beta 6 fixes the issue

    ReplyDelete
  35. @Liz - How goes it on the mini-guide for implementing read-aloud?

    ReplyDelete
  36. Read Aloud EPUB for iBooks: http://store.kagi.com/cgi-bin/store.cgi?storeID=6FHNX_LIVE&page=ReadAloudMG&lang=en

    ReplyDelete
  37. I am confused with using the code for adding video for use on the Color Nook, will the Nook display it at this time (so far in my test the video doesn't show up), or is this a feature that we hope B&N will open up later? I am still awaiting arrival of a iPad our shop ordered up for ePub testing. Would like to figure out where I am going wrong on the adding video, I am also using InDesign CS5.5 with the interactive/media, but notice your code is different from what Adobe has show up in the epub file.

    ReplyDelete
  38. Hi Doug: Yes, the Nook will display it right away. The caveat is that to my knowledge Barnes & Noble's PubIt program is not accepting books with audio and video from self or independent publishers.

    I do mean to do a new guide on CS5.5 but haven't gotten there yet.

    ReplyDelete
  39. Hi Liz,

    What is purpose of using pagelist in epubs?

    ReplyDelete
  40. Hey Liz,

    This miniguide sounds like it will help me. I am trying to do a Spanish language ebook. So, for the vocabulary sections, I want the reader to click on an icon and hear me say the vocabulary word. I know that there will be hundreds of small audio clips. Will your miniguide help me in this area to set up the ebook?

    ReplyDelete
  41. @Mark: Yup, sounds like a perfect match.

    ReplyDelete
  42. One more question Liz. I have a mac and I have a program called pages. I already know that I can imbed audio files in that program. Pages allows you to export the file as an epub. The problem I have is that I can't find a way to see what the reader will see. I don't have an ipad or iphone. The iworks program allows you to view the epub file but you still can't see or play any of the audio clips. This is my biggest problem. In your miniguide, do you show how authors can preview the epub with the audio files? I hope I was clear in my explanation.

    ReplyDelete
  43. Hi Liz, thanks for your blog and your Straight to the Point and Miniguides - they are all excellent resources which I have found very helpful. I am creating a language-learning book which has many audio files (total 49MB). However I am finding that the time that it takes to navigate to a page in another chapter, is very long. Single page-turning is ok if it's within a given chapter, but if I use the slider at the bottom of the page to go to another chapter, it can take up to 24 seconds, too long! Selecting a link in the TOC is also very slow. Would you have any ideas as to how I could get around this?

    ReplyDelete
  44. Hi Liz,
    If we are unable to create a enhanced ebooks for the Nook Color, is there information on how to convert an epub to an Andriod app?

    ReplyDelete
  45. can I add narration to my books witch will follow the pages?

    ReplyDelete
  46. @anon : yes, for adding narration, I recommend my Read Aloud EPUB book.

    ReplyDelete
  47. Hi, Liz, I have your AV mini-guide (in fact, all your ePub books/guides -- thanks for the EXCELLENT resources).

    Following your examples (I think!!), I have placed a couple of videos in my ePub, and they play just fine in the book (when loaded onto my iPad via iTunes). However, the videos get errors from ePubCheck (v1.2). Is there a way to fix that error ... or can it simply be ignored??

    ReplyDelete
  48. @Keri: EpubCheck 1.2 checks against EPUB 2 which doesn't recognize audio or video. But Apple does, so if those are the only errors you're getting, for Apple at least, it's not a problem. Ignore them!

    ReplyDelete
  49. The features text-to-speech, voice aloud and media overlay are included in the book?

    ReplyDelete
    Replies
    1. Read aloud and Media overlays are covered in Read Aloud EPUB: http://store.kagi.com/cgi-bin/store.cgi?storeID=6FHNX_LIVE&page=ReadAloudMG&lang=en

      iBooks doesn't do automated text-to-speech, only Read Aloud.

      Delete
  50. Hello - I am a beginner and just bought your miniguide for audio. However what I think I need are clear instructions on how to add read aloud after creating a project in BOOK CREATOR. My project is AUDIO FIRST - with continuous music and narration leading the way - almost 'audio with text accompaniment'. I'll keep the text part as simple as possible, with text over background images - but basically need the text and audio to be connected and flow together - stopping and starting on a word and bookmarking would be great. Do you think it is possible? - i.e. create the basic book in BOOK CREATOR and then add READ ALOUD function afterwards? - and then... clear instructions please... as simple and direct as possible. Thanks!!

    ReplyDelete
  51. Hi Chris: Yes, it is definitely possible. Take a look at my Read Aloud EPUB guide (available in print and electronic editions)... and then just adapt the first section that explains how to create the fixed layout book itself, since you'll be doing that part with Book Creator.

    Hope that's helpful!

    ReplyDelete
  52. We have an epub2 book testing out well on the ipad. We used some of your tools [straight to the point, fixed layout] to make our interactive book for ipad. We are using xhtml and css coding [some java scripts] exclusively. We have not reviewed your procedure [compared with our coding] for using audio and video. Our audio is working pefectly with our ipad test. But it failed with epubcheck for audio. I note you indicated itunes will accept audio with epub2 even though if fails epubcheck and isn't supported by epub2. I am concerned about spending more time completing the book, purchasing an isbn and having this fail with apple's review. Is there any way to confirm the audio will be accepted prior to submission to itunes? It is the only thing that failed epubcheck. Thanks

    ReplyDelete
    Replies
    1. As long as audio and video are only errors, you should be ok.

      Delete
    2. Thank you Liz
      Are there other tests we should run this through before sending it to itunes - other than epubcheck?

      Does this need to run through itunes producer for a check? One of our friends ran it though producer [via her mac] and found errors, which have been since corrected. Our last test was epubcheck. We have a PC.

      Delete
    3. EpubCheck should be enough. When you upload with iTunes Producer, that program will also do a check--not sure what it catches besides what's in EpubCheck. Good question.

      Delete
  53. Hi Liz
    I need your help again.
    We are using some of your guides for fixed epub or ibooks. We are using xhtml, css and java scripts to do this. Your guides have been great. We have a very interactive book and all functions well in ibooks. We are having some epubcheck failures.

    We want to have a button that will pop up a new window or frame on the page if it is clicked. This window could have a new photo or text in it. We are following the directions in apple's epub guide 4.8. But our epub book fails the test for this feature.

    We are using ontouchstart in to run a javascript function. Epubcheck flags this as "ontouchstart not allowed here". Is this a false positive on epubcheck or how can we accomplish this feature?

    Thanks so much
    D

    ReplyDelete
    Replies
    1. I would try putting all your javascript in an external file. That's what I did with Barcelona Beyond Gaudí to avoid those errors and it worked fine.

      Delete
  54. There was no javascript error it was an error on the coding for "ontouchstart" Our epubcheck error was "ontouchstart not allowed here"
    Our line coding was...
    img src="mypicture.jpg" alt="mypicture" ontouchstart="prevent(event);"

    Thank you for getting back to me.
    D

    ReplyDelete
  55. Hello, I finished a book in Book Creator and would like to get it published through Lulu.com. I do not think they support it having audio. Is there a way to have audio added to my book through Lulu? I can add the audio through the Book Creator app but somehow cannot figure out how to add it to have it formatted through Lulu. Any help is appreciated. Thank you.

    John

    ReplyDelete
  56. In the thicket of the audio file…

    Hello Liz,

    I purchased your EPUB audio/video guide. It’s a great, useful resource, but I wanted to touch upon an issue that you don’t talk about: The Apple spec for audio playback is 8 to 320 kbps, which pretty much leaves out any song on my ITunes list. If these are the file limits, what can we play back on the IPAD besides single words (such as your example)? Do we need to compress existing files and cut down their file size? Are the 8 to 320 limits something we should be aware when embedding files on our EPUBs, or does this spec refer to audio files downloaded in real time from a publisher’s server or other source? One more thing: I currently don’t have wireless for my IPAD, --if this were the problem-- why would this affect the playback of audio files embedded in an EPUB from my computer? I am not pulling any resource from anywhere, and I am not relying on a ‘helper’ application…

    Cheers,
    Ramiro

    ReplyDelete
  57. Liz,
    You are right!! the $5 is mere fraction of the value for time saved. thank you so much and keep up the great writing.

    Leon White

    ReplyDelete
  58. Hi Liz! This is great, I got my audio (mp3) file to work/play in iBooks -- at least it works in that (that's the only device I have) -- but now my epub doesn't validate, I get all sorts of errors related to the code.

    Is there any way -- even a hack -- to get my epub to validate now?

    Thanks!

    Ron :)

    ReplyDelete
    Replies
    1. Unfortunately, I don't know how to go about that -- I've been using Sigil to create my books. Is there something I can "do" to them -- like, design them in Sigil (ignoring the error for the one audio file I have in this book) -- and then "convert" it somehow to epub3? I've never done anything in epub3, and I'm not even sure what all is different in that -- for all I know, all the coding that I've done as epub2 could be totally different or something.

      Delete

More of my books