How to get aspect ratio from a video file? (For example, 16: 9 or 4: 3)?
Install the mediainfo tool. Run it with mediainfo -f --Output=XML <file> to test it.
mediainfo -f --Output=XML <file>
PS: In my case (openSUSE, mediainfo 0.7.34 the --Output option was ignored).
You can use ffmpeg for this:
ffmpeg
my ($aspect) = `ffmpeg -i filename.mov 2>&1` =~ /DAR\s*(\d+:\d+)/;
Or ffprobe :
ffprobe
my ($aspect) = `ffprobe -i filename.mov -show_streams 2>&1` =~ /display_aspect_ratio=(.+)/;
Source: https://habr.com/ru/post/1380176/More articles:https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1380171/beanstalkd-what-happens-to-reserved-but-not-completed-jobs&usg=ALkJrhjdI9vDR3eLudchbcewdDbMbI1W3ACan PHP-FPM be used to manage queue consumers? - phpProblem using Zxing through intent if Google glasses are installed - androidFPDF image under layout - phphttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1380175/using-ruby-and-stomp-to-write-messages-to-activemq&usg=ALkJrhjFjPo5tpjwFdZ4JaHlI877IkxjawImageNew toBase64 encoding issue with quality loss in ColdFusion - coldfusionEXIF as a thing for video - c ++Is there a way I can set [Authorize (Roles = "admin")] for every action in the MVC controller - asp.net-mvcCan I get downloaded files in PHP without storing them in the file system? - phpJava: How to draw strring () from a line - javaAll Articles