ibexa

Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

Media

Summary

Stores a media file (Flash/QT/Real/etc.).

Properties

NameInternal nameSearchableInformation collector
Media ezmedia No. No.

Description

This datatype allows the storage and playback of a video file. It is capable of handling Apple QuickTime, Macromedia Flash, Microsoft Windows Media, Real Media, Silverlight*, HTML5 Video** and HTML Audio** files. The maximum allowed file size is determined by the "Max file size" class attribute edit parameter and the "upload_max_filesize" directive in the main PHP configuration file ("php.ini").

*available from 4.1 onwards
 **available from 4.4 onwards

The following screenshot shows the class attribute edit interface for this datatype.

Class attribute edit interface for the "Media" datatype.

Class attribute edit interface for the "Media" datatype.

Media player type

The "Media player type" parameter controls the way the video file will be played back on the client side. The following options are available:

  •  Flash
  •  QuickTime
  •  RealPlayer
  •  Windows media player
  •  Silverlight - available from 4.1 onwards
  •  HTML5 Video - available from 4.4 onwards
  •  HTML5 Audio - available from 4.4 onwards

Regarding Html5_video and Html5_audio: As the name implies they use the native video and audio tag as added in html5, this means that as of the time of writing it's up to the browser to support the video/audio format you upload. For instance for video Apple Safari (incl IPhone & IPad) supports mpeg4(h.264) and Mozilla Firefox supports ogv (Theora). For an up-to-date list of supported formats in different browsers, see more info on html5 video and audio.

Media players and supported formats

In the table below you will find the media players supported by eZ Publish along with the supported formats out-of-the-box:

Media player

Formats

Flash

.swf, .flv, .avi

QuickTime

.mov, .avi, .mp4

RealPlayer

.rm

Windows Media Player

.wmv, .avi, .mpeg, .mp4

Silverlight

.xap

HTML5 Audio/Video

.mp4, .m4v, .mov, .flv, .ogv, .avi, .webm

Find more information on the pre-defined media content classes under "Media".

Max file size

The "Max file size" parameter makes it possible to set the highest size (in megabytes) that the system will allow. By default, this parameters is zero, which means that eZ Publish will not do any size checking when files are uploaded. In the example above, the "Max file size" parameter is set to 32 MB, which means that the object edit interface will not allow the upload of files that are larger than 32 megabytes. However, if the value of the "upload_max_filesize" PHP setting is lower than 32 megabytes, the underlying system will cancel the upload.

Object attribute edit interface

The object attribute edit interface for the "Media" datatype depends on the selected "Media player type" (in class edit mode). The following screenshots show the different object attribute edit interfaces for the supported media types.

Object attribute edit interface for the "Media" datatype (Flash).

Object attribute edit interface for the "Media" datatype (Flash).


 

Object attribute edit interface for the "Media" datatype (QuickTime).

Object attribute edit interface for the "Media" datatype (QuickTime).


 

Object attribute edit interface for the "Media" datatype (Real Media).

Object attribute edit interface for the "Media" datatype (Real Media).


 

Object attribute edit interface for the "Media" datatype (Windows media).

Object attribute edit interface for the "Media" datatype (Windows media).

Storage

Files that have been uploaded through the "Media" datatype are stored in the same way as files that are uploaded using the "File" datatype. However, the system keeps track of the media files using the "ezmedia" table instead of the "ezbinaryfile" table.

Raw output

The ".content" of an ezcontentobjectattribute object using this datatype returns an ezmedia object.

Balazs Halasy (21/02/2005 2:40 pm)

Geir Arne Waaler (29/09/2011 9:43 am)


Comments

  • Flashvideo is missing

    Its stated video as flash above, but flash video as .flv and .mp4 is missing. I t should be there. There is an extension based on the media datatype, but I would have prefered flv/mp4 included above.
    • Re: Flashvideo is missing

      Hi, please note that documentation comment system isn't meant for bug reports and/or enhancement requests. You need to file an issue at http://issues.ez.no instead.
      Thank you!
      • Re: Re: Flashvideo is missing

        I understand your point Svitlana however I've lost count of the times that someone's comments on documentation, upgrade etc pages have saved me a great deal of time from errors, omissions or just tips.

        Cheers
        ps. If you create a comment and forget to populate the name field then submit you loose the Message content at validation check. Guess I'd best submit a bug report. ;)
  • documentation was wrong

    Erland Flaten was pointing out the documentation above was unclear. And clarified it. And he was right. The flv datatype is here
    http://ez.no/developer/contribs/datatypes/video_flv_datatype

    $2c,
    *pike