[FFmpeg-user] ffprobe aspect ration

Jonathan Baecker jonbae77 at gmail.com
Sat Aug 31 22:41:17 EEST 2019


Hello,

I figure out that ffprobe not always show the "display_aspect_ratio", 
but mediainfo does. Is there any technical reason for that? Or is there 
another way to get this info, instead of using "-show_streams". I could 
calculate the aspect from resolution but how could I be sure that the 
pixels are square?

Here are a uncut output:

ffprobe -i D:\char.mp4 -select_streams v:0 -show_streams
ffprobe version N-94265-gecdb6fbe18 Copyright (c) 2007-2019 the FFmpeg 
developers
   built with gcc 9.1.0 (Rev3, Built by MSYS2 project)
   configuration:  --enable-sdl2 --enable-gmp --enable-libmp3lame 
--enable-libvpx --enable-libx264 --enable-libx265 --enable-fontconfig 
--enable-libfreetype --enable-libmysofa --enable-libopenjpeg 
--enable-libsoxr --enable-libtwolame --enable-libwavpack 
--enable-libwebp --enable-libxml2 --enable-libzimg --enable-gpl 
--enable-avisynth --enable-chromaprint --enable-libfdk-aac 
--enable-libfribidi --enable-librubberband --enable-libzmq 
--enable-opengl --enable-libsrt --enable-libaom --enable-schannel 
--extra-cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DCHROMAPRINT_NODLL 
--extra-libs=-lstdc++ --extra-cflags=-DZMQ_STATIC 
--extra-cflags=-DLIBXML_STATIC --enable-version3 --enable-nonfree 
--disable-stripping
   libavutil      56. 30.100 / 56. 30.100
   libavcodec     58. 53.101 / 58. 53.101
   libavformat    58. 28.101 / 58. 28.101
   libavdevice    58.  7.100 / 58.  7.100
   libavfilter     7. 56.101 /  7. 56.101
   libswscale      5.  4.101 /  5.  4.101
   libswresample   3.  4.100 /  3.  4.100
   libpostproc    55.  4.100 / 55.  4.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\char.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     encoder         : Lavf58.28.101
   Duration: 00:04:07.53, start: 0.000000, bitrate: 9085 kb/s
     Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 
0x31637661), yuv420p, 1920x1080, 8953 kb/s, 25 fps, 25 tbr, 12800 tbn, 
50 tbc (default)
     Metadata:
       handler_name    : VideoHandler
     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 
stereo, fltp, 127 kb/s (default)
     Metadata:
       handler_name    : SoundHandler
[STREAM]
index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
profile=Constrained Baseline
codec_type=video
codec_time_base=1/50
codec_tag_string=avc1
codec_tag=0x31637661
width=1920
height=1080
coded_width=1920
coded_height=1088
has_b_frames=0
sample_aspect_ratio=N/A
display_aspect_ratio=N/A
pix_fmt=yuv420p
level=40
color_range=unknown
color_space=unknown
color_transfer=unknown
color_primaries=unknown
chroma_location=left
field_order=unknown
timecode=N/A
refs=1
is_avc=true
nal_length_size=4
id=N/A
r_frame_rate=25/1
avg_frame_rate=25/1
time_base=1/12800
start_pts=0
start_time=0.000000
duration_ts=3168256
duration=247.520000
bit_rate=8953725
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=6188
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:language=und
TAG:handler_name=VideoHandler
[/STREAM]



More information about the ffmpeg-user mailing list