#1776 closed defect (invalid)
ffprobe shows PAR as SAR
Reported by: | henry | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | ffprobe |
Version: | unspecified | Keywords: | aspect |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | yes |
Description
Summary of the bug:
use ffprobe to show souce file info , seems it doesn't show PAR (instead of SAR) .
How to reproduce:
% ffprobe -i 12.mp4 ffprobe version 0.10.2 Copyright (c) 2007-2012 the FFmpeg developers built on Mar 20 2012 04:34:50 with gcc 4.4.6 20110731 (Red Hat 4.4.6-3) configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --enable-runtime-cpudetect --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --enable-pthreads --enable-x11grab --enable-vdpau --disable-avisynth --enable-frei0r --enable-libopencv --enable-libdc1394 --enable-libdirac --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --disable-stripping libavutil 51. 35.100 / 51. 35.100 libavcodec 53. 61.100 / 53. 61.100 libavformat 53. 32.100 / 53. 32.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 61.100 / 2. 61.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 6.100 / 0. 6.100 libpostproc 52. 0.100 / 52. 0.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '12.mp4': Metadata: major_brand : mp42 minor_version : 1 compatible_brands: isommp423gp5 creation_time : 2012-09-23 02:49:14 Duration: 00:00:21.03, start: 0.000000, bitrate: 288 kb/s Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 24000 Hz, stereo, s16, 63 kb/s Metadata: creation_time : 2012-09-23 02:49:14 handler_name : GPAC ISO Audio Handler Stream #0:1(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 160x120 [SAR 1:1 DAR 4:3], 224 kb/s, 23.97 fps, 23.97 tbr, 2397 tbn, 47.94 tbc Metadata: creation_time : 1970-01-01 00:00:00 handler_name : VideoHandler
Attachments (1)
Change History (8)
by , 12 years ago
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Analyzed by developer: | set |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Hi,
latest FFmpeg favors "SAR" over "PAR", you're using versions of ffmpeg/ffprobe belonging to different releases, so that explains the inconsistency.
follow-up: 4 comment:3 by , 12 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
according to http://en.wikipedia.org/wiki/Pixel_aspect_ratio : PAR = DAR/SAR
so for first " Stream #0:1(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 160x120 [SAR 1:1 DAR 4:3], 224 kb/s, 23.97 fps, 23.97 tbr, 2397 tbn, 47.94 tbc"
SAR=1:1 , and PAR=(4:3)/(1:1)=4:3
for second Stream #0.1(eng): Video: h264, yuv420p, 160x120 [PAR 1:1 DAR 4:3], 224 kb/s, 23.97 fps, 23.97 tbr, 2397 tbn, 47.94 tbc
PAR=1:1 , and SAR=DAR/PAR=(4:3)/(1:1)=4:3
though i use different version ffprobe/ffmpeg, but i get different PAR and SAR value , which value i can trust or which version i can trust ?
comment:4 by , 12 years ago
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
Replying to henry:
according to http://en.wikipedia.org/wiki/Pixel_aspect_ratio : PAR = DAR/SAR
so for first " Stream #0:1(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 160x120 [SAR 1:1 DAR 4:3], 224 kb/s, 23.97 fps, 23.97 tbr, 2397 tbn, 47.94 tbc"
SAR=1:1 , and PAR=(4:3)/(1:1)=4:3
for second Stream #0.1(eng): Video: h264, yuv420p, 160x120 [PAR 1:1 DAR 4:3], 224 kb/s, 23.97 fps, 23.97 tbr, 2397 tbn, 47.94 tbc
PAR=1:1 , and SAR=DAR/PAR=(4:3)/(1:1)=4:3
though i use different version ffprobe/ffmpeg, but i get different PAR and SAR value , which value i can trust or which version i can trust ?
No, for FFmpeg:
Sample Aspect Ratio (SAR) == Pixel Aspect Ratio (PAR) (same thing with different names)
Display Aspect Ration (DAR) = SAR * w / h
follow-up: 6 comment:5 by , 12 years ago
got it , also if that means
- for ffprobe , PAR == SAR ?
- in ffproble, always only show [SAR XX:xx , DAR X:xx] , nerver show [PAR xx:xx DAR XX:XX] ?
- in ffmpeg, always only show [PAR XX:xx , DAR X:xx] , nerver show [SAR xx:xx DAR XX:XX] ?
comment:6 by , 12 years ago
Replying to henry:
got it , also if that means
- for ffprobe , PAR == SAR ?
- in ffproble, always only show [SAR XX:xx , DAR X:xx] , nerver show [PAR xx:xx DAR XX:XX] ?
- in ffmpeg, always only show [PAR XX:xx , DAR X:xx] , nerver show [SAR xx:xx DAR XX:XX] ?
No. Previuosly, FFmpeg was using "PAR" in place of "SAR" all over the place, at some point we decided to switch to SAR, see commit:
commit fdd130a2131912133c72b5ff532726784aaa70a2 Author: Stefano Sabatini <stefano.sabatini-lala@poste.it> Date: Wed Jul 27 10:35:08 2011 +0200 prefer "SAR" over "PAR" in av_dump_format() "SAR" (Sample Aspect Ratio) is globally preferred over "PAR" (Pixel Aspect Ratio), although the two terms share the same semantics. For example the corresponding AVStream field is called sample_aspect_ratio, and libavfilter has a filter named setsar. Therefore prefer the term "SAR" over "PAR" in the libavformat/utils.c:dump_stream_format() and avcodec_string() output for avoiding confusion.
The ffprobe/ffmpeg inconsistency you observed is due to the use of different releases.
comment:7 by , 12 years ago
Keywords: | aspect added; ffprobe PAR SAR removed |
---|
but ffmpeg will show [PAR:xx,DAR:xx] , see: