ZenphotoCMS Forum
Open Video plugin - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Plugins (https://forum.zenphoto.org/forum-6.html)
+--- Thread: Open Video plugin (/thread-5444.html)

Pages: 1 2


Open Video plugin - bthj - 07-07-2009

What does it take to create a plugin that would detect open video files (Ogg Theora with .ogv and .ogg extensions) in an album and print out basic HTML5 markup for them so they would be playable? The < video > tag and some fallback markup like shown here: http://www.theora.org/cortado/

To start with I took a look at the existing flowplayer and flvplayer plugins and see that they are registering themselves to the &#36;_zp_flash_player variable, which seems to be part of the core. Would it need changes to the core to handle .ogv files? Like an addition of a global &#36;_zp_openvideo_player variable?

Now that Firefox 3.5 supports playing open video with the video tag without any plugins
http://www.webmonkey.com/blog/How_Firefox_Is_Pushing_Open_Video_Onto_the_Web
and other browsers are catching up (except IE maybe) and big video sites like Youtube and DailyMotion are experimenting with this
http://openvideo.dailymotion.com/
it is very interesting to be able to drop open video files (.ogv) to a Zenphoto album and have them play.

/Björn




Open Video plugin - acrylian - 07-07-2009

Well, until that can really be used a big browsers I know needs to catch up (and of course all people need to run the latest equipment which they don't) with some other web stuff first...:-) Also HTML5 is not out yet.

Anyway, take a look at the class-textobject.php filter plugin which provides an example for formats zenphoto does not support, in this case, well, texts.
http://www.zenphoto.org/documentation/plugins/_plugins---class-textobject.php.html
You would have to create your own plugin with that.




Open Video plugin - bthj - 08-07-2009

Thanks for the hint!

I cloned class-textobject.php and made some obvious changes that can be seen at
http://code.google.com/p/zenphoto-openvideo-plugin/source/browse/trunk/zenphoto/zp-core/plugins/class-openvideo.php (creating a project for this at google code may be called an overkill

and the results can be seen at

http://mappa.bthj.is/hreyfimyndir/OpenVideoTest/FL20080162.ogv.html
(in Firefox 3.5 you'll have native support for the < video > tag and in other browsers the Java applet kicks in).

And now I have two main questions:

  • There is an anchor < a > tag printed around the tag so when clicking the player controls in Firefox 3.5 you are actually taken to the link, which results in an error. How would this link be removed? ...class-video.php doesn't seem to suffer from this but looking at the code I haven't seen the magic.

  • How do I arrange configurable width and height parameters? Again, looking at class-video.php this feature seems to have something to do with the &#36;_zp_flash_player variable (&#36;_zp_flash_player->getVideoHeigth(&#36;this) - should I try something similar or is it possible to have those values configurable without using this global flash variable?




Open Video plugin - sbillard - 08-07-2009

The link code is coming from the theme's image.php script. You would have to modify the them to not put that out if the class of the object is your new class.

If you cannot get the height/width somehow from the file you would have to configure options in the plugin to allow it to be specified. The getHeight() and getWidth() methods would then return these option values. You can look at the flowplayer plugin to see how it has made these options.




Open Video plugin - acrylian - 08-07-2009

Also please let us know if you got it ready. We then gladly add an entry on our plugins page.




Open Video plugin - makar - 03-03-2010

Yes, it would be nice to have Theora support:

A nice article that is a very interesting read - "No, you can’t do that with H.264":

http://bemasc.net/wordpress/2010/02/02/no-you-cant-do-that-with-h264/




Open Video plugin - acrylian - 03-03-2010

Well, given that only latest Opera, Chrome and Firefox versions are supporting it, it is not yet the time. Sadly IE is still the most used browser and probably will stay for quite some time. But feel free to provide such a plugin if you like.




Open Video plugin - Mathieu - 26-04-2010

Dear Björn,

Did you make any progress on your plugin? I can see it's working on your gallery, but did not manage to make it work properly on my own gallery, using the files on Google code.

Could you provide some king of user guide, a quick how-to, in order to use ogg video on Zenphoto ? I'm not a php expert, and could not guess what to do based on the code...

Thx a lot in advance!
Mathieu.




Open Video plugin - MarS - 03-05-2011

Are there any news on this topic? I am just looking for a simple solution to use the tag and two versions of one video (mp4 and ogv).




Open Video plugin - acrylian - 03-05-2011

If there is not on the google code page above probably not.

But thanks for the reminder as we apparently forgot to add this to the extensions section.