video and audio files in epub

1,122 views
Skip to first unread message

Edmon Samson

unread,
Jun 2, 2009, 8:56:56 PM6/2/09
to epub...@googlegroups.com
good day,

just want to ask if it is possible to embed multimedia (video and audio files) in epub? if so, what should be the code? and what kind of video files and audio files does it support? any sample epub files with multimedia content? hope you can help me.

tnx in advance,
edmon

Rajesh Kumar

unread,
Jun 5, 2009, 6:41:43 AM6/5/09
to epub...@googlegroups.com
Hi Edmon,

Yes, with limitations it is possible to embed video and audio files, provided they should be in SWF (Small Web Format) or FLV file. Unfortunately at present Adobe Digital Edition is the known application that supports SWF embedded in EPUB. Sony eReader, Stanza Reader, Mobipocket does not support multimedia at this point.

use <object> HTML element to refer media files in HTML and define appropriate mime types in OPF file.

Let us hope that all devices enhance in future to support multimedia

2009/6/3 Edmon Samson <edmonj...@gmail.com>

garth...@gmail.com

unread,
Jun 5, 2009, 11:01:21 AM6/5/09
to epubcheck
Also note that if one is going to include media types beyond the core
ones (png, jpeg, gif, svg) in an EPUB publication, there *must* also
be included a fallback to a representation of the object/image using a
core media type. See the OPF and OPS specifications for detailed
explanations of fallback requirements and processing. See:

http://www.idpf.org/2007/ops/OPS_2.0_final_spec.html
http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html

Best,
Garth

Xelle

unread,
Jul 31, 2009, 5:23:21 AM7/31/09
to epubcheck
Hi Rajesh,
I tried a lot of embedded video flash players in my epub files, using
<object>, but none of them worked on ADE.
Nothing appears on the page.
What code do you use ?
Thank you in advance,

Christelle

On 5 juin, 12:41, Rajesh Kumar <mercurypri...@gmail.com> wrote:
> Hi Edmon,
>
> Yes, with limitations it is possible to embed video and audio files,
> provided they should be in SWF (Small Web Format) or FLV file. Unfortunately
> at present Adobe Digital Edition is the known application that supports SWF
> embedded in EPUB. Sony eReader, Stanza Reader, Mobipocket does not support
> multimedia at this point.
>
> use <object> HTML element to refer media files in HTML and define
> appropriate mime types in OPF file.
>
> Let us hope that all devices enhance in future to support multimedia
>
> 2009/6/3 Edmon Samson <edmonjsam...@gmail.com>
>
>
>
> > good day,
>
> > just want to ask if it is possible to embed multimedia (video and audio
> > files) in epub? if so, what should be the code? and what kind of video files
> > and audio files does it support? any sample epub files with multimedia
> > content? hope you can help me.
>
> > tnx in advance,
> > edmon- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -

P Srinivasan

unread,
Jul 31, 2009, 5:29:35 AM7/31/09
to epub...@googlegroups.com
Hi Christelle,

Please find below sample code:

<object data="sample.swf" type="application/x-shockwave-flash"></object>

The "sample.swf" file should be placed in the same directory as HTML file is placed.

Also, the OPF file should have appropriate mimetype as follows:

<item id="sample" href="sample.swf" media-type="application/x-shockwave-flash"/>

I hope this will help you.

Thanks
Srinivasan

Rajesh Kumar

unread,
Jul 31, 2009, 6:08:36 AM7/31/09
to epub...@googlegroups.com
Hi Christelle,

 P Srinivasan has guided you with correct markup in HTML and OPF.  It will work if both SWF and HTML file are present in the same folder.  A sample HTML markup is below:

<div class="media">
    <object type="application/x-shockwave-flash" data="sample.swf"width="320" height="280" id="sample">
    <param name="movie" value="sample.swf"></param>
    <param name="align" value="center"></param>
    <param name="wmode" value="transparent"></param>
    <param name="quality" value="high"></param>
    <param name="bgcolor" value="#666666"></param>
    </object>
</div>

Thanks,
Rajesh

2009/7/31 P Srinivasan <psriniv...@gmail.com>

Edmon Samson

unread,
Aug 3, 2009, 7:53:06 PM8/3/09
to epub...@googlegroups.com
thank you so much sir Rajesh! Very much appreciated! attached is my sample epub with multimedia for anyone who doesnt know the code. :). tnx again!
sample.epub

Xelle

unread,
Aug 17, 2009, 5:03:49 AM8/17/09
to epubcheck
Thank you very much Rajesh and Edmon !
But i have one more question :
in your sample file, Edmon, where do you declare the video file ?
In the html page, i see :
<object data="docimages/vplayer.swf" width="270" height="242">
<param name="play" value="false" />
</object>

but file name video.flv does not appear in html page or opf...



On Aug 4, 1:53 am, Edmon Samson <edmonjsam...@gmail.com> wrote:
> thank you so much sir Rajesh! Very much appreciated! attached is my sample
> epub with multimedia for anyone who doesnt know the code. :). tnx again!
>
> On Fri, Jun 5, 2009 at 6:41 PM, Rajesh Kumar <mercurypri...@gmail.com>wrote:
>
> > Hi Edmon,
>
> > Yes, with limitations it is possible to embed video and audio files,
> > provided they should be in SWF (Small Web Format) or FLV file. Unfortunately
> > at present Adobe Digital Edition is the known application that supports SWF
> > embedded in EPUB. Sony eReader, Stanza Reader, Mobipocket does not support
> > multimedia at this point.
>
> > use <object> HTML element to refer media files in HTML and define
> > appropriate mime types in OPF file.
>
> > Let us hope that all devices enhance in future to support multimedia
>
> > 2009/6/3 Edmon Samson <edmonjsam...@gmail.com>
>
> > good day,
>
> >> just want to ask if it is possible to embed multimedia (video and audio
> >> files) in epub? if so, what should be the code? and what kind of video files
> >> and audio files does it support? any sample epub files with multimedia
> >> content? hope you can help me.
>
> >> tnx in advance,
> >> edmon
>
>
>
>  sample.epub
> 5098KViewDownload

gc

unread,
Aug 17, 2009, 10:58:41 AM8/17/09
to epubcheck
That example looks basically okay. The source for the object
(vplayer.swf) must be included in the OPF manifest with the
appropriate MIME type. And, I think that MIME type should also be
included in the <object> using the "type" attribute.

Further, to be a valid EPUB, there must be a fallback for the non-core
media type (Flash, in this case). That may either be done with
manifest-based fallbacks in the OPF. Or, perhaps preferably, with a
nested <object> (utilizing a core media type) in the OPS/html itself.
Reply all
Reply to author
Forward
0 new messages