Adding tags on a GStreamer created file makes header invalid
First, thank you for fixing #3325 (closed). Mkvpropedit no longer crashes when adding tags to videos created with GStreamer. But unfortunately, the resulting file now seems to have an invalid header.
Test case is the same as in #3325 (closed), now using mkvtoolnix 68.0.0.
Checking the resulting file with ffprobe shows the following errors and it can't show any tags or duration anymore:
ffprobe version 4.3.4-0+deb11u1 Copyright (c) 2007-2021 the FFmpeg developers
built with gcc 10 (Debian 10.2.1-6)
configuration: --prefix=/usr --extra-version=0+deb11u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
[matroska,webm @ 0x563948f42ac0] Element at 0x4b ending at 0x1aec9a00000054 exceeds containing master element ending at 0x13f7
[matroska,webm @ 0x563948f42ac0] Element at 0x7d ending at 0x1fda exceeds containing master element ending at 0x1429
[matroska,webm @ 0x563948f42ac0] Element at 0x8d ending at 0x1fea exceeds containing master element ending at 0x1439
[matroska,webm @ 0x563948f42ac0] Element at 0x9d ending at 0x1ffb exceeds containing master element ending at 0x1449
[matroska,webm @ 0x563948f42ac0] Duplicate element
Truncating packet of size 1875 to 420
Input #0, matroska,webm, from 'test.mkv':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0(eng): Video: h264 (High 4:4:4 Predictive), yuv444p(tv, smpte170m, progressive), 320x240 [SAR 1:1 DAR 4:3], 30 fps, 30 tbr, 1k tbn, 60 tbc (default)
Metadata:
title : Video
To ensure that it's not a ffprobe bug, I also tried "mkvmerge -i" which also resulted in an error. It was working before calling mkvpropedit to add the tags.
Error: The demultiplexer for the file 'test.mkv' failed to initialize:
The file headers could not be parsed, e.g. because they're incomplete, invalid or damaged.
header.txt mkvinfo -a output for the invalid file