[FFmpeg-devel] [PATCH] Compute individual stream durations in matroska muxer. Write them as binary tags. Parse the binary tags in matroska demuxer, and write them to AVStream

wm4 nfxjfg at googlemail.com
Wed Jul 29 10:31:37 CEST 2015


On Tue, 28 Jul 2015 12:39:59 -0700
Sasi Inguva <isasi at google.com> wrote:

> Signed-off-by: Sasi Inguva <isasi at google.com>
> ---
>  libavformat/matroska.h       |  1 +
>  libavformat/matroskadec.c    | 21 +++++++++++++-
>  libavformat/matroskaenc.c    | 66 ++++++++++++++++++++++++++++++++++++++------
>  tests/fate/wavpack.mak       |  4 +--
>  tests/ref/acodec/tta         |  4 +--
>  tests/ref/fate/binsub-mksenc |  2 +-
>  tests/ref/lavf/mkv           |  8 +++---
>  tests/ref/seek/lavf-mkv      | 44 ++++++++++++++---------------
>  8 files changed, 109 insertions(+), 41 deletions(-)
> 

Am I right with these assumptions:
- this will write tags by default, while it didn't before this patch
- the tags are written to the end of the stream (and not close to the
  start of it)

If so, this will require a seek to the end of the file when loading
it, while this could be avoided before. It breaks fast loading of
network streams. I'm not really fond of this.

(I know, mkvmerge commits similar sins.)


More information about the ffmpeg-devel mailing list