[FFmpeg-devel] Serious Regression in matroskaenc:

Soft Works softworkz at hotmail.com
Fri Dec 23 13:31:26 EET 2016

From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> on behalf of Paul B Mahol <onemda at gmail.com>
Sent: Friday, December 23, 2016 12:21 PM
To: FFmpeg development discussions and patches
Subject: Re: [FFmpeg-devel] Serious Regression in matroskaenc:

On 12/23/16, Soft Works <softworkz at hotmail.com> wrote:
> Hello everybody,
> it's been a while since my contribution to matroskaenc in July. In case you
> don't remember my scenario - it's about realtime transcoding and and
> streaming of mkv files.
> That means that the header is sent to the client before the ffmpeg process
> is completed.
> In this context we discovered that the preliminary mkv header that is
> written initially is corrupted in some way!
> When transcoding is aborted or completed, the header is written a second
> time, overwriting a few things. This final header write operation always
> fixes the problem and leaves the file with a correct header.
> I haven't investigated yet, what's actually being written wrong. I used
> different parsing implementations (mediainfo, ffprobe, mkvvalidator,
> mkvtoolnix) and all are producing different results. Some report CRC error,
> others report unknown or duplicate header elements. Some are able to detect
> the stream information others are not.
> Now, I'm wondering if one of you guys could take care of this? Or do I have
> to find the bug on my own?

>> Do you have steps to reproduce this?

To reproduce, transcode an mkv file, even if all streams are simply copied.

While the transcoding is in progress, I copied the output file to another file 
(works on Windows at least), but probably you can simply kill the ffmpeg process.

Only thing that you shouldn't do is breaking the ffmpeg process via key commands
because in this case the header would still be finalized.

On the result file, you can run various diagnostics then. I tried mediainfo, 
ffprobe, mkvvalidator, mkvtoolnix. All showed different results but
always with errors.

This doesn't happen with matroskaenc.c from July 17, 2016 and other versions 
before that date.


More information about the ffmpeg-devel mailing list