Forums / Install & configuration / Discussions around ezvideoflv extension

Discussions around ezvideoflv extension

Author Message

Pascal Specht

Tuesday 02 October 2007 6:54:58 am

Hi Damien,

I followed all the instructions for setting up the flv extension, and I didn't encounter any major problems to install it.
But now that I'm finished and everything went fine, I just don't know how to add content using this new media type.

I suppose that there should be a new datatype in the possible list of datatypes, but there isn't on my back-end.

How can I check if the extension did correctly add the new datatype? I added the extension in the override/site.ini.append.php before the regular extensions, and cleared all caches, but that didn't change anything for me. Any idea?

Thanks in advance,
Pascal

Damien Pobel

Tuesday 02 October 2007 7:19:24 am

Hi Pascal,

After setting up the extension and clearing caches, when editing a content class, you should have a new datatype called "Video FLV" in the drop down list.

It's difficult to guess what goes wrong in your install.

Cheers.

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

Pascal Specht

Tuesday 02 October 2007 7:48:20 am

Hi Damien,

OK, so there is a Video FLV class, that's pretty much what I thought. I'll search on my side why it doesn't show up and will notify you if there's something that xould potentially go wrong for other users as well. I'm using 3.9.3, BTW.

Thanks,
Pascal

Peter Putzer

Tuesday 02 October 2007 8:02:03 am

Not a class but a new datatype. To actually put content on your site, you have to create a class containing an attribute of the flv datatype.

Accessible website starting from eZ publish 3.0 (currently: 4.1.0): http://pluspunkt.at

Pascal Specht

Tuesday 02 October 2007 8:18:26 am

Hi Peter,

I see ! OK thanks.

Cheers,
Pascal

Kristof Coomans

Thursday 04 October 2007 7:46:58 am

Just for the record, the ezvideoflv extension can be found at http://projects.ez.no/ezvideoflv. Sorry guys that new user registrations are still not open again, that's probably why you are still using this forum. Now 3.10.0 is out I hope we'll have some time to work on projects.ez.no again.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Pascal Specht

Monday 08 October 2007 6:56:23 am

Hi Damien,

I still have three problems to use this extension:

My first problem is that the cronjob seems to generate the FLV more often than needed: with the following cronjob line in my /etc/crontab:

*/1 * * * * bizandgo cd /home/bizandgo/www;  /usr/local/php4/bin/php /home/bizandgo/www/runcronjobs.php flv

I end up with more than one FLV file at the end. Although the script should run every minutes, it did not generate the video at the first chance, but much later, but then twice, and again some times later!

bizandgo@server791 ~/www/var/ezwebin_site/storage/original/video $ ls -lad *
-rw-r--r-- 1 bizandgo users 1478107 2007-10-08 15:29 0436a324c9205b591d64e03cdc3a5b30.flv
-rw-r--r-- 1 bizandgo users 1478107 2007-10-08 15:23 23d04c365c655d4f30cc2715ad0b2aa5.flv
-rw-r--r-- 1 bizandgo users 1478107 2007-10-08 15:16 243269a5e3d3155bcee077d5bfa566b9.flv
-rw-r--r-- 1 bizandgo users 1478107 2007-10-08 15:16 4d39021a2d332eff5daac10e32c9b7d3.flv
-rw-r--r-- 1 bizandgo users 1478107 2007-10-08 15:29 4e21015cfa2012de95444eae9543322e.flv
-rw-r--r-- 1 bizandgo users 1478107 2007-10-08 15:23 51659d9848eeff2759ed13401e850960.flv
-rw-rw-rw- 1 bizandgo users 1755102 2007-10-08 15:15 f1f4ec4673f4f24970a53c934db3aaa6.wmv
bizandgo@server791 ~/www/var/ezwebin_site/storage/original/video $

The second problem I have is that I don't know how to correctly add a video from the backend: I created a new class with an attribute VideoFLV, I could create one such object, I could upload your test video, it would convert (with the problems I have) but the only way I can see the video is to embed that object as a FULL view, i.e. with a lot of disturbing additional text around. Am I using the correct method?

The third problem I have is that the preview is not showing, neither on the front nor on the backend.

I use the latest FFMpeg from their SVN

FFmpeg version SVN-r10636, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration:
libavutil version: 49.5.0
libavcodec version: 51.44.0
libavformat version: 51.14.0
built on Oct 8 2007 11:52:41, gcc: 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)
FFmpeg SVN-r10636
libavutil 3212544
libavcodec 3353600
libavformat 3345920

Thank you in advance for any help!

Pascal

Stéphane Bullier

Monday 08 October 2007 1:57:10 pm

Hello Pascal,

Have you add the rule read/view to role policies of users that should be able to read videos.

To see the preview, you have to install gd library.

Damien correct a mistake here also :

Rewriterule ^/extension/ezvideoflv/design/standard/flash/player_flv_maxi.swf - [L]

Stéphane

Pascal Specht

Tuesday 09 October 2007 4:36:04 am

Hi Stéphane,

yes, I do have the role for video/read on both anonymous and member users, and can see a video (but only if I use the full view, which is not appropriate)

But since I installed GD as well (to get the preview) I now screwed up the upload process. Since GD is on the machine, the upload breaks with a

Fatal error: Call to a member function on a non-object in /home/bizandgo/www/extension/ezvideoflv/datatypes/ezvideoflv/ezvideoflvtype.php on line 285

284: $ffmpeg = eZVideoFLV::getFFMPEGObject( $mediaFile->attribute( "filename" ) );
285: $width = $ffmpeg->getFrameWidth();

 

Unfortunately, I have only very few time to look in to this issue for the moment, so any help would be greatly appreciated!

Pascal

Damien Pobel

Tuesday 09 October 2007 10:37:39 am

Hi Pascal,

I don't have such bugs. Let's try to guess what is wrong.
<b>For the "cronjob problem" :</b>
- What version of eZ Publish do you use ?
- Do you use eZ Publish in cluster mode ? I didn't test this config and I'm not sure that the extension is compatible with it. Perhaps for the version 0.2.
- Can you replace the cronjob script with the one from the SVN [1] and run the cronjob script by hand with the following command line from eZ Publish directory :

/usr/local/php4/bin/php runcronjobs.php -d flv

I added some debug informations (and corrected minor mistakes) and the -d switch should make them printed.

<b>View videos</b>
After uploading and being converted, you should be able to see your video in the full view of your new object in the admin interface or in your front site. For example, [2] is the full view of my video class. The template used to make this page looks like :

{attribute_view_gui attribute=$node.data_map.title}{** object title **}
{attribute_view_gui attribute=$node.data_map.file}{** Video FLV attribute **}

The second line calls the right template to display the FLV Player and a link to download the original file. If you didn't define an override for your new class, the default is probably used which should do more or less the same but with a message telling you that it's the default view.
If you want to put a video in a XML Block using the Online Editor you have to write some templates for your video classes and have to define override rules for the view you want to use (embed, full, embed-inline, ...)

<b>For the fatal error</b>
Did you install the ffmpeg-php [3] module for PHP ? To use eZVIdeoFLV you need ffmpeg program AND ffmpeg-php. If ffmpeg-php is not installed you should see an error message in var/log/error.log telling you that the system can't load ffmpeg.so

[1] http://svn.projects.ez.no/ezvideoflv/cronjobs/convert_flv.php
[2] http://pwet.fr/media/multimedia/test_video_flv_datatype
[3] http://ffmpeg-php.sourceforge.net/

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

Pascal Specht

Wednesday 10 October 2007 12:03:42 am

Hi Damien,

Thanks a lot for the valuable information you wrote. I'm currently out of the office, but will look into this at my return next week, and let you know how it works out. I'm using 3.9.3 but had to patch ezScript.php

Cheers,
Pascal

Kåre Køhler Høvik

Thursday 11 October 2007 3:57:16 am

Hi Damien

I've made a eZP4 version of the extension. Send me a message if you want to add the source to SVN, and I'll send you the source.

Btw, I had to alter the ffmpeg options order to get it working correctly ( on Mandriva cooker distribution )

Best regards
Kåre

Kåre Høvik

Damien Pobel

Thursday 11 October 2007 4:41:04 am

Hi Kåre,

That's a great news :-) I'm very interested in it as I made this project for a future site that will probably use eZ Publish 4.
I see that you have an account on projects.ez.no, perhaps you can join the project [1] so that you can have access to the SVN and create a branch for the PHP5 version ?

[1] http://projects.ez.no/ezvideoflv/team/members

Cheers

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

Pål Messenlien

Thursday 11 October 2007 2:08:18 pm

Very interresting extension. We are working on a similar project as Open Funding.
http://ez.no/developer/open_funding/suggestions_for_new_functionality/ez_media_improvements

I must have been sleeping the last half year since i was not aware of the ezmedia datatype either. I will give the extension a try as soon i get time. Please go thru my project specs and see if you have something to to add to it.

--------------------------------------------
Høgskolen i Lillehammer
Lillehammer University College
http://www.hil.no
--------------------------------------------
Messenlien IT
http://messenlien.com
-------------------------------------------

Pascal Specht

Monday 15 October 2007 2:41:44 am

Hi all,

I've not been very succesful with getting the preview working so far... I've no idea what goes wrong, I checked all settings, but with no luck.

Do you have similar version numbers?
Both with or without cronjob conversion, I end up with a correctly converted FLV for the sample WMV, but the preview doesn't show up.
If I submit a file in an unsupported format ( .swf ), the application crashes with a Call to a member function on a non-object,ezvideoflvtype.php on line 285.

In none of the cases did I get a preview. My understanding from previous posts is that GD has to be installed for this.

I checked all the versions and it looks to me that I got all elements together:

System Linux bizandgo 2.6.18.1-xxxx-grs-ipv4-32 #2 SMP Fri Nov 3 23:04:19 CET 2006 i686
Apache/2.0.58 (Unix) mod_ssl/2.0.58 OpenSSL/0.9.7i

PHP 4.4.2
Configure Command './configure' '--prefix=/usr/local/php4' '--with-config-file-path=/usr/local/lib/php4' '--with-pear=/usr/share/php4' '--with-dbase' '--with-filepro' '--with-xml' '--enable-exif' '--enable-ftp' '--with-db' '--enable-bcmath' '--enable-calendar' '--with-gd' '--enable-gd-native-ttf' '--with-freetype-dir' '--with-gettext' '--with-zlib-dir' '--enable-trans-sid' '--with-imap' '--with-kerberos' '--with-imap-ssl' '--with-openssl' '--enable-sysvsem' '--enable-sysvshm' '--with-dom' '--with-mcrypt' '--with-iconv' '--enable-mbstring=all' '--enable-mbregex' '--with-png-dir=/usr' '--with-jpeg-dir=/usr' '--with-mysql=/usr' '--with-mime-magic=/usr/share/misc/file/magic.mime' '--enable-cgi'
Server API CGI <--- I use the ezscript.php patch for CGI. That should be relevant only if I use cronjob based transformation.
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/lib/php4/php.ini

ffmpeg
ffmpeg support (ffmpeg-php) enabled
ffmpeg-php version 0.5.1
libavcodec version Lavc51.44.0
libavformat version Lavf51.14.0

gd
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled

FFmpeg version SVN-r10636, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration:
libavutil version: 49.5.0
libavcodec version: 51.44.0
libavformat version: 51.14.0
built on Oct 8 2007 11:52:41, gcc: 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)
FFmpeg SVN-r10636
libavutil 3212544
libavcodec 3353600
libavformat 3345920

[ebuild N ] media-video/ffmpeg-0.4.9_p20051216
[ebuild N ] media-libs/imlib2-1.2.1.009
[ebuild N ] media-libs/giflib-4.1.4
[ebuild N ] media-libs/libid3tag-0.15.1b
[ebuild N ] media-libs/libpng-1.2.8-r1
[ebuild N ] media-libs/jpeg-6b-r5
[ebuild N ] media-sound/lame-3.96.1
[ebuild N ] media-libs/libvorbis-1.1.0
[ebuild N ] media-libs/libogg-1.1.2
[ebuild N ] media-libs/freetype-2.1.9-r1

php test_ffmpeg.php
was successful

Any ideas why the preview doesn't work?
Did anyone already write templates to make this easier to use within a XML-Block?

Thanks in adance,
Pascal

Pascal Specht

Tuesday 16 October 2007 8:52:05 am

Hi Damien,

can you put me on the right tracks? I used the ezwebin interface to create a new class which has a VideoFLV attribute. I called this class FLV. I've created a FLV.tpl file and have tried to put this template in almost any places that make more or less sense, like design\standard\templates\content\datatype\view and others, but none of them seems to be picked up. Do I need to write PHP code and/or modify ini settings as well to be able to get the video included in a XML Block? I think a sample would be nice and very useful...

Thanks in advance,
Pascal

Pascal Specht

Wednesday 17 October 2007 7:02:06 am

Did anybody succeed in using this extension in a XML-Block ?

I created a class called flv (using the ezwebin interface), and it has one attribute of VideoFLV type.
I tried to add a template flv.tpl and used the override.ini.append.php in the settings/override to use that template instead of the content/view/full, but even after clearing caches, I get the standard content/view/full template instead of mine...

[flv]
Source=content/view/full.tpl
MatchFile=flv.tpl
Subdir=templates
Match[class_identifier]=flv

is this the correct way to do it at all? Do I need to write more code somewhere? Are there examples existing?

Thanks in advance,

Pascal

Pascal Specht

Monday 29 October 2007 9:31:26 am

Hi there,

I still have many problems getting this to work through the admin interface:

I created a class called FLV, which has an attribute of type Video FLV .

Then I used the admin interface to override the template file for this class:

My settings/siteaccess/ezwebin_site/override.ini.append.php now contains:

[flv_full]
Source=content/view/full.tpl
MatchFile=flv_full.tpl
Subdir=templates
Match[class_identifier]=FLV

but despite of that, the video still uses the standard default full view, even after deleting all caches. Is it possible to override the content/view/full of a user-written class at all?

How can I tell eZ Publish to use my template?

Thanks a lot in advance for any help,
</Pascal>

Fabricio Guerrero

Monday 03 December 2007 4:18:59 am

Hi,

I've finally got around to install this extension and it generally is working pretty fine...

but i can't get the jpeg previews to be generated.. i'm assuming that these previews should be stored at:

mysite/var/sitename_site/storage/flv_preview

but this folder is completely empty...

for everything else such as video conversion works absolutely fine...

am i forgetting to enable something in order to get the thumbnails generated?

I'd highly appreciate any help..

Thanks.

http://www.solobromasychistes.com <<Joomla Site :P
http://www.recipesforhealthyfood.com/ <<Drupal Site :P
http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...

Fabricio Guerrero

Monday 03 December 2007 4:30:19 am

Just in case this could be a hint to what i'm doing wrong.. i see this in the logs

[ Dec 03 2007 13:21:35 ] [192.168.0.126] error/view.php:
Error ocurred using URI: /video/preview/202/1540

http://www.solobromasychistes.com <<Joomla Site :P
http://www.recipesforhealthyfood.com/ <<Drupal Site :P
http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...