ffprobe aspect ration

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

ffprobe aspect ration

Jon bae
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]

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffprobe aspect ration

Carl Eugen Hoyos-2
Am Sa., 31. Aug. 2019 um 21:49 Uhr schrieb Jonathan Baecker
<[hidden email]>:

> 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?

How can FFmpeg be sure?

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffprobe aspect ration

Jon bae
Am 31.08.2019 um 22:06 schrieb Carl Eugen Hoyos:

> Am Sa., 31. Aug. 2019 um 21:49 Uhr schrieb Jonathan Baecker
> <[hidden email]>:
>
>> 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?
> How can FFmpeg be sure?
>
So you think mediainfo, or ffmpeg just guessing the aspect, when is not
present?
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffprobe aspect ration

Carl Eugen Hoyos-2
Am Sa., 31. Aug. 2019 um 22:26 Uhr schrieb Jonathan Baecker:

>
> Am 31.08.2019 um 22:06 schrieb Carl Eugen Hoyos:
> > Am Sa., 31. Aug. 2019 um 21:49 Uhr schrieb Jonathan Baecker
> > <[hidden email]>:
> >
> >> 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?
> >>
> > How can FFmpeg be sure?
> >
> So you think mediainfo, or ffmpeg just guessing the aspect, when is not
> present?

I haven't seen your sample, a bug in FFmpeg is of course possible.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffprobe aspect ration

Jon bae
Am 01.09.2019 um 00:53 schrieb Carl Eugen Hoyos:

> Am Sa., 31. Aug. 2019 um 22:26 Uhr schrieb Jonathan Baecker:
>> Am 31.08.2019 um 22:06 schrieb Carl Eugen Hoyos:
>>> Am Sa., 31. Aug. 2019 um 21:49 Uhr schrieb Jonathan Baecker
>>> <[hidden email]>:
>>>
>>>> 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?
>>>>
>>> How can FFmpeg be sure?
>>>
>> So you think mediainfo, or ffmpeg just guessing the aspect, when is not
>> present?
> I haven't seen your sample, a bug in FFmpeg is of course possible.
>
Here I have an example file: https://blog.pixelcrusher.de/files/noaspect.mp4
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".