MediaArea / MediaInfo

Convenient unified display of the most relevant technical and tag data for video and audio files.
https://MediaArea.net/MediaInfo
BSD 2-Clause "Simplified" License
1.32k stars 158 forks source link

Display Aspect Ratio rounding issue ? #171

Open Sami32 opened 7 years ago

Sami32 commented 7 years ago

I could have misunderstood that:

Height                                   : 480
Height                                   : 480 pixels
Sampled_Width                            : 720
Sampled_Height                           : 480
Pixel aspect ratio                       : 0.877
Display aspect ratio                     : 1.316
Display aspect ratio                     : 4:3
Original display aspect ratio            : 1.315
Original display aspect ratio            : 4:3

As for me 4/3 is not equal to 1.316, it seem that the PAR is used in the "raw" calculation field, but that doesn't really make sens to me: PAR = DAR / SAR. To me its look like the PAR and the DAR are incorrect.

General
Count                                    : 325
Count of stream of this kind             : 1
Kind of stream                           : General
Kind of stream                           : General
Stream identifier                        : 0
Count of video streams                   : 1
Count of audio streams                   : 2
Count of text streams                    : 1
Count of menu streams                    : 1
Video_Format_List                        : AVC
Video_Format_WithHint_List               : AVC
Codecs Video                             : AVC
Audio_Format_List                        : AAC / AC-3
Audio_Format_WithHint_List               : AAC / AC-3
Audio codecs                             : AAC LC / AC3
Text_Format_List                         : Timed Text
Text_Format_WithHint_List                : Timed Text
Text codecs                              : Timed
Menu_Format_List                         : Timed Text
Menu_Format_WithHint_List                : Timed Text
Menu codecs                              : text
Menu_Language_List                       : English
Complete name                            : F:\!MEDIA_TEST_FILES\UMS Video Testing Suite (20150121)\TESTS\INTERNAL SUBTITLES\UMS Bug Out of Sync_TX3G_subtitle.mp4
Folder name                              : F:\!MEDIA_TEST_FILES\UMS Video Testing Suite (20150121)\TESTS\INTERNAL SUBTITLES
File name                                : UMS Bug Out of Sync_TX3G_subtitle
File extension                           : mp4
Format                                   : MPEG-4
Format                                   : MPEG-4
Format/Extensions usually used           : mov mp4 m4v m4a m4b m4p 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v
Commercial name                          : MPEG-4
Format profile                           : Base Media / Version 2
Internet media type                      : video/mp4
Codec ID                                 : mp42
Codec ID                                 : mp42 (isom/iso2/avc1/mp41)
Codec ID/Url                             : http://www.apple.com/quicktime/download/standalone.html
CodecID_Compatible                       : isom/iso2/avc1/mp41
Codec                                    : MPEG-4
Codec                                    : MPEG-4
Codec/Extensions usually used            : mov mp4 m4v m4a m4b m4p 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v
File size                                : 7305472
File size                                : 6.97 MiB
File size                                : 7 MiB
File size                                : 7.0 MiB
File size                                : 6.97 MiB
File size                                : 6.967 MiB
Duration                                 : 22523
Duration                                 : 22 s 523 ms
Duration                                 : 22 s 523 ms
Duration                                 : 22 s 523 ms
Duration                                 : 00:00:22.523
Duration                                 : 00:00:22;15
Duration                                 : 00:00:22.523 (00:00:22;15)
Overall bit rate mode                    : VBR
Overall bit rate mode                    : Variable
Overall bit rate                         : 2594849
Overall bit rate                         : 2 595 kb/s
Frame rate                               : 29.970
Frame rate                               : 29.970 FPS
Frame count                              : 675
Stream size                              : 24456
Stream size                              : 23.9 KiB (0%)
Stream size                              : 24 KiB
Stream size                              : 24 KiB
Stream size                              : 23.9 KiB
Stream size                              : 23.88 KiB
Stream size                              : 23.9 KiB (0%)
Proportion of this stream                : 0.00335
HeaderSize                               : 40
DataSize                                 : 7281047
FooterSize                               : 24385
IsStreamable                             : No
Encoded date                             : UTC 2017-01-02 08:08:09
Tagged date                              : UTC 2017-01-02 08:08:09
File creation date                       : UTC 2017-01-03 13:07:40.320
File creation date (local)               : 2017-01-03 15:07:40.320
File last modification date              : UTC 2017-01-02 08:08:16.000
File last modification date (local)      : 2017-01-02 10:08:16.000
Writing application                      : HandBrake 1.0.1 2016122900
Writing application                      : HandBrake 1.0.1 2016122900

Video
Count                                    : 339
Count of stream of this kind             : 1
Kind of stream                           : Video
Kind of stream                           : Video
Stream identifier                        : 0
StreamOrder                              : 0
ID                                       : 1
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format/Url                               : http://developers.videolan.org/x264.html
Commercial name                          : AVC
Format profile                           : High@L4
Format settings                          : CABAC / 5 Ref Frames
Format settings, CABAC                   : Yes
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 5
Format settings, ReFrames                : 5 frames
Internet media type                      : video/H264
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Codec                                    : AVC
Codec                                    : AVC
Codec/Family                             : AVC
Codec/Info                               : Advanced Video Codec
Codec/Url                                : http://developers.videolan.org/x264.html
Codec/CC                                 : avc1
Codec profile                            : High@L4
Codec settings                           : CABAC / 5 Ref Frames
Codec settings, CABAC                    : Yes
Codec_Settings_RefFrames                 : 5
Duration                                 : 22523
Duration                                 : 22 s 523 ms
Duration                                 : 22 s 523 ms
Duration                                 : 22 s 523 ms
Duration                                 : 00:00:22.523
Duration                                 : 00:00:22;15
Duration                                 : 00:00:22.523 (00:00:22;15)
Bit rate                                 : 2247695
Bit rate                                 : 2 248 kb/s
Width                                    : 720
Width                                    : 720 pixels
Height                                   : 480
Height                                   : 480 pixels
Sampled_Width                            : 720
Sampled_Height                           : 480
Pixel aspect ratio                       : 0.877
Display aspect ratio                     : 1.316
Display aspect ratio                     : 4:3
Original display aspect ratio            : 1.315
Original display aspect ratio            : 4:3
Rotation                                 : 0.000
Frame rate mode                          : CFR
Frame rate mode                          : Constant
FrameRate_Mode_Original                  : VFR
Frame rate                               : 29.970
Frame rate                               : 29.970 (30000/1001) FPS
FrameRate_Num                            : 30000
FrameRate_Den                            : 1001
Frame count                              : 675
Standard                                 : NTSC
Resolution                               : 8
Resolution                               : 8 bits
Colorimetry                              : 4:2:0
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Chroma subsampling                       : 4:2:0
Bit depth                                : 8
Bit depth                                : 8 bits
Scan type                                : Progressive
Scan type                                : Progressive
Interlacement                            : PPF
Interlacement                            : Progressive
Bits/(Pixel*Frame)                       : 0.217
Stream size                              : 6327970
Stream size                              : 6.03 MiB (87%)
Stream size                              : 6 MiB
Stream size                              : 6.0 MiB
Stream size                              : 6.03 MiB
Stream size                              : 6.035 MiB
Stream size                              : 6.03 MiB (87%)
Proportion of this stream                : 0.86620
Writing library                          : x264 - core 148 r2708 86b7198
Writing library                          : x264 core 148 r2708 86b7198
Encoded_Library_Name                     : x264
Encoded_Library_Version                  : core 148 r2708 86b7198
Encoding settings                        : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=300 / keyint_min=30 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=25000 / vbv_bufsize=31250 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Encoded date                             : UTC 2017-01-02 08:08:09
Tagged date                              : UTC 2017-01-02 08:08:09
Color range                              : Limited
colour_description_present               : Yes
Color primaries                          : BT.601 NTSC
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.601
Menus                                    : 5

Audio #1
Count                                    : 277
Count of stream of this kind             : 2
Kind of stream                           : Audio
Kind of stream                           : Audio
Stream identifier                        : 0
Stream identifier                        : 1
StreamOrder                              : 1
ID                                       : 2
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Commercial name                          : AAC
Format profile                           : LC
Format settings, SBR                     : No (Explicit)
Format settings, SBR                     : No (Explicit)
Codec ID                                 : 40
Codec                                    : AAC LC
Codec                                    : AAC LC
Codec/Family                             : AAC
Codec/CC                                 : 40
Duration                                 : 21995
Duration                                 : 21 s 995 ms
Duration                                 : 21 s 995 ms
Duration                                 : 21 s 995 ms
Duration                                 : 00:00:21.995
Duration                                 : 00:00:21:44
Duration                                 : 00:00:21.995 (00:00:21:44)
Bit rate mode                            : VBR
Bit rate mode                            : Variable
Bit rate                                 : 154569
Bit rate                                 : 155 kb/s
Channel(s)                               : 2
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Channel positions                        : 2/0/0
ChannelLayout                            : L R
Samples per frame                        : 1024
Sampling rate                            : 48000
Sampling rate                            : 48.0 kHz
Samples count                            : 1055760
Frame rate                               : 46.875
Frame rate                               : 46.875 FPS (1024 spf)
Frame count                              : 1031
Compression mode                         : Lossy
Compression mode                         : Lossy
Stream size                              : 424967
Stream size                              : 415 KiB (6%)
Stream size                              : 415 KiB
Stream size                              : 415 KiB
Stream size                              : 415 KiB
Stream size                              : 415.0 KiB
Stream size                              : 415 KiB (6%)
Proportion of this stream                : 0.05817
Title                                    : Stereo / Stereo
Default                                  : Yes
Default                                  : Yes
Alternate group                          : 1
Alternate group                          : 1
Encoded date                             : UTC 2017-01-02 08:08:09
Tagged date                              : UTC 2017-01-02 08:08:09
Fallback From                            : 3
Menus                                    : 5

Audio #2
Count                                    : 308
Count of stream of this kind             : 2
Kind of stream                           : Audio
Kind of stream                           : Audio
Stream identifier                        : 1
Stream identifier                        : 2
StreamOrder                              : 2
ID                                       : 3
ID                                       : 3
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : AC-3
Format settings, Endianness              : Big
Codec ID                                 : ac-3
Codec                                    : AC3
Codec                                    : AC3
Codec/CC                                 : ac-3
Duration                                 : 21984
Duration                                 : 21 s 984 ms
Duration                                 : 21 s 984 ms
Duration                                 : 21 s 984 ms
Duration                                 : 00:00:21.984
Duration                                 : 00:00:22:05
Duration                                 : 00:00:21.984 (00:00:22:05)
Bit rate mode                            : CBR
Bit rate mode                            : Constant
Bit rate                                 : 192000
Bit rate                                 : 192 kb/s
Channel(s)                               : 2
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Channel positions                        : 2/0/0
ChannelLayout                            : L R
Samples per frame                        : 1536
Sampling rate                            : 48000
Sampling rate                            : 48.0 kHz
Samples count                            : 1055232
Frame rate                               : 31.250
Frame rate                               : 31.250 FPS (1536 spf)
Frame count                              : 687
Resolution                               : 16
Resolution                               : 16 bits
Bit depth                                : 16
Bit depth                                : 16 bits
Compression mode                         : Lossy
Compression mode                         : Lossy
Stream size                              : 527616
Stream size                              : 515 KiB (7%)
Stream size                              : 515 KiB
Stream size                              : 515 KiB
Stream size                              : 515 KiB
Stream size                              : 515.3 KiB
Stream size                              : 515 KiB (7%)
Proportion of this stream                : 0.07222
Title                                    : Stereo / Stereo
Service kind                             : CM
Service kind                             : Complete Main
Default                                  : Inherited From: 2
Default                                  : Inherited From: 2
Alternate group                          : 1
Alternate group                          : 1
Encoded date                             : UTC 2017-01-02 08:08:09
Tagged date                              : UTC 2017-01-02 08:08:09
Fallback To                              : 2
bsid                                     : 8
dialnorm                                 : -27
dialnorm                                 : -27 dB
compr                                    : 5.74
compr                                    : 5.74 dB
dynrng                                   : 11.33
dynrng                                   : 11.33 dB
dsurmod                                  : 1
dsurmod                                  : Not Dolby Surround encoded
acmod                                    : 2
lfeon                                    : 0
dialnorm_Average                         : -27
dialnorm_Average                         : -27 dB
dialnorm_Minimum                         : -27
dialnorm_Minimum                         : -27 dB
dialnorm_Maximum                         : -27
dialnorm_Maximum                         : -27 dB
dialnorm_Count                           : 32
compr_Average                            : 5.74
compr_Average                            : 5.74 dB
compr_Minimum                            : 5.74
compr_Minimum                            : 5.74 dB
compr_Maximum                            : 5.74
compr_Maximum                            : 5.74 dB
compr_Count                              : 32
dynrng_Average                           : 11.50
dynrng_Average                           : 11.50 dB
dynrng_Minimum                           : 11.33
dynrng_Minimum                           : 11.33 dB
dynrng_Maximum                           : 11.62
dynrng_Maximum                           : 11.62 dB
dynrng_Count                             : 32

Text
Count                                    : 237
Count of stream of this kind             : 1
Kind of stream                           : Text
Kind of stream                           : Text
Stream identifier                        : 0
StreamOrder                              : 3
ID                                       : 4
ID                                       : 4
Format                                   : Timed Text
Commercial name                          : Timed Text
Muxing mode                              : sbtl
Codec ID                                 : tx3g
Codec ID/Url                             : http://www.apple.com/quicktime/download/standalone.html
Codec                                    : tx3g
Codec                                    : Timed
Codec/Info                               : Timed text (3GPP)
Codec/Url                                : http://www.apple.com/quicktime/download/standalone.html
Duration                                 : 17919
Duration                                 : 17 s 919 ms
Duration                                 : 17 s 919 ms
Duration                                 : 17 s 919 ms
Duration                                 : 00:00:17.919
Duration                                 : 00:00:19:00
Duration                                 : 00:00:17.919 (00:00:19:00)
Bit rate mode                            : VBR
Bit rate mode                            : Variable
Bit rate                                 : 207
Bit rate                                 : 207 b/s
Frame rate                               : 1.060
Frame rate                               : 1.060 FPS
Frame count                              : 19
Stream size                              : 463
Stream size                              : 463 Bytes (0%)
Stream size                              : 463 Bytes
Stream size                              : 463 Bytes
Stream size                              : 463 Bytes
Stream size                              : 463.0 Bytes
Stream size                              : 463 Bytes (0%)
Proportion of this stream                : 0.00006
Default                                  : Yes
Default                                  : Yes
Forced                                   : No
Forced                                   : No
Alternate group                          : 3
Alternate group                          : 3
Encoded date                             : UTC 2017-01-02 08:08:09
Tagged date                              : UTC 2017-01-02 08:08:09
Menus                                    : 5

Menu
Count                                    : 96
Count of stream of this kind             : 1
Kind of stream                           : Menu
Kind of stream                           : Menu
Stream identifier                        : 0
StreamOrder                              : 4
ID                                       : 5
ID                                       : 5
Format                                   : Timed Text
Commercial name                          : Timed Text
Codec ID                                 : text
Codec                                    : text
Codec                                    : text
Duration                                 : 22022
Duration                                 : 22 s 22 ms
Duration                                 : 22 s 22 ms
Duration                                 : 22 s 22 ms
Duration                                 : 00:00:22.022
Duration                                 : 00:00:22.022
Language                                 : en
Language                                 : English
Language                                 : English
Language                                 : en
Language                                 : eng
Language                                 : en
Chapters_Pos_Begin                       : 92
Chapters_Pos_End                         : 93
Encoded date                             : UTC 2017-01-02 08:08:09
Tagged date                              : UTC 2017-01-02 08:08:09
Menu For                                 : 1,2,4
00:00:00.000                             : Chapter 1

UMS Bug Out of Sync_TX3G_subtitle.mp4.txt

JeromeMartinez commented 7 years ago

Hum, first I see an ugly rounding issue (1.316 vs 1.315), I need to fix that. "4/3" is a "category" of display, not the precise thing. So e.g. all between 1.3 and 1.4 is considered in the 4/3 category (vs 16:9 for example). "4/3" is not the reference (it is taken from the raw value). with CLI, add " --Language=raw" for seeing the additional "/String" string in the field name.

720/480*0.877=1.316, so it looks fine.

Remind that aspect ratio is source of big issues (e.g. NTSC says that Pixel Aspect Ratio is 10/11, for 4:3 screen you need a width of 704, not 720, and a lot of people use 720x480 with a DAR of 4:3 exactly so not NTSC but they think it is NTSC).

Note: I don't have files with a PAR of 0.877, curious of having one for seeing how PAR is stored in it.

Sami32 commented 7 years ago

Hum, first I see an ugly rounding issue (1.316 vs 1.315), I need to fix that.

I saw that weird think without been sure that it was an issue, so i've now modified the title's issue. Thanks for the explanation.

Remind that aspect ratio is source of big issues (e.g. NTSC says that Pixel Aspect Ratio is 10/11, for 4:3 screen you need a width of 704, not 720, and a lot of people use 720x480 with a DAR of 4:3 exactly so not NTSC but they think it is NTSC).

Actually i checked it because we use much more for anamorphic videos, mainly used in Mangas or cartoons. I admit that after having read your comment, i get confuse: (as its seem to me that it'll be a NTSC with a PAR of 10:11) capture_07102017_185212 capture_07102017_184631

Note: I don't have files with a PAR of 0.877, curious of having one for seeing how PAR is stored in it.

Hehe... i did anticipate it :wink: , and added the sample in an edit, but only few seconds later the first post, so i guess that it didn't get displayed in your Email notification.