History

avformat/demux: add duration_probesize AVOption

Yet another probesize used to get the durations when estimate_timings_from_pts is required. It is aimed at users interested in better durations probing for itself, or because using avformat_find_stream_info indirectly and requiring exact values: for concatdec for example, especially if streamcopying above it. The current code is a performance trade-off that can fail to get video stream durations in a scenario with high bitrates and buffering for files ending cleanly (as opposed to live captures): the physical gap between the last video packet and the last audio packet is very high in such a case. Default behaviour is unchanged: 250k up to 250k << 6 (step by step). Setting this new option has two effects: - override the maximum probesize (currently 250k << 6) - reduce the number of steps to 1 instead of 6, this is to avoid detecting the audio "too early" and failing to reach a video packet. Even if a single audio stream duration is found but not the other audio/video stream durations, there will be a retry, so at the end the full user-overriden probesize will be used as expected by the user.

Nicolas Gaullier committed 2 years ago

Commit ed936301 parent 13cdef96 files · +45 −9Browse files

Showing the changes to doc/APIchanges (1 of 6 files). Show all

Unified · Split

doc/APIchanges+3−0
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07 · 1 unmodified line
22
33 API changes, most recent first:
44
5+2024-03-29 - xxxxxxxxxx - lavf 61.3.100 - avformat.h
6+ Add AVFormatContext.duration_probesize.
7+
58 2024-03-27 - xxxxxxxxxx - lavu 59.10.100 - frame.h
69 Add AVSideDataDescriptor, enum AVSideDataProps, and
710 av_frame_side_data_desc().

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t