![]() |
#1 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Jan 2024
Location: London
Device: none
|
EPUB container
Hello
I have a question about a video that I embedded in the introduction of my EPUB3 ebook "Tape Mark 3": https://edgedpub.com/sample_work_6.php The EPUB-Checker shows me 2 errors (see attachment) that are related to the video on line 173 of the file introduction.xhtml. <div> <iframe width="560" height="315" src="https://www.youtube.com/embed/8i7uFCK7G0o" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen=""></iframe> </div> I looked for explanations about Error RSC-006 regarding the EPUB container. On the web page Anatomy of an EPU3 file I read that the file container.xml is in the folder META-INF. I have 3 questions: 1) Is there a problem with the iframe? 2) What does it mean that I have to "locate the resource in the EPUB container"? 3) How do I insert the video in the manifest? How do I write this line of code for the video? <item id="..." href="..." media-type="video/..."/> Thank you for your help. Daniele |
![]() |
![]() |
![]() |
#2 |
the rook, bossing Never.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,125
Karma: 89201339
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
1) Maybe. If the video was in the ebook, you'd not need an iFrame.
2) The video is a link to YouTube. You do that on a Website. The video needs to be in the ebook, (which makes it interactive media and not really an ebook) 3) You need a video file, not a link, so, no href except to a file actually in the ebook. You have not embedded a video in an ebook. You have used epub3 as if it's a web-page. You have only put a link to a video. You need the actual video file. An ebook might have a link to a publisher's web site or something. But the actual ebook, entire, has to work on its own without the internet, otherwise you might as well offer a link to a website with the iframe and whatever else is in the ebook. Most distributors of ebooks and ereaders and ereader apps won't do video. You can do loads of stuff with epub3, but not all of it makes sense as an ebook. Putting a link to a video isn't embedding a video. It's embedding a link: viz: The above is your link embedded. The video isn't embedded on MobileRead but is still on YouTube. Last edited by Quoth; 08-09-2024 at 04:34 PM. |
![]() |
![]() |
![]() |
#3 |
the rook, bossing Never.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,125
Karma: 89201339
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Epub container is the zip file with all the resources.
Rename an epub to zip and an archive program will show all the files. However better to use Sigil to craft an epub3, if that's what you really need, rather than try to assemble the parts into an archive. |
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Jan 2024
Location: London
Device: none
|
Many thanks, Quoth.
The initial idea was to link the EPUB with an external page. Now I will think about what I want to do with the video and then choose an option. |
![]() |
![]() |
![]() |
#5 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,904
Karma: 5449552
Join Date: Nov 2009
Device: many
|
If it is an epub3, and if the remote resource is an actual video and not a link to a web page with the video embedded, simply go to the opf manifest for this file and add "remote-resources" under properties. This tells the ereader that that specific xhtml page accesses a remote resource.
Then add a manifest entry to point to the remote resource. Something like the following example: <item id="content_001" href="content_001.xhtml" media-type="application/xhtml+xml" properties="remote-resources"/> <item id="outside-resource" href="https://www.myserver.com/myvideo.mp4" media-type="video/mp4" /> But you must use a video tag in your xhtml and not an iframe as iframe's are viewed as a security issue by the epub3 spec. If the video is small enough, just hosting it inside the epub will work just fine. Last edited by KevinH; Yesterday at 09:33 PM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Extracting and repacking epub (as zip) shows missing container.xml file | bendtherules | Editor | 4 | 10-27-2021 01:55 PM |
container.mi and unicode | jackie_w | Development | 7 | 05-27-2018 10:49 AM |
Recreating Container.xhtml | SigilBear | Sigil | 42 | 06-27-2017 05:32 PM |
container.xml problems | SigilBear | Sigil | 4 | 06-11-2017 09:43 PM |
Container methods, various scenarios | jackie_w | Development | 15 | 11-09-2015 02:32 PM |