9489 Commits

Author SHA1 Message Date
Zhao Zhili
540aacf759 fftools/ffmpeg: add force key frame by scdet metadata support
For example:

./ffmpeg -hwaccel videotoolbox \
	-i input.mp4 -c:a copy \
	-vf scdet=threshold=10 \
	-c:v h264_videotoolbox \
	-force_key_frames scd_metadata \
	-g 1000 -t 30 output.mp4
2025-12-02 03:03:55 +00:00
Niklas Haas
623669a02c avfilter/buffersrc: add av_buffersrc_get_status()
There is currently no way for API users to know that a buffersrc is no longer
accepting input, except by trying to feed it a frame and seeing what happens.

Of course, this is not possible if the user does not *have* a frame to feed,
but may still wish to know if the filter is still accepting input or not.

Since passing `frame == NULL` to `av_buffersrc_add_frame()` is already treated
as closing the input, we are left with no choice but to introduce a new
function for this.

We don't explicitly return the result of `ff_outlink_get_status()` to avoid
leaking internal status codes, and instead translate them all to AVERROR(EOF).
2025-11-26 13:15:16 +00:00
Gyan Doshi
2b221fdb4a avfilter/zscale: add support for resize filter spline64
Fixes #20928
2025-11-25 12:42:41 +05:30
Dmitrii Ovchinnikov
140b4f28c3 avutil/hwcontext_amf: move AVMutex to internal context 2025-11-24 20:06:24 +00:00
Kacper Michajłow
148cf61585 fate: add missing options in config template
Fixes: f01c771577
Fixes: 523d688c2b
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-11-24 02:47:08 +00:00
Kacper Michajłow
6cb002610b fate: add skip_clean option
This is useful if one wants to inspect build artifacts after running
fate.sh script.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-11-24 02:47:08 +00:00
GyanD
f283750ba8 doc/encoders: minor mediafoundation encoders updates 2025-11-19 04:48:11 +00:00
Harshitha
4e556b0c0c doc/encoders: Document MediaFoundation encoders 2025-11-19 04:48:11 +00:00
Gyan Doshi
f60db2e566 doc/fate: document setting of session-wide env variables 2025-11-18 04:19:06 +00:00
Andreas Rheinhardt
643e2e10f9 avutil/cpu: Deprecate AV_CPU_FLAG_FORCE
This flag does nothing since the deactivation of
the dsp_mask field of AVCodecContext in
commits 9ae6ba2883 and
9ae6ba2883 (it has
been superseded with better ways to override the CPU flags).
So deprecate it.

Reviewed-by: Lynne <dev@lynne.ee>
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-11-16 11:24:00 +01:00
Zhao Zhili
925282fafc doc/filters: add section for VideoToolbox filter
Move scale_vt and transpose_vt to this section.
2025-11-16 10:22:19 +00:00
Martin Storsjö
e096a592cb doc: Fix building with makeinfo 4.8
This fixes building after commit
1ce88d29d0.

That commit caused the following errors:

    src/doc/fate.texi:234: @anchor expected braces.
    src/doc/fate.texi:245: @item found outside of an insertion block.
    src/doc/fate.texi:249: @item found outside of an insertion block.
    src/doc/fate.texi:261: @item found outside of an insertion block.
    src/doc/fate.texi:265: @item found outside of an insertion block.
    src/doc/fate.texi:268: @item found outside of an insertion block.
    src/doc/fate.texi:274: @item found outside of an insertion block.
    src/doc/fate.texi:277: @item found outside of an insertion block.
    src/doc/fate.texi:281: @item found outside of an insertion block.
    src/doc/fate.texi:287: Unmatched `@end'.
    ./src/doc/fate.texi:65: Cross reference to nonexistent node `makefile variables' (perhaps incorrect sectioning?).
2025-11-15 19:29:08 +02:00
Gyan Doshi
1ce88d29d0 doc/fate: improve section on running FATE
With thanks to Adam Koszek.
2025-11-15 08:28:51 +00:00
Lynne
dd80ecb666 doc/APIchanges: bump lavu minor and remove reverted pixfmts 2025-11-06 21:47:08 +01:00
Andreas Rheinhardt
8a322c956f avcodec/avcodec: Schedule parser API to use enum AVCodecID for codec ids
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-11-01 16:57:03 +01:00
Andreas Rheinhardt
e0b0ca8111 avcodec/avcodec: Schedule moving private fields of AVCodecParser out of avcodec.h
AVCodecParser has several fields which are not really meant
to be accessed by users, but it has no public-private
demarkation line, so these fields are technically public
and can therefore not simply be made private like
20f9727018 did for AVCodec.*

This commit therefore deprecates these fields and
schedules them to become private. All parsers have already
been switched to FFCodecParser, which (for now) is a union
of AVCodecParser and an unnamed clone of AVCodecParser
(new fields can be added at the end of this clone).

*: This is also the reason why split has never been removed despite
not being set for several years now.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-11-01 16:57:02 +01:00
James Almer
6879c8ee5d avcodec/avcodec: add helpers to convert between packet and frame side data
They will be used in following commits.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-10-30 10:54:01 -03:00
Gyan Doshi
00c23bafb0 doc/filters: add link to rendered doc of drawvg 2025-10-30 15:35:14 +05:30
Lynne
3d12d5682b doc/APIchanges: add AVCOL_PRI_EXT_BASE and AVCOL_PRI_V_GAMUT
They were left out.
2025-10-28 22:19:34 +01:00
Lynne
71c7b9156b lavu: bump minor and add APIchanges entry for V-Log/V-Gamut 2025-10-28 20:46:21 +01:00
Lynne
dc34d0764f lavu: bump minor and add APIchanges entry for the new pixfmts 2025-10-27 22:59:41 -03:00
Ayose
016d767c8e lavfi: add drawvg video filter.
The drawvg filter can draw vector graphics on top of a video, using libcairo. It
is enabled if FFmpeg is configured with `--enable-cairo`.

The language for drawvg scripts is documented in `doc/drawvg-reference.texi`.

There are two new tests:

- `fate-filter-drawvg-interpreter` launch a script with most commands, and
  verify which libcairo functions are executed.
- `fate-filter-drawvg-video` render a very simple image, just to verify that
  libcairo is working as expected.

Signed-off-by: Ayose <ayosec@gmail.com>
2025-10-25 13:21:50 +00:00
Kacper Michajłow
00e43619cd avutil/csp: add av_csp_approximate_eotf_gamma()
2.2 gamma was used for bt.1886 aproximation as the most common target in
real world.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-10-24 22:24:54 +00:00
Jack Lau
0e8cff52bc avformat/whip: add DTLS active role support
Add dtls_active flag to specify the dtls role.

Properly set the send key and recv key depends on DTLS role:

As DTLS server, the recv key is client master key plus salt,
the send key is server master key plus salt.
As DTLS client, the recv key is server master key plus salt,
the send key is client master key plus salt.

Signed-off-by: Jack Lau <jacklau1222@qq.com>
2025-10-23 10:58:45 +00:00
Michael Yang
e8213f766f libavfilter/vf_nlmeans_vulkan: amend doc 2025-10-16 21:32:43 +00:00
zhanghongyuan
0bc54cddb1 fftools/opt_common: add long-form license option
Add "license" as a long-form command line option alongside the existing
"L" short option for showing license information. This maintains
consistent option naming patterns with other commands that provide both
short and long forms (help/?/help, etc.) and improves command line
usability by providing more descriptive option names.
2025-10-12 03:26:21 +00:00
Niklas Haas
6f1ab828d3 libavfilter/vf_libplacebo: add temperature option 2025-10-09 20:45:09 +00:00
Jack Lau
a934d48440 doc/muxers: correct default pkt_size value of whip
Signed-off-by: Jack Lau <jacklau1222@qq.com>
2025-10-09 14:33:02 +00:00
Jack Lau
b3793d9941 avformat/whip: pass through buffer_size option to udp
Signed-off-by: Jack Lau <jacklau1222@qq.com>
2025-10-09 09:55:18 +00:00
Romain Beauxis
de8d57e4c5 ogg/vorbis: implement header packet skip in chained ogg bitstreams. 2025-10-01 14:20:55 +00:00
Marton Balint
8e11e2cdb8 avformat/tls_openssl: initialize underlying protocol early for dtls_start()
The same way we do with TLS, so all tls URL options will be properly supported.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:19 +02:00
Marton Balint
2762ae74c5 avformat/tls: use ff_parse_opts_from_query_string() to set URL parameters
Note that this changes the code to work the same way as other protocols where
an URL parameter can override an AVOption.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:19 +02:00
Marton Balint
3166e3b539 avformat/rtpproto: use ff_parse_opts_from_query_string() to set URL parameters
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:19 +02:00
Marton Balint
f231439ee7 avformat/sctp: use ff_parse_opts_from_query_string() to set URL parameters
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:19 +02:00
Marton Balint
49c6e6cc44 avformat/tcp: use ff_parse_opts_from_query_string() to set URL parameters
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:19 +02:00
Marton Balint
7e58fff9d0 avformat/udp: use ff_parse_opts_from_query_string() to set URL parameters
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:19 +02:00
Marton Balint
2d06ed9308 avformat/libsrt: use ff_parse_opts_from_query_string() to set URL parameters
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:19 +02:00
Niklas Haas
b80f28fcbc avfilter/vf_libplacebo: introduce fit_sense option
This allows choosing whether the `fit_mode` merely controls the placement
of the image within the output resolution, or whether the output resolution
is also adjusted according to the given `fit_mode`.
2025-09-30 15:39:39 +00:00
Niklas Haas
12d696cff4 avfilter/vf_libplacebo: introduce fit_mode option
The semantics of these keywords are well-defined by the CSS 'object-fit'
property. This is arguably more user-friendly and less obtuse than the
existing `normalize_sar` and `pad_crop_ratio` options. Additionally, this
comes with two new (useful) behaviors, `none` and `scale_down`, neither of
which map elegantly to the existing options.

One additional benefit of this option is that, unlike `normalize_sar`, it
does *not* also imply `reset_sar`; meaning that users can now choose to
have an anamorphic base layer and still have the overlay images scaled to fit
on top of it according to the chosen strategy.

See-Also: https://drafts.csswg.org/css-images/#the-object-fit
2025-09-30 15:39:39 +00:00
Gyan Doshi
74115b017c doc: indicate libmpeghdec is non-free 2025-09-30 11:55:02 +00:00
Nikolay Aleksandrov
1608aa38a2 doc/infra: More details about hosting and security
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

I have redacted the exact location of the FFmpeg server as writing
that in public seems just a bad idea
2025-09-30 13:14:03 +02:00
James Almer
d975dbd7b7 avcodec/libdav1d: bump minimum supported version to 1.0.0
This allows us to remove old deprecated options.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-09-28 23:53:27 -03:00
Stadelmann, Daniel
56c14f2311 avcodec/libmpeghdec: add MPEG-H 3DA Fraunhofer IIS mpeghdec decoder
Adds a wrapper around the Fraunhofer IIS MPEG-H 3D Audio mpeghdec [1]
decoder shared library.

[1] https://github.com/Fraunhofer-IIS/mpeghdec

Signed-off-by: Stadelmann, Daniel <daniel.stadelmann@iis.fraunhofer.de>
2025-09-24 08:25:42 +02:00
Marton Balint
3a29702cb6 avformat/rtpproto: add some URL options as AVOption aliases
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-09-19 09:59:26 +02:00
Marton Balint
7d1e22b7ea avformat/tls: add some URL options as AVOption aliases
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-09-19 09:59:26 +02:00
Marton Balint
3e7314fe30 avformat/udp: add DSCP as a normal AVOption
Previously this was an URL-only option.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-09-19 09:59:26 +02:00
Drew Dunne
76471fb143 vf_colorspace: Add an option to clamp trc LUT output
Add a new flag to the vf_colorspace filter which provides the user an
option to clamp the linear and delinear transfer characteristics LUT
values to the [0, 1] represented range. This helps constrain the
potential value range when converting between colorspaces.

Certain colors when going through the conversion can result in out of
gamut colors after the rotation. The colorspace filter allows that with
the extended range. The added clamping just keeps the colors within the
[0, 1) range rather than using that extended range. I'm not enough of a
color scientist to say which is correct, but there are certain
situations where we would prefer to keep the colors in gamut.

The example I have is:

A solid color image of 8-bit YUV: Y=157, U=164, V=98.

Specify the input as:

Input range: MPEG
In color matrix: BT470BG
In color primaries: BT470M
In color transfer characteristics: Gamma 28

Output as:
Out color range: JPEG
Out color matrix: BT.709
Out color primaries: BT.709
Out color transfer characteristics: BT.709

During the calculation you get:

Input YUV:                             y=157,      u=164,      v-98
Post-yuv2rgb BT.470BG:                 r=0.456055, g=0.684152, b=0.928606
Post-apply gamma28 linear LUT:         r=0.110979, g=0.345494, b=0.812709
Post-color rotation BT.470M to BT.709: r=-0.04161, g=0.384626, b=0.852400
Post-apply Rec.709 delinear LUT:       r=-0.16382, g=0.615932, b=0.923793
Post-rgb2yuv Rec.709 matrix:           y=120,      u=190,      v=25

Where with this change, the delinear LUT output would be clamped to 0,
so the result would be:
r=0.000000, g=0.612390, b=0.918807 and a final output of
y=129, u=185, v=46

As for the long and av_clip64, this was just because lrint returned a
long, so I left it as that and then used av_clip64 to the [0,1) range to
avoid overflow. But re-reading, it looks like av_clip_int16 would
downcast that long to int anyway so the possibility of overflow already
existed there. I've put it back to int just to match the existing
behavior.
2025-09-15 14:39:09 +00:00
Timo Rothenpieler
6e63b978d3 doc/filters: fix missed reference to outdated option name 2025-09-14 15:33:31 +02:00
Timo Rothenpieler
36e374efb0 avfilter: add gfxcapture, Windows.Graphics.Capture based window/monitor capture 2025-09-14 11:45:11 +00:00
Zhao Zhili
09856e4e48 doc/examples/vaapi_encode: fix invalid check on fwrite
enc_pkt->size is 0 after av_packet_unref, which makes the check invalid.

Fix regression from 3e4bfff2.

Co-Authored-by: Jin Bo <jinbo@loongson.cn>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-09-08 20:43:07 +00:00