Commit Graph

9107 Commits

Author SHA1 Message Date
Nicolas Gaullier ed9363052f 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.

Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris>
2024-04-02 19:53:40 +02:00
Stefano Sabatini 13cdef9d45 doc/muxers: add ircam
Most of the content copy&pasted from:
http://fileformats.archiveteam.org/wiki/Berkeley/IRCAM/Carl_Sound_Format
2024-04-02 19:48:29 +02:00
Stefano Sabatini 026bef7771 doc/muxers/image2: add mention to image2pipe
Clarify the difference with regards to the image2 muxer.
2024-04-02 19:48:28 +02:00
Stefano Sabatini 827889d8f3 doc/muxers/image2: apply misc consistency fixes 2024-04-02 19:48:28 +02:00
Stefano Sabatini b5488392f0 doc/muxers: add ilbc 2024-04-02 19:48:28 +02:00
Stefano Sabatini 3e4f0b07de doc/muxers: add stub for iamf 2024-04-02 19:48:28 +02:00
Stefano Sabatini 06f17cc9ce doc/muxers/hls: review, apply consistency fixes
Apply misc typo fixes, consistency fixes, and reformat the layout to provide more overall
internal and global consistency.
2024-04-02 19:48:28 +02:00
Anton Khirnov 63f56c9943 doc/community: update conflict of interest rule according to GA vote 2024-04-01 15:38:28 +02:00
Andreas Rheinhardt 790f793844 avutil/common: Don't auto-include mem.h
There are lots of files that don't need it: The number of object
files that actually need it went down from 2011 to 884 here.

Keep it for external users in order to not cause breakages.

Also improve the other headers a bit while just at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-31 00:08:43 +01:00
Tobias Rapp 02eb2fc577 examples/decode_filter_video: Add loop for draining the filtergraph
Depending on the filters used, the filtergraph may produce trailing data
after feeding it the last input frame. Update the example to include the
necessary loop for draining the filtergraph.

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2024-03-28 12:04:09 +01:00
Tobias Rapp 55ce666062 examples/decode_filter_audio: Add loop for draining the filtergraph
Depending on the filters used, the filtergraph may produce trailing data
after feeding it the last input frame. Update the example to include the
necessary loop for draining the filtergraph.

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2024-03-28 12:03:57 +01:00
Anton Khirnov 56320880f7 doc/ffmpeg: mention how to pass options to loopback decoders 2024-03-28 08:39:19 +01:00
Andreas Rheinhardt 9223c92c88 doc/examples: Always use <> includes
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-27 17:07:06 +01:00
Anton Khirnov 2621be3539 lavu/frame: add side data descriptors
They allow exporting extended information about side data types.
2024-03-27 11:33:45 +01:00
Michael Niedermayer e7d938073e
doc/APIchanges: Add 7.0 cut point
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-03-27 01:04:54 +01:00
Michael Niedermayer 4126a99d2b
doc/APIchange: Fill in some missing thingss
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-03-26 23:42:19 +01:00
Wenbin Chen ea2e0e92ed doc: Add libtoch backend option to dnn_processing
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Reviewed-by: Guo Yejun <yejun.guo@intel.com>
2024-03-26 19:17:51 +08:00
Marton Balint 5df901ffa5 avutil/timestamp: introduce av_ts_make_time_string2 for better precision
av_ts_make_time_string() used "%.6g" format, but this format was losing
precision even when the timestamp to be printed was not that large. For example
for 3 hours (10800) seconds, only 1 decimal digit was printed, which made this
format inaccurate when it was used in e.g. the silencedetect filter. Other
detection filters printing timestamps had similar issues. Also time base
parameter of the function was *AVRational instead of AVRational.

Resolve these problems by introducing a new function, av_ts_make_time_string2().

We change the used format to "%.*f", use a precision of 6, except when printing
values near 0, in which case we calculate the precision dynamically to aim for
a similar precision in normal form as with %.6g.  No longer using scientific
representation can make parsing the timestamp easier for the users, we can
safely do this because the theoretical maximum of INT64_MAX*INT32_MAX still
fits into the string buffer in normal form.

We somewhat imitate %g by trimming ending zeroes and the potential decimal
point characters. In order not to trim "inf" as well, we assume that the
decimal point string does not contain the letter "f". Note that depending on
printf %f implementation, we might trim "infinity" to "inf".

Thanks for Allan Cady for bringing up this issue.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-03-25 21:30:51 +01:00
Marton Balint f1e34f1582 doc/filters: extend af_channelmap documentation
Signed-off-by: Marton Balint <cus@passwd.hu>
2024-03-24 21:27:55 +01:00
Niklas Haas a9023377b2 avutil/film_grain_params: add av_film_grain_params_select()
Common utility function that can be used by all codecs to select the
right (any valid) film grain parameter set. In particular, this is
useful for AFGS1, which has support for multiple parameters.

However, it also performs parameter validation for H274.
2024-03-23 18:55:15 +01:00
Niklas Haas 35d2960dcd avutil/film_grain_params: add metadata to common struct
This is needed for AV1 film grain as well, when using AFGS1 streams.
Also add extra width/height and subsampling information, which AFGS1
cares about, as part of the same API bump. (And in principle, H274
should also expose this information, since it is needed downstream to
correctly adjust the chroma grain frequency to the subsampling ratio)

Deprecate the equivalent H274-exclusive fields. To avoid breaking ABI,
add the new fields after the union; but with enough of a paper trail to
hopefully re-order them on the next bump.
2024-03-23 18:54:29 +01:00
Stefano Sabatini 7852bf02b0 doc/muxers: add hds 2024-03-23 11:42:13 +01:00
Stefano Sabatini 25248c9d75 doc/muxers: add gxf 2024-03-23 11:42:13 +01:00
Matthieu Bouron f17e18d292 avcodec: add av_jni_{get,set}_android_app_ctx() helpers
This will allow users to pass the Android ApplicationContext which is mandatory
to retrieve the ContentResolver responsible to resolve/open Android content URIS.
2024-03-23 11:34:34 +01:00
Andreas Rheinhardt b7bec5d3c9 avutil/frame: Rename av_frame_side_data_get and add wrapper for it
av_frame_side_data_get() has a const AVFrameSideData * const *sd
parameter; so calling it with an AVFramesSideData **sd like
AVCodecContext.decoded_side_data (or with a AVFramesSideData * const
*sd) is safe, but the conversion is not performed automatically
in C. All users of this function therefore resort to a cast.

This commit changes this: av_frame_side_data_get() is renamed
to av_frame_side_data_get_c(); furthermore, a static inline
wrapper for it name av_frame_side_data_get() is added
that accepts an AVFramesSideData * const * and converts this
to const AVFramesSideData * const * in a Wcast-qual safe way.

This also allows to remove the casts from the current users.

Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-22 23:38:16 +01:00
Andreas Rheinhardt 26398da8f3 avutil/frame: Constify av_frame_side_data_get()
Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-22 23:36:07 +01:00
Jan Ekström 0d36844ddf avcodec: add frame side data array to AVCodecContext
This allows configuring an encoder by using AVFrameSideData.
2024-03-20 19:15:05 +02:00
Jan Ekström d9ade14c5c {avutil/version,APIchanges}: bump, document new AVFrameSideData functions 2024-03-20 19:15:05 +02:00
Stefano Sabatini 0cd13ad674 doc/muxers/gif: apply consistency fixes 2024-03-19 17:23:20 +01:00
Stefano Sabatini f7d560e919 doc/muxers/flv: apply misc consistency fixes 2024-03-19 17:23:20 +01:00
Stefano Sabatini 9afd9bb5c5 doc/muxers: add flac 2024-03-19 17:23:05 +01:00
Nicolas Gaullier b96571df3a
doc/fate: advise on --assert-level=2
Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-03-19 04:10:48 +01:00
Stefano Sabatini 39087e739c doc/muxers: add fits 2024-03-18 17:59:45 +01:00
Stefano Sabatini 9754e1f532 doc/muxers: add filmstrip 2024-03-18 17:59:32 +01:00
Stefano Sabatini 38c18dca63 doc/muxers: add film_cpk 2024-03-18 17:59:26 +01:00
Stefano Sabatini be37ce70fe doc/muxers: add ffmetadata 2024-03-18 17:59:19 +01:00
Fei Wang a8d9fab06b lavc/vaapi_encode: Enable block level bitrate control
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-03-18 12:00:14 +08:00
Stone Chen de2fb43e78 doc/filters: Change rdiv (vf_convolution) documentation to reflect actual behavior
The documentation correctly states that the rdiv is a multiplier but incorrectly states the default behavior is to multiply by the sum of all matrix elements - it multiplies by 1/sum.

This changes the documentation to match the code.

Address trac #10889

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-03-16 22:02:56 +01:00
Marton Balint ed6207274e avutil/channel_layout: add AV_CHANNEL_LAYOUT_RETYPE_FLAG_CANONICAL
Signed-off-by: Marton Balint <cus@passwd.hu>
2024-03-16 19:49:39 +01:00
Marton Balint 7196b12b2b avformat/daudenc: force 2000 sample packet size with a bsf
The samples I found all have 2000 sample packets, and by forcing the packet
size with a bsf we could automagically make muxing work for packets containing
more than 3640 samples.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-03-14 01:37:31 +01:00
James Almer 394abd8458 fftools/ffprobe: export IAMF Stream Group parameters
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-13 16:45:15 -03:00
James Almer 5cd8db3060 fftools/ffprobe: export Tile Grid Stream Group parameters
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-13 16:06:10 -03:00
Anton Khirnov a9193f7b7d fftools/ffmpeg: add loopback decoding
This allows to send an encoder's output back to decoding and feed the
result into a complex filtergraph.
2024-03-13 08:01:27 +01:00
asivery 9124d807dc avformat/aea: add aea muxer
Signed-off-by: asivery <asivery@protonmail.com>
2024-03-12 11:26:13 +01:00
hung kuishing 78803a4b8a doc/examples/qsv_decode: remove unused config.h header file
Signed-off-by: clarkh <hungkuishing@outlook.com>
2024-03-12 11:26:06 +01:00
Marth64 275877b981 avformat/dvdvideodec: add menu demuxing support
Signed-off-by: Marth64 <marth64@proxyid.net>
2024-03-12 11:14:16 +01:00
Stefano Sabatini 75dd083904 doc/muxers/fifo: review documentation
Apply consistency fixes, sort options, clarify example.
2024-03-12 11:13:31 +01:00
Andreas Rheinhardt cc95fd4531 doc/bitstream_filters.texi: Document types used by filter_units
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Reviewed-by: Marth64 <marth64@proxyid.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-10 17:49:16 +01:00
Marth64 2c82ec9b4a doc/bitstream_filters: add filter_units practical examples for removing closed captions
Signed-off-by: Marth64 <marth64@proxyid.net>
2024-03-10 16:01:18 +01:00
Anton Khirnov 68a8eca752 lavc: add a decoder option for configuring side data preference
This and the following commits fix #10857
2024-03-08 07:37:55 +01:00