0

I tried looking for a bitrate or frame dimension function and did not find any http://www.php.net/manual/en/indexes.functions.php

Is there a way to display the bitrate and frame dimension like I display the size of a video file

function display_size($bytes, $precision = 2) 
{
    $units = array('B', 'KB', 'MB', 'GB', 'TB');
    $bytes = max($bytes, 0); 
    $pow = floor(($bytes ? log($bytes) : 0) / log(1024)); 
    $pow = min($pow, count($units) - 1); 
    $bytes /= (1 << (10 * $pow)); 
    return round($bytes, $precision) . '<span class="fs-0-8 bold">' . $units[$pow] . "</span>";
}

Thanks

Gerag2
  • 11
  • 1
  • you might find something in this extension: https://github.com/PHP-FFMpeg/PHP-FFMpeg – Jeff May 23 '18 at 16:26

1 Answers1

0

There is no such thing in PHP. PHP cannot work with videos by itself, I suggest you use FFMPEG for this kind of task.

Here is a thread talking about it: https://stackoverflow.com/a/11807265/1709032 you can get so much information from videos this way.

Have a nice day!

dodancs
  • 329
  • 1
  • 3
  • 14