#9497(undetermined:new): ffmpeg reports wrong display aspect ratio (DAR) for matroska files.
#9497: ffmpeg reports wrong display aspect ratio (DAR) for matroska files. -------------------------------------+------------------------------------- Reporter: Rikitiki | Type: defect Status: new | Priority: normal Component: | Version: undetermined | unspecified Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- ffmpeg reports wrong display aspect ratio (DAR) for matroska files. If DAR is 160:67 then ffprobe displays: {{{ "sample_aspect_ratio": "90:67", "display_aspect_ratio": "160:67", }}} and mkvinfo displays: {{{ | + Display width: 160 | + Display height: 67 }}} If DAR is 161:67 then ffprobe displays: {{{ "sample_aspect_ratio": "123:91", "display_aspect_ratio": "656:273", }}} and mkvinfo displays: {{{ | + Display width: 161 | + Display height: 67 }}} A matroska file is created by mkvmerge from raw h264 stream. The h264 stream is created by ffmpeg from bmp files. How to reproduce: 1. unpack attcahed file 2. replace VAR_FFMPEG_BINS & MKVMERGE_BINS to right location of the tools 3. execute run.cmd to obtain output Pay attention to CASE_1 & CASE_2 texts to change input DAR ffmpeg version: ffmpeg-4.4.1-full_build mkvmerge version: mkvtoolnix-64-bit-62.0.0 -- Ticket URL: <https://trac.ffmpeg.org/ticket/9497> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#9497: ffmpeg reports wrong display aspect ratio (DAR) for matroska files. -------------------------------------+------------------------------------- Reporter: Rikitiki | Owner: (none) Type: defect | Status: new Priority: normal | Component: | undetermined Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by Rikitiki): * Attachment "badout.txt" added. -- Ticket URL: <https://trac.ffmpeg.org/ticket/9497> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#9497: ffmpeg reports wrong display aspect ratio (DAR) for matroska files. -------------------------------------+------------------------------------- Reporter: Rikitiki | Owner: (none) Type: defect | Status: new Priority: normal | Component: | undetermined Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by Rikitiki): * Attachment "goodout.txt" added. -- Ticket URL: <https://trac.ffmpeg.org/ticket/9497> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#9497: ffmpeg reports wrong display aspect ratio (DAR) for matroska files. -------------------------------------+------------------------------------- Reporter: Rikitiki | Owner: (none) Type: defect | Status: new Priority: normal | Component: | undetermined Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by Rikitiki): * Attachment "ffmpegbug.zip" added. -- Ticket URL: <https://trac.ffmpeg.org/ticket/9497> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#9497: ffmpeg reports wrong display aspect ratio (DAR) for matroska files. -------------------------------------+------------------------------------- Reporter: Rikitiki | Owner: (none) Type: defect | Status: closed Priority: normal | Component: | undetermined Version: unspecified | Resolution: wontfix Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by Gyan): * status: new => closed * resolution: => wontfix Comment: Matroska stores [https://www.matroska.org/technical/elements.html#DisplayWidth DisplayWidth and DisplayHeight]. ffmpeg stores Sample Aspect Ratio in its internal contexts. The former is the effective ratio of the displayed dimensions. The latter is the 'scale factor' to be applied to the decoder output for processing or display purposes. When converting the former to SAR, rounding may occur. Which in turn, may lead to a slightly different DAR computed by ffmpeg. -- Ticket URL: <https://trac.ffmpeg.org/ticket/9497#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#9497: ffmpeg reports wrong display aspect ratio (DAR) for matroska files. -------------------------------------+------------------------------------- Reporter: Rikitiki | Owner: (none) Type: defect | Status: reopened Priority: normal | Component: | undetermined Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by Rikitiki): * status: closed => reopened * resolution: wontfix => Comment: To prevent the rounding, can ffmpeg store Sample Aspect Ratio in its internal contexts as rational number? Something like [https://www.boost.org/doc/libs/1_77_0/libs/rational/rational.html] or [https://docs.python.org/3/library/fractions.html]. -- Ticket URL: <https://trac.ffmpeg.org/ticket/9497#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#9497: ffmpeg reports wrong display aspect ratio (DAR) for matroska files. -------------------------------------+------------------------------------- Reporter: Rikitiki | Owner: (none) Type: defect | Status: closed Priority: normal | Component: | undetermined Version: unspecified | Resolution: wontfix Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by Gyan): * status: reopened => closed * resolution: => wontfix Comment: It already does. It still has to be expressed as two integers. -- Ticket URL: <https://trac.ffmpeg.org/ticket/9497#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#9497: ffmpeg reports wrong display aspect ratio (DAR) for matroska files. -------------------------------------+------------------------------------- Reporter: Rikitiki | Owner: (none) Type: defect | Status: reopened Priority: normal | Component: | undetermined Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by Rikitiki): * status: closed => reopened * resolution: wontfix => Comment: If it is expressed as two integers (as fractional) then rounding errors, mentioned early by you, must not exist. So must be {{{ "display_aspect_ratio": "161:67", }}} instead {{{ "display_aspect_ratio": "656:273", }}} ... -- Ticket URL: <https://trac.ffmpeg.org/ticket/9497#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#9497: ffmpeg reports wrong display aspect ratio (DAR) for matroska files. ------------------------------------+------------------------------------ Reporter: Rikitiki | Owner: (none) Type: defect | Status: reopened Priority: normal | Component: avformat Version: git-master | Resolution: Keywords: mkv | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 1 | ------------------------------------+------------------------------------ Changes (by mkver): * analyzed: 0 => 1 * keywords: => mkv * version: unspecified => git-master * component: undetermined => avformat * reproduced: 0 => 1 -- Ticket URL: <https://trac.ffmpeg.org/ticket/9497#comment:5> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#9497: ffmpeg reports wrong display aspect ratio (DAR) for matroska files. ------------------------------------+------------------------------------ Reporter: Rikitiki | Owner: (none) Type: defect | Status: closed Priority: normal | Component: avformat Version: git-master | Resolution: fixed Keywords: mkv | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 1 | ------------------------------------+------------------------------------ Changes (by mkver): * status: reopened => closed * resolution: => fixed Comment: Fixed in 9139dc6140e8fb8d84760f3c567332b41858798d. -- Ticket URL: <https://trac.ffmpeg.org/ticket/9497#comment:6> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg