Friday, March 3, 2017

PHP - Code to find the Duration of a Video file using FFMPEG (WAMP5)

PHP - Code to find the Duration of a Video file using FFMPEG (WAMP5)

function getVideoLength
( $file_path)
{
extension_loaded ('ffmpeg' );
// F: Mv  1.wmv video file path.
$ffmpegInstance = new ffmpeg_movie ($file_path );
return $ffmpegInstance>getDuration();
}

No comments:

Post a Comment