Forums / Setup & design / How to use the new HTML5 Video datatype?

How to use the new HTML5 Video datatype?

Author Message

Marco Zinn

Saturday 16 October 2010 5:51:35 am

The press release etc. of ez4.4 show off the new HTML5 video datatype.

Somehow, i cannot get this working.

I did a fresh install of ez 4.4 (community edition) and use firefox 3.6 and Safari in Win7.

I have converted some short videos to MPEG4 using "handbrake". That produced a file with an m4v extension. As that did not work, i renamed it to .mp4

Then, i modified the "media file" attribute in the "video/flash player" class to use the "HTML5 video" player type.

On my (german) admin site, that class defintion now shows "media player type: EMPTY". I assume, that may be a missing translation of "HTML5 video" to german.

Now, when i upload a MP4 video into a new"video/flash player" content object, the binary file is recognized as MIME-Type "video/mp4".

On the admin site (object preview tab), i can see a video-HTML-tag in the html source. Nice. But it does not display anything (just some white space) in Firefox. In Safari, it displays a static image from the video, but no video controls or so.

But on the front side, ez still generated a the ezPublish flash player (which works fine), but it does not create any VIDEO-HTML-Tag. I cleared caches, of course.

So, how did Bard make the MP4 demo work in the webinar some days ago? ;)

Do i need specific Server settings? Are the current ezflow output templates fit for the new datatype?? Why does my firefox not show the video?

(I can access the MP4 video file in through the web browser at e.g. .../ezflow_site_admin/content/download/108/573/Samsung_LED-1.mp4 . It loads and displays fine in a quicktime player within firefox)

Marco
http://www.hyperroad-design.com

André R.

Saturday 16 October 2010 8:50:39 am

I think there are several issues here. You changed an existing class, that class has several templates overrides attached to it, so that won't work without changing the templates as well.

Create a new class instead, and select html 5 video as type on ezmedia datatype.
Then upload a video that works in the browser you want to test in.

Basically this is just low level support, we have not implemented any kind of browser detection to serve the format your browser support, such a functionality is left for implementors to do for now, in next version we'll have something for it in webin/flow*.

see: http://en.wikipedia.org/wiki/HTML5_video#Browser_support

* Probably as a template implementation with webM + h264 attributes and some kind of JS to select correct one or serve h264 using flash if html5 is not supported.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Marco Zinn

Saturday 16 October 2010 11:44:09 am

Hi André,

thanks for your reply on Saturday.

I copied the video/flash player class to a new "html5 video" class and set the player to "HTML5 video". That got me rid of the override template in ezflow and now shows nice video-html-tags in ezflow.

In firefox, i can now play an ogg video, but i manually have to display the video controls or start the video in the context menu. In Safari, the .ogg video does not display (not supported by Safari, i think). An MP4 Video show a very large static picture, but i cannot play the video (nothing usefull in the context menu either).
Edit: One should mark the checkbox for "Controller" in the content object. This will reveal the video controller and i can now play the .ogg video in Firefox an the mp4 video in Safari (still way too large)

Both cases, the new content objects are not shown in my parent gallery at all (the child nodes are not displayed, while the old "flash/video" objects are shown with a neat "play me" icon)

I'm still wondering, how Bard and Roland did the demo in the webinar...

He showed off, that the new HTML5 videos automatically are shown in a parent gallery with nice thumbnail images. And, they did run perfectly fine with safari.I think, he "uploaded" the .mp4 files using WebDAV (or multiupload).

I thought, that my mp4 file is broken, but it runs great in both Firefox and Safari, when i open the file through its direct URI.

Bard, what's the trick involved? ;)

Marco
http://www.hyperroad-design.com

André R.

Saturday 16 October 2010 2:37:07 pm

Photoshop and Powerpoint??

Kidding! have a nice weekend :)

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Bård Farstad

Tuesday 19 October 2010 2:21:35 am

The video tutorial and the webinar was done with some small changes. I created a new class: HTML5 video. Added title + media file. In the media file I selected HTML5 video in the class setup.

The template that shows the video is actually the standard template, no modifications done. I then also created a galleryline template so that the video shows up in the gallery. The thumbnail is "generated" automatically by the browser when using the video tag - no magic. I also connected the uploadsetting so that mp4 files automatically are stored as the new HTML5 class when being uploaded.

Then you get what I show here:

http://ez.no/Demos-videos/HTML-5-Video-with-eZ-Publish

-bård

Documentation: http://ez.no/doc

Marco Zinn

Thursday 21 October 2010 11:36:53 am

Hi Baard,

thanks for your reply and explanation.

Greetings from Germany!

Marco
http://www.hyperroad-design.com

Uli Kimmich

Tuesday 15 March 2011 12:11:33 am

Hi Baard,

I came across your post here about uploading MP4 files as HTML5 video with the multiupload tool.

I changed my ezmultiupload.ini and added under 'filetype' the exension '*.mp4' and after the upload progress bar is done nothing happens. I changed the template already to display HTML5 video which works.

How do you connect the uploadsettings so that mp4 files are stored as new HTML5 video as you mentioned in your previous post? What are the changes I have to make in the ezmultiupload.ini file?

Thank you.

Uli

eZ debug

Timing: Jan 17 2025 22:47:48
Script start
Timing: Jan 17 2025 22:47:48
Module start 'content'
Timing: Jan 17 2025 22:47:49
Module end 'content'
Timing: Jan 17 2025 22:47:49
Script end

Main resources:

Total runtime0.7813 sec
Peak memory usage4,096.0000 KB
Database Queries211

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0043 587.8281180.8359
Module start 'content' 0.00430.6634 768.6641692.1719
Module end 'content' 0.66770.1135 1,460.8359345.0547
Script end 0.7812  1,805.8906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.5007210.0002
Check MTime0.00140.1794210.0001
Mysql Total
Database connection0.00050.067310.0005
Mysqli_queries0.700389.63522110.0033
Looping result0.00200.25742090.0000
Template Total0.760197.320.3801
Template load0.00190.243420.0010
Template processing0.758297.049520.3791
Template load and register function0.00010.010710.0001
states
state_id_array0.00100.131810.0010
state_identifier_array0.00110.137220.0005
Override
Cache load0.00160.2069610.0000
Sytem overhead
Fetch class attribute can translate value0.00100.128150.0002
Fetch class attribute name0.00120.1597110.0001
XML
Image XML parsing0.00330.417450.0007
class_abstraction
Instantiating content class attribute0.00000.0033140.0000
General
dbfile0.00330.4181470.0001
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 29
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs