Problems getting real width and height of videos

Viewed 109

I'm having a problem when I upload videos. The thing is that I record my videos with my cellphone in vertical way and when I download them to my computer or pass them through whatsapp they still look vertical, I can still watch them in vertical way as I recorded them, but when I try to upload them on my website using PHP and FFMPEG I always get horizontal resolutions.

I use this command to get the width of my videos:

$width = $video_attributes['width'];

The variable $video_attributes is an array that comes from a FFMPEG function that returns an array with the data related to the video.

Somebody could help me out with some ideas about what I'm doing wrong?

I need to get the vertical resolution so my videos will be displayed in vertical containers in my website.

Thanks in advance :)

0 Answers
Related