Search

i have uploaded the audio and video files in the backend how to get the time ie the no of minutes the audio/video play in the front end in symphony any guidance ?

Symphony doesn't have a native extension that will return the time and duration of audio and video files. Moreover, this would depend on the format you are uploading in.

I would suggest you look into the possibility of creating an extension that solves this issue, you may find some third party scripts that you could dissect and use within the extension. I look forward to seeing your progress as it would potentially be a very neat addition to Symphony!

No! The time is 12:13am! ding dong!

Your other option is to use a video hosting service like YouTube or Vimeo, and integrate it that way.

You can do this with FFmpeg and PHP:

$videofile = "filename.mpg";
ob_start();
passthru(""ffmpeg" -i "{$videofile}" 2>&1");
$duration = ob_get_contents();
ob_end_clean();
$search = "/Duration: (.*?),/";
$duration = preg_match($search, $duration, $matches, PREG_OFFSET_CAPTURE, 3);
echo "Duration of " . $videofile . ": " . $matches[1][0];

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details