Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 01-07-2026, 01:05 PM   #61
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 81,908
Karma: 150266009
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by eroica20 View Post
I’ve played around with embedding video in epub3 format before, but ran into a lot of compatibility headaches. Some apps like Apple Books worked okay, but on other platforms the video just showed up as a missing file or a blank space. I wanted to include video for an instructional ebook, but honestly, it felt like every device and reader had its own quirks. Even if the file size was small, getting that video to play everywhere was rough.
That's because not every program has support for video. And a lot of people read on an eInk device such as a Kobo, Kindle, Pocketbook, etc. which doesn't have support for video. Some eInk Readers might support video, most don't.

IMHO, video is a lost cause. Same with audio.
JSWolf is offline   Reply With Quote
Old 01-07-2026, 08:51 PM   #62
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,454
Karma: 20534347
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Or......

Just follow me for a minute here.....

You code so that the audio/video is shown on devices that support it, and, wait for it..... devices that don't show it have some alternate content - or ignore it completely.
Turtle91 is online now   Reply With Quote
Advert
Old 01-07-2026, 09:02 PM   #63
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,907
Karma: 8987599
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by eroica20 View Post
I’ve played around with embedding video in epub3 format before, but ran into a lot of compatibility headaches. Some apps like Apple Books worked okay, but on other platforms the video just showed up as a missing file or a blank space. I wanted to include video for an instructional ebook, but honestly, it felt like every device and reader had its own quirks. Even if the file size was small, getting that video to play everywhere was rough.
Do the try with the following code (maybe one of the two methods works in your ereader):

1) In your xhtml file:

Code:
<body>
  <div style="text-align: center; padding: 0pt; margin: 0pt;">
    <svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 600 600" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink"><foreignObject x="0" y="0" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" class="sound">
      <audio controls="controls" src="../Audio/Track18.mp3" class="sound"></audio>
    </div></foreignObject>

    <foreignObject x="0" y="80" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" class="full">
      <video controls="" src="../Video/screencast.mp4" class="full"></video>
    </div></foreignObject></svg>
  </div>

  <div class="center">
    <div class="inblock">
      <audio class="sound" controls="controls" src="../Audio/Track18.mp3">Track18</audio>

      <div style="width: 100%; margin: 0 auto;">
        <video controls="controls" style="width: 100%" src="../Video/screencast.mp4">If you read this, then your ereader doesn't support video.</video>
      </div>
    </div>
  </div>
</body>
and in your css file:

Code:
.center {
    text-align: center;
}

.inblock {
    display: inline-block;
    width: 100%;
    margin: 1em 0;
}

.sound {
    width: 100%;
    margin-bottom: 1em;
}

.full {
    width: 100%;
    height: auto;
}
As you can see, one method is based on a svg wrapper plus the use of the foreinObject tag; this is a nice method because with it, you can adjust the viewport with the resolution of the video. But both methods work fine under Sigil, Calibre, Thorium, Lithium, Reasily, Infinity Reader and Cantook; there are issues under PocketBook. Forget Google Play Books, there epub3 doesn't work.
RbnJrg is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can you embed video in an epub document? patrickyoung ePub 26 03-19-2019 12:56 AM
embed video BetterRed Sigil 1 11-30-2014 10:58 PM
trouble uploading epub with video embed on kindle cykwon Amazon Kindle 4 10-06-2011 02:26 AM
Embed other video file types daffy4u Feedback 8 02-09-2010 10:46 AM


All times are GMT -4. The time now is 04:04 PM.


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