MediaArea / MediaInfoLib

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
616 stars 169 forks source link

Matroska Frame rate wrong #874

Open mkver opened 6 years ago

mkver commented 6 years ago

It seems that MediaInfo now uses the DURATION and NUMBER_OF_FRAMES tags that mkvmerge adds to calculate the frame rate. But unfortunately it doesn't take into account that a "frame" in Matroska parlance is simply another term for (Simple)Block, it needn't be a frame in the usual sense. It can also contain a field. And in such a case MediaInfo's output is something like this (this is cfr video with 50 fields per second (although the content is actually 25p)):

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.1
Format settings                          : CABAC / 3 Ref Frames
Format settings, CABAC                   : Yes
Format settings, RefFrames               : 3 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 3 s 0 ms
Bit rate mode                            : Variable
Bit rate                                 : 22.4 Mb/s
Maximum bit rate                         : 24.0 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Frame rate                               : 50.000 FPS
Original frame rate                      : 25.000 FPS
Standard                                 : PAL
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan type, store method                  : Separated fields
Scan order                               : Top Field First
Bits/(Pixel*Frame)                       : 0.216
Stream size                              : 8.01 MiB (100%)
Language                                 : German
Default                                  : No
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Here is a sample. MBAFF (where two fields are stored in each block) is fine.

JeromeMartinez commented 6 years ago

Good point, something to be fixed.