0

I want that when user uplaods a video it should be passed through various checkpoints like resolution, frame rate, bit rate and FOV . So i want to know how can i get all these information about video using ffmpeg in php and store it in array to use it?

  • Does this answer your question? [Using ffmpeg to get video info - why do I need to specify an output file?](https://stackoverflow.com/questions/11400248/using-ffmpeg-to-get-video-info-why-do-i-need-to-specify-an-output-file) – zimorok Feb 16 '22 at 06:28
  • Does this answer your question? [retriving video details with ffprobe in php](https://stackoverflow.com/questions/24751323/retriving-video-details-with-ffprobe-in-php) – Oleksandr Savchenko Feb 16 '22 at 07:59

1 Answers1

1

To show information about a video file using ffmpeg use below command

ffmpeg -i input.mp4

in PHP you can run this command using PHP exec function

$command = "$ffmpeg_path -i input.mp4";
$output = [];
$return_code = 0;
exec($command, $output, $return_code);
Bilal Tariq
  • 639
  • 4
  • 7