I have to check the video is landscape or portrait before rotate using ffmpge . please help me.
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
Getting video dimension from ffmpeg -i
eg:
I don't know why you'd want to rotate the video from how it was shot, though. You're going to end up with sideways videos after rotating more likely than not.
using ffmpeg we cant check the video is taken landscape mode or portrite mode in iphone.
we need to install mediainfo or exiftool
if we install exiftool use the below commands
exec('exiftool path/to/filename/ | grep Rotation');
from this we can get the rotation of the videos
if rotation is 90° the videos taken in portraite mode in iphone
if rotation is 0° the videos taken in landscape mode in iphone