Skip to content

Get the dimensions of a Video file

pascalbaljet edited this page Dec 11, 2017 · 2 revisions

This gives you an instance of the FFMpeg\Coordinate\Dimension class.

FFMpeg::open('video.mp4')
    ->getStreams()
    ->videos()
    ->first()
    ->getDimensions();

See also: https://github.com/PHP-FFMpeg/PHP-FFMpeg/blob/master/src/FFMpeg/Coordinate/Dimension.php

Clone this wiki locally