1

Is there an option in ffmpeg to make it read just sequencially from start to end of the file, without attempting to check if there is eventually metadata at the end of the file?

The backround is that i seem to face a situation where the bare presence of a footer in a .mxf file (plus index repetition) causes massive processing errors.

Actually it is not about ffmpeg.exe but libavcodec that is utilized by some 3rdparty software, but this 3rdparty software does allow me to specify ffmpeg options for mxf file opening.

Deleting a few bytes, like 10kb of the end of the 40Gb input file lead to process the file correctly, thats why i am asking for a way to force sequencial reading.

I tried using -re option but it still parses the "footer" information.

2

You can try piping the file: cat file.mxf | ffmpeg -f mxf -i - out.mp4

But in general, ffmpeg doesn't have a generic routine for reading the file. ffmpeg first identifies the format of the input based on a probe and then relies on a format-specific module (the demuxer) to parse it. If some routine in that demuxer seeks to the data which happens to be in the end, but it'll go there.

A 2nd method is to use the subfile protocol. This lets you present a restricted file to ffmpeg i.e. you can specify where the 'start' and 'end' of the file should be, e.g.

ffmpeg -i "subfile,,start,183241728,end,366490624,,:file.mxf"

This tells ffmpeg to extract the segment starting at file byte offset 183241728 and ending at offset 366490624 as the input.

  • it looks like there is a flag "ignidx" mentioned at ffmpeg.org/ffmpeg-all.html ... i was not able to try it by now but it looks promising. It somehow looks like this is not actually a flag for libavformat but the classes of libavcodec need to check if the flag is set... pretty confusing... – Harry Nov 20 '17 at 19:06
  • Sorry, you write it in your anser, it is not libavcodec classes that need to support that flag but the demuxers in libavformat.... – Harry Nov 20 '17 at 19:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.