Path

ez projects / ezvideoflv / forum / general / some comments / re: some comments


Some comments

You need to be logged in to post messages in the forums. New users may register here.

Marcin Drozd

Member since:
09 January 2008

Posts: 2

Thursday 22 May 2008 11:41:53 am

Hi
Great ext :)

I have some comments about it:
1. no translation
There is
alt="Preview"

should be:
alt="{'Preview'|i18n( 'ezvideoflv/datatype' )}"

at linie 17 (file: ezvideoflv/design/standard/templates/content/datatype/edit/ezvideoflv.tpl

2. system via exec
My IPS disabled php functions: system, passthru, etc. but exec no (uff).
Maybe, it should be in ini? (what function do I want to use: system or exec)
file: ezvideoflv/datatypes/ezvideoflv/ezvideoflv.php
method: doConvert



//instead of


//$output = system( $commandLine, $retCode ); //not work for my IPS, doh


$tmp=array();


$output = exec( $commandLine, $tmp, $retCode );




3. problem with toGDImage() function
The same file, and method generatePreview
I have problem with toGDImage() function
Because, I have gcc < 4.2, when I execute toGDImage() function, I have known warning:



Compiler did not align stack variables. Libavcodec has been miscompiled


and may be very slow or crash. This is not a bug in libavcodec,


but in the compiler. You may try recompiling using gcc >= 4.2.



and no solution. and I have changed:



        function generatePreview( $imgPath, $videoFile, $format, $frame)


        {


                //generate image


                $imageFileOutput = $imgPath;


                $commandLine = 'ffmpeg -y -deinterlace -i '.realpath($videoFile).' -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 '.$imageFileOutput;


                $tmp=array();


                $output = exec( $commandLine, $tmp, $retCode );


                if ( $retCode != 0 )


                {


                        eZDebug::writeError( 'Failed to execute ' . $commandLine."\nOutput:\n".$output, "eZVideoFLV" );


                        return '';


                }


                return $imageFileOutput;


 

                // original code ...


        }



It works for me, and imho it should be more flexibility. Think about moving options to ini file.

4. permissions
I want to access to video/preview for annonymous user, but to video/flv for registered. i suggest to add (ezvideoflv/modules/video/module.php):



$ViewList['preview'] = array( .... 'functions' => array( 'read_preview' ) ....);


...


$FunctionList['read_preview'] = array();



and (ezvideoflv/modules/video/preview.php):



//if ( $contentObjectID != $contentObjectIDAttr or !$contentObject->attribute( 'can_read' ) )


if ( $contentObjectID != $contentObjectIDAttr )




Tnx.
Up

Marcin Drozd

Member since:
09 January 2008

Posts: 2

Thursday 22 May 2008 11:56:34 am

Oh, I have a polish translation of this. If U want...
Up

Damien Pobel

Member since:
09 January 2008

Posts: 40

Tuesday 24 June 2008 11:45:56 pm

Hi Marcin,

Sorry for the delay, I'm quite busy...

1. you're right, that's a small bug
2. hum it seems quite specific to your setup. The ImageMagick image handler also use system() and I'm not for an ini settings has it can be really confusing.
3. the problem of the ffmpeg use instead of GD is that you can't choose the "middle" frame with [Preview]/Frame settings. But we can probably let the developer choose in the ini settings the command line he wants to use to generate the preview instead of GD.
4. You're right.

I'm also interesting in the polish translation !
Would you like a read/write access to the SVN ? Just register as a member of the project on http://projects.ez.no/index.php/ezvideoflv/team/members so that I can approve your membership.

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

Up

You need to be logged in to post messages in the forums. New users may register here.