Mobileread
entering a video into an e-book
#1  alex1964 01-10-2021, 05:58 AM
how is it possible to enter an mp4 or any other video file into an e-book? I wrote the code, an empty player appeared, but I can't specify the path to the file. I entered the mp4 file into the book and I wrote the path to the book, but the player is also empty. How to do it correctly?
here is the player code with the link:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!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></title>

<title>video</title>
</head>

<body>
<video width="400" height="300" controls="controls" poster="video/duel.jpg">
<source src="video/duel.ogv" type='video/ogg; codecs="theora, vorbis"'>
<source src="C:\Users\acer\Documents\Алёша\ЛИТТКА\ТЕКСТЫ\Р АССКАЗЫ\проба 01.epub\перв_лицо_Шмагина.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
<source src="video/duel.webm" type='video/webm; codecs="vp8, vorbis"'>Тег video не поддерживается вашим браузером. <a href="video/duel.mp4">Скачайте видео</a>.</source>
</source>
</source>
</video>

<p><br /></p>
</body>
</html>

this player supports many video formats, I left links to other types (video.duel), I think this will not be a mistake.
Or is the code only suitable for the url address and the code cannot be used in an e-book?
Reply 

#2  Notjohn 01-10-2021, 10:16 AM
I don't believe video content is accepted by Amazon's Kindle Direct Publishing platform, so I've never ventured there.

I long ago concluded that in ebooks, simplicity is everything. I extend that philosophy to drop-caps, typefaces, media calls, and indeed every complexity that I can possibly avoid.
Reply 

#3  KevinH 01-10-2021, 11:02 AM
It is only supported in epub3. Also you can not use a absolute url to a local file located outside the epub. You can host the video on an external server but must add the appropriate "remote" properties in the opf manifest.

Simply search for epub3 video example on the internet for a working example.
Reply 

#4  KevinH 01-10-2021, 11:05 AM
Both Sigil and Calibre have tools to make it easy to load an existing video into an epub.
Reply 

#5  binaryhermit 01-10-2021, 11:08 AM
I'm pretty sure that in most cases, this is an example of "Just because you can, doesn't mean you should".
Reply 

#6  fbrzvnrnd 01-10-2021, 03:52 PM
Please read some examples of video in ePub. there are a lot of problems in your code, as others said you can not use a absolute path, and you can not create a source tag inside another source tag.
Reply 

#7  Turtle91 01-10-2021, 04:59 PM
I also noticed that you had <title> tags in the header - twice. Not sure if it would cause a failure, but it should only occur once.
Reply 

#8  Quoth 01-11-2021, 09:05 AM
Quote Notjohn
I don't believe video content is accepted by Amazon's Kindle Direct Publishing platform, so I've never ventured there.

I long ago concluded that in ebooks, simplicity is everything. I extend that philosophy to drop-caps, typefaces, media calls, and indeed every complexity that I can possibly avoid.
Agree totally. I do use added typefaces, but check that fallback on primitive or older ereaders or people not selecting "Publisher Fonts" does work. I'd add SMALL CAPS to the list to avoid, though they work on some of my ereaders. Experts here know that SMALL CAPS actually need a separate face, they are poor if done by simply using a smaller font size. See also Oblique vs true Italic. Also for 100% compatibility to Kindle (epub uploaded to KDP), apps and all eink, I only use epub2. An App is better than epub3 if you really need the extra features.

It can be valid to have video, or video + audio in a book like document. But then it's not actually an ebook. I prefer do do such as an App. It will then only work on phones and tablets, but most eink ereaders in use don't support video and many don't have any audio, or need additional HW and FW for audio (Kindle PW3).
Reply 

#9  fbrzvnrnd 01-12-2021, 02:59 AM
Quote Quoth
But then it's not actually an ebook.

I turn the perspective upside down: an ebook with video, code and audio is a true digital book. The 'simple' ebook you describe is not a digital book, it is a paper book, digitized. I understand that there are subjects (like Amazon) who, in order to maintain a domesticated market, are rowing against innovation, but at least we developers should be clear about what we are doing and what is the path that we have been waiting for decades to take.


f.
Reply 

#10  Jellby 01-12-2021, 06:47 AM
With that reasoning, you could say it's a digital paperclip too.
Reply 

  Next »  Last »  (1/3)
Today's Posts | Search this Thread | Login | Register