Video duration

confis

Member
Hi,
Is there a way to know the video duration after upload it (to use it as value on another field)
 
Probably. We include the getid3 library:

https://github.com/JamesHeinrich/getID3

... which provides that info, so you might be able to do it with a calc element (set to "Calc on save only") by doing ...

Code:
$getID3 = FabrikWorker::getID3Instance();
$path = JPATH_SITE . '{yourtable___yourupload}';
$fileInfo = $getID3->analyze($path);
return $fileInfo['playtime_string'];

Although come to think of it ... the upload placeholder probably won't have the file path in it when the calc runs. So you may need to do it in a PHP form plugin.

But try the calc first.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top