Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 12-11-2018, 07:40 AM   #1
patrickyoung
Member
patrickyoung began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jan 2012
Device: Nook
How can you embed video in an epub document?

We’re trying to produce an epub document that includes videos hosted on YouTube. Can this be done? Ideally, we’d like to have a page that includes a video thumbnail. When you click the thumbnail, the video will play (because the reader will be online). We tried embedding the video itself but that made the document file size too big. We’re hoping to include 20 – 30 videos in the document. Any help much appreciated.
patrickyoung is offline   Reply With Quote
Old 12-11-2018, 08:47 AM   #2
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 1,154
Karma: 6100569
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by patrickyoung View Post
How can you embed video in an epub document? [...] We tried embedding the video itself but that made the document file size too big. We’re hoping to include 20 – 30 videos in the document.
Looks like you already solved the video-in-EPUB problem, but just for future reference, the "EPUB3 Samples Page" has an EPUB with <audio> and <video>.

Quote:
Originally Posted by patrickyoung View Post
We’re trying to produce an epub document that includes videos hosted on YouTube. Can this be done?
Not in a way that's supported by any real devices.

See discussion of remote-resources in the "epub3 kobo external video opf issue" thread.

EPUBs (and reading systems) realistically need to be self-contained, and include everything within the EPUB file.

Quote:
Originally Posted by patrickyoung View Post
Ideally, we’d like to have a page that includes a video thumbnail. When you click the thumbnail, the video will play (because the reader will be online).
You can't assume people will be reading with a device that's online (think train/plane, remote location, or older device). Also, many ereaders are not capable of playing video (e-ink). You'll need fallbacks, and/or reasonable alternatives (hyperlinks + video titles that can be read/typed out).

Most importantly, Hitch's post #22 from the above topic:

Quote:
Originally Posted by Hitch View Post
Perhaps I'm just dense, but as the videos are being hosted remotely--or that's the idea--why not just use a link to the hosted URL? Those people with devices that can play video also have browser-capability, and could then just as easily click a link and play the video from Youtube, Vimeo, etc.

I realize it's not as "slick" as having it play right inside the book, but I don't know that there's a way around your dilemma. All things considered, I mean. The link option has about as many pros and cons as does the idea of remotely hosting video; neither will work if there's no Net/wifi capability, and both will result in the video only being played in those devices that have the capability, and both will NOT cause those readers with eINks to pull their hair out.
And I stress this quite often, but Link Rot is a serious issue in ebooks. Hosting important material like that remotely is just asking for trouble, especially with how takedown-happy Youtube has been lately.

Last edited by Tex2002ans; 12-11-2018 at 09:00 AM.
Tex2002ans is offline   Reply With Quote
Advert
Old 12-12-2018, 02:20 PM   #3
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 84,937
Karma: 79555964
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
It strikes me that a resource intended to be only read on a device which is online and requiring to link to video would perhaps best be implemented as a web site.
HarryT is offline   Reply With Quote
Old 03-14-2019, 03:04 AM   #4
patrickyoung
Member
patrickyoung began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jan 2012
Device: Nook
We had considered the idea of hyperlinks to YouTube. But as its been pointed out YouTube can do whatever it likes with the videos, for example take them down, without us having any control. I think we can compress the video sizes to about 1MB. Is there any way to embed them into a page?
patrickyoung is offline   Reply With Quote
Old 03-14-2019, 04:47 PM   #5
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 5,564
Karma: 25303977
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Aura One, Aura H2O, Aura HD, Nexus 7 HD, iPad Air, Tolino epos
Quote:
Originally Posted by patrickyoung View Post
We had considered the idea of hyperlinks to YouTube. But as its been pointed out YouTube can do whatever it likes with the videos, for example take them down, without us having any control. I think we can compress the video sizes to about 1MB. Is there any way to embed them into a page?
You can embed some video formats (MP4 and/or WebM) in an epub3 document. Now finding an epub3 renderer with a display that will handle video and audio output capability? That's a whole other can of worms.

You can check the IDPF/epub3-samples for a sample epub3 with video which is a few years old but does work.

Edit: I was going to attach a sample but it clocks in at over 30MB.

Last edited by DNSB; 03-14-2019 at 04:51 PM.
DNSB is offline   Reply With Quote
Advert
Old 03-14-2019, 05:20 PM   #6
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,001
Karma: 3598443
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by DNSB View Post
Now finding an epub3 renderer with a display that will handle video and audio output capability? That's a whole other can of worms.
As e-ink reader, you have Kobo. And as an android reader, you have PocketBook and Gitden.
RbnJrg is offline   Reply With Quote
Old 03-14-2019, 06:17 PM   #7
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 84,937
Karma: 79555964
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Kobo eInk devices will play video?
HarryT is offline   Reply With Quote
Old 03-14-2019, 10:53 PM   #8
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 7,343
Karma: 65872031
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, and NookColor. 2 Droid, 1 Win8 ePUB rdrs
Quote:
Originally Posted by patrickyoung View Post
We had considered the idea of hyperlinks to YouTube. But as its been pointed out YouTube can do whatever it likes with the videos, for example take them down, without us having any control. I think we can compress the video sizes to about 1MB. Is there any way to embed them into a page?
Yes, you can embed them, but you are pushing a chain up a hill. Basically, the only player that has the horsepower to play this is the Books, f/k/a iBooks app on the iOS/iTunes platform, and that's the smallest bookstore in the business. Half of all eReaders don't have browsers, and half can't play videos, even if they're embedded. On top of that, you'll break older devices, because you'll break the per-html-file size limitations.

Other than that, yeah, it's a great idea. (not really). If you're worried about Youtube, etc., then host them on your OWN site, which doesn't take a lot to do. That won't solve the whole "half of all eReaders can't play these" problem, but, you won't be dealing with your Youtube fears--which, BTW, unless you're posting horrific content, I wouldn't really worry about very much.

Hitch'
Hitch is offline   Reply With Quote
Old 03-14-2019, 11:45 PM   #9
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 5,564
Karma: 25303977
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Aura One, Aura H2O, Aura HD, Nexus 7 HD, iPad Air, Tolino epos
Quote:
Originally Posted by RbnJrg View Post
As e-ink reader, you have Kobo. And as an android reader, you have PocketBook and Gitden.
Have you ever watched a video on a 16 grey level eInk screen? Just under 2 frames per second? Of course, we could go for faster screen refreshes using A2 mode and dithering but that involved an fairly massive quality loss. Given that A2 mode refreshes around 125 ms giving a massive 8 frames per second, video is not going to look very smooth. Not to mention that since Kobo ereaders do not have audio outputs, you are not going to hear any audio.

See Dithering Implementation for Eink Display Panel for more information. You can google for even more information though that paper does a decent job of covering the basics.

As another way of displaying audio/video in epub3 files, you can play the videos in Sigil though it does insist on adding the backwards compatible toc.ncx file to epub3 documents.

Quote:
Originally Posted by patrickyoung View Post
We had considered the idea of hyperlinks to YouTube. But as its been pointed out YouTube can do whatever it likes with the videos, for example take them down, without us having any control. I think we can compress the video sizes to about 1MB. Is there any way to embed them into a page?
Not absolutely certain what you mean by embedding the video in a page. Video files in an epub document are stored external to the html page and are referred to by links. Pretty much exactly the same as referencing an image. I suppose you could Base64 encode the images and place them directly in the html code but I haven't seen Base64 encoded images used in quite a few years. If nothing else, they take much more space than the original image in return for only need one GET to grab the whole page with images.

Last edited by DNSB; 03-14-2019 at 11:57 PM. Reason: Fat fingers cause typos...
DNSB is offline   Reply With Quote
Old 03-15-2019, 12:08 AM   #10
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 5,564
Karma: 25303977
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Aura One, Aura H2O, Aura HD, Nexus 7 HD, iPad Air, Tolino epos
Quote:
Originally Posted by HarryT View Post
Kobo eInk devices will play video?
The samples I've tried fail somewhat gracefully. For the most part, there is an embedded error mesage . The one I'm looking at is "Your reading system does not support (this) video". The play/pause/mute/unmute controls do show up.

Considering how under-powered the CPU and GPU in most eInk ereaders are, I suspect that embedded video was not high on the we need to support this feature list.
DNSB is offline   Reply With Quote
Old 03-15-2019, 12:43 AM   #11
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 7,343
Karma: 65872031
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, and NookColor. 2 Droid, 1 Win8 ePUB rdrs
Quote:
Originally Posted by DNSB View Post

{snippage for space}

Not absolutely certain what you mean by embedding the video in a page. Video files in an epub document are stored external to the html page and are referred to by links. Pretty much exactly the same as referencing an image. I suppose you could Base64 encode the images and place them directly in the html code but I haven't seen Base64 encoded images used in quite a few years. If nothing else, they take much more space than the original image in return for only need one GET to grab the whole page with images.
Well, no--you CAN, actually, embed the entire video into an ePUB, rather than calling it from an external link, and use the device's built-in player. Most ebooks do actually link to videos stored on HTML webpages, with players, as you note--but it is entirely possible to embed the entire video into the ePUB. We've done it, more than once. I don't recommend it, for a zillion reasons. But it's certainly doable. This article on our site shows a book we made dog's years ago (2013, if memory serves): http://www.booknook.biz/ebook-sizes-...ipad-book-size and that's embedded video right there.

It's not very kind to the poor bastards that have to download the eBook, either, given how much size video adds to eBooks. As well.

Hitch
Hitch is offline   Reply With Quote
Old 03-15-2019, 07:24 AM   #12
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,001
Karma: 3598443
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by HarryT View Post
Kobo eInk devices will play video?
Yes, it has a quite good support for epub3 features, not only video.
RbnJrg is offline   Reply With Quote
Old 03-15-2019, 07:30 AM   #13
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,001
Karma: 3598443
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by DNSB View Post
The samples I've tried fail somewhat gracefully. For the most part, there is an embedded error mesage . The one I'm looking at is "Your reading system does not support (this) video". The play/pause/mute/unmute controls do show up.
I don't know what model you have, but Jackie told us that her Kobo passed very well the epub3 tests; watch the following posts:

https://www.mobileread.com/forums/sh...96&postcount=6

https://www.mobileread.com/forums/sh...18&postcount=7
RbnJrg is offline   Reply With Quote
Old 03-15-2019, 07:42 AM   #14
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,001
Karma: 3598443
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by DNSB View Post
Have you ever watched a video on a 16 grey level eInk screen? Just under 2 frames per second? Of course, we could go for faster screen refreshes using A2 mode and dithering but that involved an fairly massive quality loss. Given that A2 mode refreshes around 125 ms giving a massive 8 frames per second, video is not going to look very smooth. Not to mention that since Kobo ereaders do not have audio outputs, you are not going to hear any audio.
Can Kobo plays videos? Yes, it can. Does the video look well? Depend on the video. Not all videos will be movies. There are many instructive videos with just a few plain colors. And without voice.
RbnJrg is offline   Reply With Quote
Old 03-15-2019, 10:03 AM   #15
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 4,763
Karma: 11363127
Join Date: Sep 2009
Location: UK
Device: PRS-350, Kobo: Aura6", H2O, GloHD, KA1, ClaraHD, Forma
Quote:
Originally Posted by RbnJrg View Post
I don't know what model you have, but Jackie told us that her Kobo passed very well the epub3 tests; watch the following posts:

https://www.mobileread.com/forums/sh...96&postcount=6

https://www.mobileread.com/forums/sh...18&postcount=7
Since I've been quoted here I think it's only fair that I clarify. Neither of the two epub3s I tested on the Kobo eink (epub30-test-0101 from your first link plus the one you sent via PM) actually contained any audio/video content.

@DNSB is also a Kobo power user so I'd have no reason to doubt anything he's said above.
jackie_w is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
embed video BetterRed Sigil 1 11-30-2014 09:58 PM
embed video in Kindle/mobi? pete5609 Kindle Formats 10 06-09-2014 03:45 PM
trouble uploading epub with video embed on kindle cykwon Amazon Kindle 4 10-06-2011 01:26 AM
Embed other video file types daffy4u Feedback 8 02-09-2010 09:46 AM


All times are GMT -4. The time now is 09:55 AM.


MobileRead.com is a privately owned, operated and funded community.