07-29-2021, 02:21 AM | #1 |
Enthusiast
Posts: 36
Karma: 82258
Join Date: May 2021
Device: kindle
|
Embedding audio/video in epub files
Has anyone done this? I have been searching around for a solution. Just wondering if anyone here does it? I posted in the Sigil forum as that is what I primarily use. Apologies if it should go somewhere else.
I read this: https://ebookflightdeck.com/handbook/media - Seems interesting. Also I have never created an epub 3 file yet so it is a little daunting. What is your process for this, if you have done it? Would be interesting to hear your thoughts. Thank you |
07-29-2021, 08:32 AM | #2 |
Sigil Developer
Posts: 7,849
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Yes epub3 officially supports some specific audio and video file types. Adding media files is quite easy in Sigil using the Add Existing menu. You can also use the Insert Link menu item. Standard html5 audio and video tags work. There are sample epubs that have been posted to Sigil in the past. Search the Sigil and epub forums here.
The real question is what e-readers support it. Last edited by KevinH; 07-29-2021 at 09:38 AM. |
Advert | |
|
07-29-2021, 01:10 PM | #3 | |
Sigil Developer
Posts: 7,849
Karma: 5449552
Join Date: Nov 2009
Device: many
|
I just found that Video mp4 is very broken on the latest Sigil builds because our custom url handler does not properly handle byte ranges that only get used for audio and video when loaded via a custom scheme:.
Here is a related bug report: Quote:
|
|
07-29-2021, 01:57 PM | #4 |
Sigil Developer
Posts: 7,849
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Okay that is a Qt QWebEngine/Chromium bug that impacts only audio and video that uses proprietary codecs and a custom scheme handler.
I have added a workaround our URLSchemeHandler to redirect them as file: scheme urls to prevent the partial byte range requests as there appears no way to handle them inside QtWebengine. This has been pushed to master so mp4 videos now work again in Sigil's Preview in the next release. WebM videos should work already. |
08-01-2021, 06:58 AM | #5 | ||
Connoisseur
Posts: 58
Karma: 438844
Join Date: Aug 2019
Device: PC, Linux Mint, Tablet, and Telephone
|
Quote:
Quote:
Code:
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>EPUB Video Example</title> <style> /* fixed-ratio-resize basic responsive class */ .frr { max-width: 100%; height: auto; width: auto\9; /* IE8 */ } </style> </head> <body> <p>This is a working EPUB video that could work in an EPUB reader</p> <video id="video01" class="frr" controls="controls" autoplay="" poster="../Images/PosterCC.jpg"> <!-- MP4 must be first for iPad! --> <source src="../Video/shared-culture.mp4" type="video/mp4" /> <!-- Needed for EPUB reader --> <source src="../Video/shared-culture.webm" type="video/webm" /> <!-- Will automatically add sub-titling button to controls --> <!-- Only vtt is supported --> <track label="Nederlands" kind="subtitles" srclang="nl" src="../Video/cc-en.vtt" /> <track label="Frans" kind="subtitles" srclang="fr" src="../Video/cc-fr.vtt" /> There is video content at this location that is not currently supported on your device. Please visit our website, <a href="http://www.example.com">www.example.com</a>, to watch the videos on your computer. </video> <p>You can refer in both the source and track elements to a web location.</p> </body> </html>
So far, there are standard options. The big challenge arises when you want to embellish your video player with bells and whistles. After trying a dozen HTML5 examples, I can tell you that they all break in one way or another. Let me know if this is enough or if you want more like me. I think I've found the difference between the HTML5 and EPUB standard and happen to be working on a solution today. Despite many searches on the Internet, I haven't actually found a working EPUB solution to adjust Video views in an EPUB. Update: I forgot to mention that you can set the size of the video's width and height as a kind of maximum width and height on a large screen. Up to those dimensions, the frr class adjusts the width and height to the physical screen dimensions. Last edited by MicroDrie; 08-01-2021 at 07:02 AM. |
||
Advert | |
|
08-01-2021, 10:41 AM | #6 |
Sigil Developer
Posts: 7,849
Karma: 5449552
Join Date: Nov 2009
Device: many
|
.mp4 is one of the official video resource types that any epub3 must/should support according to the spec. But of course notall readers do. At one point in time there was a multi-media epub3 test epub that was used to show epub3 compliance among readers.
Sigil should support all of those media types but that does not mean e-readers do. |
08-03-2021, 11:18 AM | #7 | |
Connoisseur
Posts: 58
Karma: 438844
Join Date: Aug 2019
Device: PC, Linux Mint, Tablet, and Telephone
|
Quote:
Unfortunately, the free GitDen reader is not being developed further. As a result, it no longer meets the current Android requirements. As a result, it can no longer be loaded for people with the latest Android IOS version. Does anyone know of another EPUB reader for Android that can display videos under the current Android OS version? |
|
08-03-2021, 11:35 AM | #8 | |
Guru
Posts: 711
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Various
|
Quote:
com.flyersoft.moonreader com.s2apps.reader Of course, their imperfections can be annoying as there is no perfect application for reading epub files. |
|
08-03-2021, 12:33 PM | #9 |
Grand Sorcerer
Posts: 12,372
Karma: 74317822
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
Libera claims to support Audio/Video in epub3 books. Do you have a test book I can try?
Sent from my Pixel 4a using Tapatalk |
08-03-2021, 01:29 PM | #10 | |
Grand Sorcerer
Posts: 5,621
Karma: 23190435
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
|
|
08-05-2021, 07:00 AM | #11 |
the rook, bossing Never.
Posts: 11,862
Karma: 87663463
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
An app is usually a better solution as iOS, Mac, Android, Windows or Linux is needed anyway to have video + audio. There are free frameworks and once it's done once the next time is easy. Almost everyone would have to download an App even if epub3 did what what you want.
People have been making multimedia since 1980s and commonly from 1990s. The idea of epub3 competing with multimedia apps and HTML5 websites was a crazy design decision. |
08-05-2021, 08:43 AM | #12 |
Sigil Developer
Posts: 7,849
Karma: 5449552
Join Date: Nov 2009
Device: many
|
I disagree. Epub3 can easily handle video and audio and javascript. Bad reader implementations are the issue.
|
08-05-2021, 08:57 AM | #13 |
Grand Sorcerer
Posts: 27,668
Karma: 195154104
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Yep. The willful ignoring of (and/or deviation from) epub specifications is the main issue. Otherwise, Audio/Video would just work. The same holds true for epub reading app devs: iOS, Mac, Android, Windows or Linux is needed for their reading app anyway, so why not just make your EPUB3 reading app work like it's supposed to to begin with?
|
08-05-2021, 06:02 PM | #14 |
Resident Curmudgeon
Posts: 74,932
Karma: 131375774
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I've not yet tried it, but Bluefire Reader for iOS is using the latest RMSDK. That might work for this multimedia ePub 3 eBook.
|
08-05-2021, 06:03 PM | #15 |
Bookmaker & Cat Slave
Posts: 11,468
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Embedding metadata into epub files | steve1977 | Editor | 36 | 06-23-2021 05:48 PM |
Audio and video files support in Calibre | shijo | Calibre | 3 | 07-21-2017 12:19 PM |
Plugin for video, audio, and image files? | woodr2011 | Plugins | 0 | 09-24-2015 07:51 AM |
Audio or Video files into an eBook using calibre | Khadar | Calibre | 27 | 09-22-2014 02:43 AM |