[FFmpeg-user] Matroska decoding errors - element at * ending at * exceeds containing master element ending at *

Kieran O'Leary kieran.oleary at irishfilm.ie
Fri Jul 5 17:57:54 EEST 2019


Hi,

I recently upgraded ffmpeg and suddenly started to get errors when decoding Matroska files. My colleague Yujing Huang discovered this when making a H264 file from a FFV1/MKV 57 second file, and a single frame was duplicated from 26 seconds to 48 seconds. When decoding the file with -f null - , we got this error:

[matroska,webm @ 0x7fcf3a80b000] Element at 0x32c212a ending at 0x32c68b1 exceeds containing master element ending at 0x32c2123


I am able to replicate the issue with git-master creating a file like this:


$ ./ffmpeg -f lavfi -i testsrc -t 1 1sec.mkv

ffmpeg version N-94168-g0f39ef4db2 Copyright (c) 2000-2019 the FFmpeg developers

  built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)

  configuration:

  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.100 /  7. 56.100

  libswscale      5.  4.101 /  5.  4.101

  libswresample   3.  4.100 /  3.  4.100

Input #0, lavfi, from 'testsrc':

  Duration: N/A, start: 0.000000, bitrate: N/A

    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc

File '1sec.mkv' already exists. Overwrite ? [y/N] y

Stream mapping:

  Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native))

Press [q] to stop, [?] for help

[mpeg4 @ 0x7fdab3002a00] too many threads/slices (16), reducing to 15

Output #0, matroska, to '1sec.mkv':

  Metadata:

    encoder         : Lavf58.28.101

    Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 1k tbn, 25 tbc

    Metadata:

      encoder         : Lavc58.53.101 mpeg4

    Side data:

      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1

frame=   25 fps=0.0 q=1.6 Lsize=      49kB time=00:00:00.96 bitrate= 419.5kbits/s speed=21.7x

video:48kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.987251%


and decoding it with


$ ./ffmpeg -i 1sec.mkv -f null -

ffmpeg version N-94168-g0f39ef4db2 Copyright (c) 2000-2019 the FFmpeg developers

  built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)

  configuration:

  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.100 /  7. 56.100

  libswscale      5.  4.101 /  5.  4.101

  libswresample   3.  4.100 /  3.  4.100

Input #0, matroska,webm, from '1sec.mkv':

  Metadata:

    ENCODER         : Lavf58.28.101

  Duration: 00:00:01.00, start: 0.000000, bitrate: 403 kb/s

    Stream #0:0: Video: mpeg4 (Simple Profile), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 1k tbn, 25 tbc (default)

    Metadata:

      ENCODER         : Lavc58.53.101 mpeg4

      DURATION        : 00:00:01.000000000

Stream mapping:

  Stream #0:0 -> #0:0 (mpeg4 (native) -> wrapped_avframe (native))

Press [q] to stop, [?] for help

Output #0, null, to 'pipe:':

  Metadata:

    encoder         : Lavf58.28.101

    Stream #0:0: Video: wrapped_avframe, yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)

    Metadata:

      DURATION        : 00:00:01.000000000

      encoder         : Lavc58.53.101 wrapped_avframe

[matroska,webm @ 0x7ff200805200] Element at 0xc4a2 ending at 0xc4dd exceeds containing master element ending at 0xc49d

frame=   25 fps=0.0 q=-0.0 Lsize=N/A time=00:00:01.00 bitrate=N/A speed=  84x

video:13kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown




Best,

Kieran O'Leary
Irish Film Institute


------
This email has been scanned for spam and malware by The Email Laundry.




More information about the ffmpeg-user mailing list