[FFmpeg-devel] [PATCH 0/1] avformat/demux: Add durationprobesize AVOption

Nicolas Gaullier nicolas.gaullier at cji.paris
Tue Feb 6 12:52:08 EET 2024


I posted "avformat/demux: Add more retries to get more stream durations"
last friday and it is a complementary patch.
https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=10654
Note that, if this "Add more retries" patch is accepted, I would update
this patch to set DURATION_MAX_RETRY_USER to the value of MORE_DURATIONS_MAX_RETRY (3),
which means that if the user ask for 8M, the first step will be to try 1M,
then 2M, then up to 8M until all A/V durations are found.
Currently, since there is only one extra retry to get all durations,
if the user ask for 8M, the first step is to try with 4M.

The default behaviour remains unchanged as exact&complete stream durations
is only required for somes use cases and/or some specific files.

Here is a sample file (mpegts @15Mb/s, with A/V pts cleanly cut at the end):
https://0x0.st/HkxN.ts

If it can help, I can add a trac issue or build a patchset with the two patches.

Nicolas Gaullier (1):
  avformat/demux: Add durationprobesize AVOption

 libavformat/avformat.h      |  8 ++++++++
 libavformat/demux.c         | 13 ++++++++-----
 libavformat/options_table.h |  1 +
 3 files changed, 17 insertions(+), 5 deletions(-)

-- 
2.30.2



More information about the ffmpeg-devel mailing list