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 $_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 $_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
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.
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 $_zp_flash_player variable ($_zp_flash_player->getVideoHeigth($this) - should I try something similar or is it possible to have those values configurable without using this global flash variable?
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.
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/
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.
Thanks acrylian, it's good news to have it in the extensions section. However, as it is now, it is practically impossible to install and use (at least I didn't find the way to do it). A how-to, or some quick user guide would really help, and could also bring back to life the development of this very useful extension. I wonder how difficult it would be to implement the use of the now well spread webm format...
Sorry, I didn't know about your policy regarding plugins. I tried to contact the author via the Google Code webpage, but I obviously failed since I received an error (I probably got the wrong e-mail address on the site).
I actually hoped he would answer on this topic...