[FFmpeg-devel] MXF seeking
tomas.hardin at codemill.se
Tue May 10 13:09:04 CEST 2011
Georg Lippitsch skrev 2011-05-08 20:34:
> is anyone working on proper (index based) seeking support in mxf files?
> I intend to work on this, but it would be good to know if someone has
> already some patches.
Me and Benjamin worked on this a bit, but didn't come up with anything
In the end we realized that the proper solution is to do what mov.c
does. In other words, build AVIndexEntry arrays from all the index
tables in the file (there _will_ be more than one index). Then use the
index arrays to handle demuxing and seeking.
> Also, why was Maksym Veremeyenkos patch for clip-wrapped mxf files never
> committed? AFIAK there where no objections against it in the end ...
First, I (and Baptiste too IIRC) had objections to the patch that
extends the wrapping type list, seemingly needlessly duplicating every
entry. However, I have encountered more "interesting" MXF files
recently. Basically: you can't just look at the last byte of the UL to
figure out the wrapping type. Hence the objections are moot and that
patch should be OK.
The other problem was the last patch, which implemented CBR
(EditUnitByteCount > 0) demuxing in a rather ugly fashion. However, if
an AVIndexEntry-implementation is used as suggested above, then CBR
media can be handled OK as well.
Note that the reason I mention EditUnitByteCount and multiple indexes is
because we've encountered semi-CBR files with two index tables. One
table for the first packet, and another for the rest, where the first
packet is slightly bigger than the rest.
Finally, all VBR files longer than about five minutes will have multiple
index tables due to the 64 KiB local set coding limitation. One
exception is Avid Media Composer which outputs files with non-standard
indexes that ignore the 64k limit.
More information about the ffmpeg-devel