I want to get the duration of a video file in php
I have checked online and I saw posts talking discussing getid3, I downloaded it and include the fil in my php code but it was telling me it couldn't read the file. I also saw some posts discussing ffmpeg in php, but I dont understand how it works. I will be happy if I can do it with pure php. But if not, please explain in details how I can get this done.
$filename = $_FILES["adspics"]["name"];
$getID3 = new getID3;
$file = $getID3->analyze($filename);
echo ($file['playtime_string']);
I expected it do display the duration of the video