如何使用ffmpeg php检查视频是风景还是肖像? [英] how to check if video is landscape or portrait using ffmpeg php?
问题描述
在使用ffmpge旋转之前,我必须检查视频是横向或纵向。
请帮助我。
使用ffmpeg我们不能检查视频是采取横向模式还是在iPhone中的portrite模式。
我们需要安装mediainfo或exiftool
如果我们安装exiftool使用以下命令
exec('exiftool path / to / filename / | grep Rotation');
从这个角度来看,如果旋转角度为90°,则可以在视频中拍摄视频
在iPhone中的模式
如果旋转为0°,在iPhone中以横向模式拍摄的视频
I have to check the video is landscape or portrait before rotate using ffmpge . please help me.
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
这篇关于如何使用ffmpeg php检查视频是风景还是肖像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!