ons 2024-08-21 klockan 23:19 +0200 skrev Marton Balint: > > > On Wed, 21 Aug 2024, Marc-Antoine ARNAUD wrote: > > > Le sam. 17 août 2024 à 21:15, Marton Balint <c...@passwd.hu> a écrit > > : > > > > > > > > > > > On Wed, 14 Aug 2024, Marc-Antoine Arnaud wrote: > > > > > > > --- > > > > libavformat/mxfdec.c | 14 +++++++++++++- > > > > 1 file changed, 13 insertions(+), 1 deletion(-) > > > > > > Why would you want to tune this? > > > > > > > Hi Marton > > > > In some MXF files, index tables are present in the first body > > partition or > > fully in the footer partition. > > This patch will skip parsing all body partitions if the index table > > is > > coherent. > > That still does not answer the "why". You want to avoid reading every > partition pack when the file is opened? If you ignore reading the RIP > (and consequentally force the system to do a forward parse and not > read all > partition packs in advance) then I am not sure how seeking will work, > because even if there is a full index, you won't have a list of > partitions > and the essence body offsets for the partitions. > > The quick and dirty way of forcing opening a file without reading all > partition packs is using -seekable 0 when opening that file... Isn't > that enough for your use case? > > Something more advanced is not trivial, because you'd have to parse > the > partitions packs on demand.
A feature like this would be really neat. You'd need logic that guesstimates which partition pack to parse, sees if the desired edit unit is contained within it and optionally seeks forward/backward as necessary to find the appropriate partition. That's quite complicated to implement I suspect (you'd need a sparse range-aware data structure), but it'd be the best way. That would also take care of some nasty properties of the current demuxer, which is terribly slow to open MXF files produced by mxfenc if working over HTTP. It gets even worse with melt that opens files multiple times /Tomas _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".