1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

8823 Commits

Author SHA1 Message Date
Paul B Mahol
a2f4adf680 avfilter: add arls filter 2023-04-30 11:34:35 +02:00
Paul B Mahol
f247a3d82d avfilter/af_adynamicequalizer: add precision option 2023-04-30 11:32:45 +02:00
Paul B Mahol
51504cf279 avfilter/af_adynamicequalizer: add dftype option
Useful for filter selection for detection control.
2023-04-28 23:31:25 +02:00
Ting Fu
a9fb141719 lavfi/dnn: Modified DNN native backend related tools and docs.
Will remove native backend, so change the default backend in filters,
and also remove the python scripts which generate native model file.

Signed-off-by: Ting Fu <ting.fu@intel.com>
2023-04-28 11:07:41 +08:00
Paul B Mahol
19148a5b9f avfilter: add FIR equalizer coefficients source filter 2023-04-27 21:45:57 +02:00
Niklas Haas
54126920fc doc/filters/libplacebo: add vaapi interop example
Some testing revealed this to be a very efficient and reliable method of
ingesting GPU frames into libplacebo, so it's a good idea to give as an
example.
2023-04-26 15:36:10 +02:00
Niklas Haas
4fa691b761 doc/filters/libplacebo: remove outdated example
This example being first is now misleading because round-tripping
through hwdownload/hwupload is neither required nor recommended. Also,
the comment about avoiding format conversion is unnecessary because
`libplacebo` will now inherit the input frame format by default.
2023-04-26 15:36:10 +02:00
Paul B Mahol
bee265e5d5 avfilter/af_afir: add way to control loading interval of impulses 2023-04-25 21:22:15 +02:00
Marton Balint
412274c0d2 doc/muxers: reorder and cleanup mov muxer options
Make various movflags grouped together similar to how it is done for other
options.

Signed-off-by: Marton Balint <cus@passwd.hu>
2023-04-24 23:00:50 +02:00
Sil Vilerino
5ff1430452 fftools/ffmpeg_opt: Document VAAPI -device usage for DirectX Adapter
Initial review at https://github.com/intel-media-ci/ffmpeg/pull/619/

Signed-off-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Reviewed-by: Wu, Tong1 <tong1.wu@intel.com>
2023-04-24 13:24:41 +08:00
Thilo Borgmann
4dd3f2098c doc/developer: mention samples-request for FATE upload requests 2023-04-23 21:45:40 +02:00
Niklas Haas
4eaaa38d3d avutil: make av_frame_get_plane_buffer accept a const AVFrame*
Signed-off-by: Niklas Haas <git@haasn.dev>
2023-04-14 10:53:28 +02:00
Anton Khirnov
2f24290c8e fftools/ffmpeg: disable and deprecate -qphist
This option adds a long string of numbers to the progress line, where
i-th number contains the base-2 logarithm of the number of times a frame
with this QP value was seen by print_report().

There are multiple problems with this feature:
* despite this existing since 2005, web search shows no indication
  that it was ever useful for any meaningful purpose;
* the format of what is printed is entirely undocumented, one has to
  find it out from the source code;
* QP values above 31 are silently ignored;
* it only works with one video stream;
* as it relies on global state, it is in conflict with ongoing
  architectural changes.

It then seems that the nontrivial cost of maintaining this option is not
worth its negligible (or possibly negative - since it pollutes the
already large option space) value.
Users who really need similar functionality can also implement it
themselves using -vstats.
2023-04-13 15:11:56 +02:00
James Almer
61b27b15fc avutil/hdr_dynamic_metadata: allow av_dynamic_hdr_plus_to_t35() to accept an existing buffer
The function now accepts an existing buffer to avoid unnecessary allocations,
as well as only reporting the needed amount of bytes if you pass a NULL pointer
as input for data.
For this, both parameters become input and output, as well as making data
optional. This is backwards compatible, and as such not breaking any existing
use of the function in external code (if there's any).

Signed-off-by: James Almer <jamrial@gmail.com>
2023-04-05 09:47:12 -03:00
Anton Khirnov
2244722f1f doc/ffmpeg: rewrite the introductory paragraph
This is not the place to boast about high-quality polyphase filters -
the most important feature of the program is its universality.
2023-04-04 11:45:51 +02:00
Anton Khirnov
bf6df790c2 doc/ffmpeg: refine program title
It is a media converter, not just a video converter.
2023-04-04 11:45:44 +02:00
Stefano Sabatini
686e14e9fb doc/platform: drop reference to ffmpeg.zeranoe.com
It was closed in September 2020.

Fix issue:
http://trac.ffmpeg.org/ticket/9734
2023-04-02 16:28:54 +02:00
Stefano Sabatini
627d5a87bb doc/ffmpeg: slightly rework introductory examples
In particular, add a sentence to introduce the example, and add a
simpler starting example with no options.

Also use different format for input.avi and output.mp4, to convey
that the conversion also works on the container format.

Address issue:
http://trac.ffmpeg.org/ticket/8730
2023-04-02 16:28:54 +02:00
Stefano Sabatini
ee25a434dc doc/filters/find_rect: extend documentation
Document metadata entries set by the filter, extend and clarify
options, add additional example showing how to extract the generated
data.

Address issue:
http://trac.ffmpeg.org/ticket/8766
2023-04-02 16:22:14 +02:00
James Almer
113f684271 doc/encoders: add an entry for the frame_length option from libfdk-aac
Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-03-31 10:17:57 -03:00
jackarain
4d216654ca libavformat/tcp: add local_addr/local_port for network option
Signed-off-by: jackarain <jack.wgm@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-03-30 12:09:49 +02:00
Stefano Sabatini
0684e58886 doc/filters/paletteuse: mention none dithering value
Fix issue:
http://trac.ffmpeg.org/ticket/9950
2023-03-29 00:15:19 +02:00
Stefano Sabatini
64016356bc doc/outdevs/sdl: update options documentation
Drop mention of missing icon_title option, document window_borderless option.

Fix issue:
http://trac.ffmpeg.org/ticket/9583
2023-03-29 00:15:19 +02:00
Stefano Sabatini
42d99d5132 doc/outdevs/sdl: sort options by name 2023-03-29 00:15:19 +02:00
Stefano Sabatini
47c56ff554 doc/filters/aspect: update documentation
Drop mention of unsupported N:M syntax, dropped since 0ed61546c4.

Also, drop reference of common expression constants, and fix
description of a expression parameter.

Fix issue:
http://trac.ffmpeg.org/ticket/9974
2023-03-29 00:15:19 +02:00
Stefano Sabatini
5c13307989 doc/filters: mentions that whitespaces are ignored in the filtergraph specification
Also provide example showing how to use this feature to improve filtergraph
readability.

Address issue:
http://trac.ffmpeg.org/ticket/8115
2023-03-29 00:15:19 +02:00
Stefano Sabatini
7792f53e5e doc/filters: propose solutions to avoid shell escaping
Reference drawtext textfile option and ffmpeg -filter_complex_script
and -filter_script as possible solutions to avoid shell escaping.

Address issue:
http://trac.ffmpeg.org/ticket/9008
2023-03-29 00:15:19 +02:00
Stefano Sabatini
030b34eac9 doc/filters/drawtext: clarify meaning of strftime format string
Also clarify what should be used instead of the strftime expansion mode.
2023-03-29 00:15:19 +02:00
TADANO Tokumei
b6138633cd lavc/libaribcaption.c: add ARIB caption decoder using libaribcaption
This patch add another ARIB caption decoder using libaribcaption
external library.

Unlike libaribb24, it supports 3 types of subtitle outputs:
* text: plain text
* ass: ASS formatted text
* bitmap: bitmap image

Default subtitle type is ass as same as libaribb24.
Advantages compared with libaribb24 on ASS subtitle are:
* Subtitle positioning.
* Multi-rect subtitle: some captions are displayed at different
  position at a time.
* More stability and reproducibility.

To compile with this feature:
* libaribcaption external library has to be pre-installed.
  https://github.com/xqq/libaribcaption
* configure with `--enable-libaribcaption` option.

`--enable-libaribb24` and `--enable-libaribcaption` options are
not exclusive. If both enabled, libaribcaption precedes as
order listed in `libavcodec/allcodecs.c`.

Signed-off-by: rcombs <rcombs@rcombs.me>
2023-03-28 12:05:19 -04:00
James Almer
20dade27d9 fftools/ffprobe: print crop_* frame fields
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-03-26 16:39:59 -03:00
Stefano Sabatini
261fb55e39 doc/ffmpeg: add vstats format documentation
Address issue:
http://trac.ffmpeg.org/ticket/7520
2023-03-26 12:24:26 +02:00
Michael Niedermayer
06b451d276
avfilter/vf_mcdeint: update to new API
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-03-26 01:46:49 +01:00
Anton Khirnov
632c349931 lavfi: add a flag for filters able to work with hw_device_ctx
This way the caller can set it just on the filters that can make use of
it.
2023-03-24 10:16:51 +01:00
Raphaël Zumer
0a3ce5f738 avutil: add HDR10+ dynamic metadata serialization function
Co-authored-by: Mohammad Izadi <moh.izadi@gmail.com>
Signed-off-by: Raphaël Zumer <rzumer@tebako.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-03-21 13:52:39 -03:00
Anton Khirnov
49b733c73c doc/developer.texi: add a section on API/ABI compatibility
Document established practices in it.
2023-03-20 10:52:17 +01:00
Anton Khirnov
f4dd302a38 doc/developer.texi: document checkasm 2023-03-20 10:52:17 +01:00
Anton Khirnov
a36ad2c649 doc/developer.texi: document the use of other languages than C 2023-03-20 10:52:17 +01:00
Anton Khirnov
27f8c9b27b lavu/frame: deprecate AVFrame.pkt_{pos,size}
These fields are supposed to store information about the packet the
frame was decoded from, specifically the byte offset it was stored at
and its size.

However,
- the fields are highly ad-hoc - there is no strong reason why
  specifically those (and not any other) packet properties should have a
  dedicated field in AVFrame; unlike e.g. the timestamps, there is no
  fundamental link between coded packet offset/size and decoded frames
- they only make sense for frames produced by decoding demuxed packets,
  and even then it is not always the case that the encoded data was
  stored in the file as a contiguous sequence of bytes (in order for pos
  to be well-defined)
- pkt_pos was added without much explanation, apparently to allow
  passthrough of this information through lavfi in order to handle byte
  seeking in ffplay. That is now implemented using arbitrary user data
  passthrough in AVFrame.opaque_ref.
- several filters use pkt_pos as a variable available to user-supplied
  expressions, but there seems to be no established motivation for using them.
- pkt_size was added for use in ffprobe, but that too is now handled
  without using this field. Additonally, the values of this field
  produced by libavcodec are flawed, as described in the previous
  ffprobe conversion commit.

In summary - these fields are ill-defined and insufficiently motivated,
so deprecate them.
2023-03-20 10:42:09 +01:00
Michael Niedermayer
cee4b99d41
avfilter/vf_uspp: Support any codec
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-03-18 18:20:14 +01:00
Wenbin Chen
31a23149da doc/encoders: Add av1 to qsv encoder's summary
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-03-17 14:13:37 +08:00
Wenbin Chen
2db22d14bf doc/examples/qsv_transcode: Fix a bug when use more than one parameter set
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-03-17 14:13:37 +08:00
Wenbin Chen
55c8c9493f libavcodec/qsvenc: Add dynamic setting support of low_delay_brc to av1_qsv
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-03-17 14:13:37 +08:00
Zhao Zhili
3be46ee767 libavutil/hdr_dynamic_vivid_metadata: fix three spline params
There are two group of three_Spline params.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-03-17 18:51:16 +08:00
Niklas Haas
1231003c3c avfilter/vf_libplacebo: remove deprecated field
This has not been functional since a year ago, including in our current
minimum dependency of libplacebo (v4.192.0). It also causes build errors
against libplacebo v6, so it needs to be removed from the code. We can
keep the option around for now, but it should also be removed soon.

Signed-off-by: Niklas Haas <git@haasn.dev>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-03-13 11:30:58 -03:00
Stefano Sabatini
cd0d267b92 doc/examples/mux: rename alloc_picture to alloc_frame
The new name is consistent with the updated API.
2023-03-12 16:45:05 +01:00
Werner Robitza
79b40ff58c doc/filters: update SITI description
The filter implements the 'legacy' version from a superseded recommendation.
2023-03-02 18:59:37 +01:00
Marth64
373ef1c4fa
avcodec/version: bump minor version to accommodate spatial audio detection
Signed-off-by: Marth64 <marth64@proxyid.net>
2023-03-02 13:49:04 +01:00
Michael Niedermayer
011f30fc82
Use https for repository links
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-03-01 21:59:10 +01:00
Martin Storsjö
083dde57e2 doc: Fix building community.html from the new community.texi
In texi source, @ characters need to be escaped.

This fixes the following build errors:

community.texi:59: unknown command `ffmpeg'
community.texi:143: unknown command `ffmpeg'

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-03-01 09:42:09 +02:00
Thilo Borgmann
6709e468f6 doc: Merge doc/dev_community/* and Code of Conduct into a seperate file
Remove doc/dev_communit markup files completely as they are at the wrong place.
Create a new community page, merging all of doc/dev_community and subsection Code of Conduct into a common place.
The corresponding patch to ffmpeg-web puts the Organisation & Code of Conduct into a seperate community chapter on the FFmpeg website.
2023-03-01 00:30:59 +01:00
Nicolas George
9a0d202118 doc/dev_community: add the addresses of the committees
Omitting the .org from the address should be protection enough
against spam spiders.

Signed-off-by: Nicolas George <george@nsup.org>
2023-03-01 00:30:59 +01:00
Stefano Sabatini
f88a4cb5e0 doc/ffmpeg: extend documentation for -dts_delta_threshold and -dts_error_threshold
PR: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=8252
2023-02-28 22:26:28 +01:00
Linjie Fu
f459377543 lavc/avcodec: Add HEVC Screen Content Coding Extensions profile
Described in HEVC spec A.3.7. Bump minor version and add APIchanges
entry for new added profile.

Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2023-02-27 13:42:06 +08:00
Pierre-Anthony Lemieux
23b4251808
doc: improve IMF demuxer documentation
Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
2023-02-21 19:38:54 -08:00
James Almer
223c70cf1d swresample/swresample: add a used channel layout option using the new API
Replaces the "used channel count" option, which is now deprecated.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-19 18:28:45 -03:00
James Almer
1d14959f12 doc/resampler.texi: add missing swr channel layout options
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-19 18:26:53 -03:00
Marton Balint
3807fbd90a doc: remove docs for options removed at the bump
Signed-off-by: Marton Balint <cus@passwd.hu>
2023-02-19 19:29:17 +01:00
Michael Niedermayer
9e80dfbfd9
doc/APIchanges: Add 6.0 cut point
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-02-19 18:34:25 +01:00
Michael Niedermayer
e33c1a5494
doc/APIchange: fill in missing things
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-02-19 18:23:21 +01:00
Niklas Haas
eabc304d12 avfilter/vf_libplacebo: add SMPTE ST2094 tone-mappers
libplacebo gained these exciting new functions upstream.
2023-02-17 18:35:39 +01:00
Haihao Xiang
0f407cdea2 avfilter: add QSV variants of the stack filters
Include hstack_qsv, vstack_qsv and xstack_qsv. They may accept input
streams with different sizes.

Examples:
$ ffmpeg -hwaccel qsv -hwaccel_output_format qsv -i input.mp4 \
-filter_complex "[0:v][0:v]hstack_qsv" -f null -

$ ffmpeg \
-hwaccel qsv -hwaccel_output_format qsv -i input.mp4 \
-hwaccel qsv -hwaccel_output_format qsv -i input.mp4 \
-hwaccel qsv -hwaccel_output_format qsv -i input.mp4 \
-hwaccel qsv -hwaccel_output_format qsv -i input.mp4 \
-filter_complex "[0:v][1:v][2:v][3:v]xstack_qsv=inputs=4:fill=0x000000:layout=0_0_1920x1080|w0_0_1920x1080|0_h0_1920x1080|w0_h0_1920x1080" \
-f null -

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-02-16 11:15:50 +08:00
Marton Balint
927042b409 avformat: deprecate AVFormatContext io_close callback
io_close2 should be used instead.

Signed-off-by: Marton Balint <cus@passwd.hu>
2023-02-16 01:18:45 +01:00
Marton Balint
2296078397 avutil/frame: deprecate AVFrame.coded_picture_number and display_picture_number
Their usefulness is questionable, very few decoders set them, and their type
should have been int64_t. A replacement field can be added later if a valid use
case is found.

Signed-off-by: Marton Balint <cus@passwd.hu>
2023-02-13 00:37:50 +01:00
Marton Balint
6b6f7db819 avcodec: add AVCodecContext.frame_num as 64 bit variant to frame_number
Frame counters can overflow relatively easily (INT_MAX number of frames is
slightly more than 1 year for 60 fps content), so make sure we use 64 bit
values for them.

Also deprecate the old 32 bit frame_number attribute.

Signed-off-by: Marton Balint <cus@passwd.hu>
2023-02-13 00:36:46 +01:00
Anton Khirnov
78f46065d8 fftools/ffmpeg: add special syntax for loading filter options from files
Many filters accept user-provided data that is cumbersome to provide as
text strings - e.g. binary files or very long text. For that reason such
filters typically provide a option whose value is the path from which
the filter loads the actual data.

However, filters doing their own IO internally is a layering violation
that the callers may not expect, and is thus best avoided. With the
recently introduced graph segment parsing API, loading option values
from files can now be handled by the caller.

This commit makes use of the new API in ffmpeg CLI. Any option name in
the filtergraph syntax can now be prefixed with a slash '/'. This will
cause ffmpeg to interpret the value as the path to load the actual value
from.
2023-02-12 10:34:45 +01:00
Anton Khirnov
d1b9a3ddb4 lavfi: add a new filtergraph parsing API
Callers currently have two ways of adding filters to a graph - they can
either
- create, initialize, and link them manually
- use one of the avfilter_graph_parse*() functions, which take a
  (typically end-user-written) string, split it into individual filter
  definitions+options, then create filters, apply options, initialize
  filters, and finally link them - all based on information from this
  string.

A major problem with the second approach is that it performs many
actions as a single atomic unit, leaving the caller no space to
intervene in between. Such intervention would be useful e.g. to
- modify filter options;
- supply hardware device contexts;
both of which typically must be done before the filter is initialized.

Callers who need such intervention are then forced to invent their own
filtergraph parsing, which is clearly suboptimal.

This commit aims to address this problem by adding a new modular
filtergraph parsing API. It adds a new  avfilter_graph_segment_parse()
function to parse a string filtergraph description into an intermediate
tree-like representation (AVFilterGraphSegment and its children).

This intermediate form may then be applied step by step using further
new avfilter_graph_segment*() functions, with user intervention possible
between each step.
2023-02-12 10:28:06 +01:00
J. Dekker
926059dbf3 tools: add general_assembly.pl
This script generates the current general assembly voters according to
the criteria of '20 commits in the last 36 months'.

Signed-off-by: J. Dekker <jdek@itanimul.li>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-12 10:14:22 +01:00
Paul B Mahol
a13210ab39 avformat: add RKA demuxer 2023-02-11 21:29:35 +01:00
Paul B Mahol
b8c0802156 avcodec: add RKA decoder 2023-02-11 21:26:37 +01:00
Stefano Sabatini
e3bbf5c17d doc/examples: fix make command, reference Makefile.example
Fix regression since b25d6290c6.
2023-02-11 18:06:02 +01:00
Stefano Sabatini
051e1ed1e2 examples/Makefile.example: add note about missing entries 2023-02-11 18:04:32 +01:00
Stefano Sabatini
34ff361921 examples: apply doxy entries consistency fixes
Use consistent format for the @file field and file description.
2023-02-11 17:49:01 +01:00
Stefano Sabatini
3d4dc6aa77 examples: rename transcoding to transcode 2023-02-11 17:49:01 +01:00
Stefano Sabatini
3856f82ef9 examples: rename scaling_video to scale_video 2023-02-11 17:49:01 +01:00
Stefano Sabatini
cd8211527e examples: rename resampling audio to resample_audio 2023-02-11 17:49:01 +01:00
Stefano Sabatini
0a69ca656b examples: rename remuxing to remux 2023-02-11 17:49:01 +01:00
Stefano Sabatini
ab2ec8ef01 examples: rename qsvdec to qsv_decode 2023-02-11 17:49:01 +01:00
Stefano Sabatini
eac4324bfb examples: rename muxing to mux 2023-02-11 17:49:01 +01:00
Stefano Sabatini
7a53ae931d examples: rename metadata to show_metadata 2023-02-11 17:49:01 +01:00
Stefano Sabatini
2e4694707e examples: rename http_multiclient to avio_http_serve_files 2023-02-11 17:49:01 +01:00
Stefano Sabatini
1ae619e8ee examples: rename filtering_video to decode_filter_video 2023-02-11 17:49:01 +01:00
Stefano Sabatini
3367bd56d1 examples: rename filtering_audio to decode_filter_audio 2023-02-11 17:49:01 +01:00
Stefano Sabatini
7f5630a899 examples: rename demuxing_decoding to demux_decode
Follow general scheme VERB_OBJECT.
2023-02-11 17:49:01 +01:00
Stefano Sabatini
f0a415c7eb examples: rename avio_reading to avio_read_callback
Adopt general scheme VERB_OBJECT.
2023-02-11 17:49:01 +01:00
Stefano Sabatini
2a3a36e279 doc/filters/astats: sort measure entries, add missing ones
Also apply minor consistency and formatting fixes.

Fix trac issue:
http://trac.ffmpeg.org/ticket/8397
2023-02-11 17:30:20 +01:00
Paul B Mahol
385ec46424 avformat: add SDNS demuxer 2023-02-11 11:30:46 +01:00
Anton Khirnov
2c4dcbd66b fftools/ffmpeg: rename -enc_stats* to -stats_enc*
This is consistent with -stats_mux*

As the options were added very recently, this should not break any
users.
2023-02-10 11:02:13 +01:00
James Almer
5bad485603 Bump major versions of all libraries
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
Leo Izen
719a93f4e4 avutil/{color_utils, csp}: merge color_utils into csp and expose API
libavutil/color_utils contains some avpriv_ symbols that map
enum AVTransferCharacteristic values to gamma-curve approximations and
to the actual transfer functions to invert them (i.e. -> linear).

There's two issues with this:
(1) avpriv is evil and should be avoided whenever possible
(2) libavutil/csp.h exposes a public API for handling color that
    already handles primaries and matricies

I don't see any reason this API has to be private, so this commit takes
the functionality from avutil/color_utils and merges it into avutil/csp
with an exposed av_ API rather than the previous avpriv_ API.

Every reference to the previous API has been updated to point to the
new one. color_utils.h has been deleted as well. This should not break
any applications as it only contained avpriv_ symbols in the first
place, so nothing in that header could be referenced by other
applications.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-09 15:35:14 +01:00
Andreas Rheinhardt
868a31b42d avcodec: Make avcodec_decode_subtitle2 accept a const AVPacket*
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-09 15:24:15 +01:00
Anton Khirnov
42a0dd6e7e fftools/ffmpeg: add an option for writing pre-muxing stats
Analogous to -enc_stats*, but happens right before muxing. Useful
because bitstream filters and the sync queue can modify packets after
encoding and before muxing. Also has access to the muxing timebase.
2023-02-09 15:24:15 +01:00
gnattu
d09254a658 avformat/hls: Add option to retry failed segments for hls
Current HLS implementation simply skip a failed segment to catch up
the stream, but this is not optimal for some use cases like livestream
recording.
Add an option to retry a failed segment to ensure the output file is
a complete stream.

Signed-off-by: gnattu <gnattuoc@me.com>
Reviewed-by: Steven Liu <liuqi05@kuaishou.com>
2023-02-09 14:37:23 +05:30
Anton Khirnov
d02340b9e3 lavc/decode: allow using AV_CODEC_FLAG_COPY_OPAQUE for decoding
Use it to propagate AVPacket.opaque[_ref] to corresponding AVFrame
fields. This is a more convenient alternative to reordered_opaque.
2023-02-04 13:14:20 +01:00
Paul B Mahol
4e3e70c19d avformat: add WavArc demuxer 2023-02-04 09:37:19 +01:00
Paul B Mahol
651da91915 avcodec: add WavArc decoder 2023-02-04 09:36:01 +01:00
Jan Ekström
9a820ec8b1 ffmpeg: add video heartbeat capability to fix_sub_duration
Splits the currently handled subtitle at random access point
packets that can be configured to follow a specific output stream.
Currently only subtitle streams which are directly mapped into the
same output in which the heartbeat stream resides are affected.

This way the subtitle - which is known to be shown at this time
can be split and passed to muxer before its full duration is
yet known. This is also a drawback, as this essentially outputs
multiple subtitles from a single input subtitle that continues
over multiple random access points. Thus this feature should not
be utilized in cases where subtitle output latency does not matter.

Co-authored-by: Andrzej Nadachowski <andrzej.nadachowski@24i.com>
Co-authored-by: Bernard Boulay <bernard.boulay@24i.com>

Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
2023-02-03 16:17:29 +02:00
Anton Khirnov
806ecace91 fftools/ffmpeg: support input frame params in encoding stats 2023-01-31 09:09:23 +01:00
Paul B Mahol
229f3259f8 doc/general_contents: sync with available decoders and demuxers 2023-01-30 21:42:39 +01:00
Haihao Xiang
aecfec6f80 avfilter: add VA-API variants of the stack filters
Include hstack_vaapi, vstack_vaapi and xstack_vaapi. They may accept
input streams with different sizes.  libva2 (VA-API 1.0+) is required.

Example:
$ ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -i input.h265 -filter_complex
"[0:v][0:v]hstack_vaapi" -c:v h264_vaapi out.h264

$ ffmpeg \
-hwaccel vaapi -hwaccel_output_format vaapi -i input.h264 \
-hwaccel vaapi -hwaccel_output_format vaapi -i input.h264 \
-hwaccel vaapi -hwaccel_output_format vaapi -i input.h264 \
-hwaccel vaapi -hwaccel_output_format vaapi -i input.h264 \
-filter_complex "[0:v][1:v][2:v][3:v]xstack_vaapi=inputs=4:fill=0x000000:layout=0_0_1920x1080|w0_0_1920x1080|0_h0_1920x1080|w0_h0_1920x1080" \
-c:v hevc_vaapi out.h265

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-01-30 08:48:58 +08:00
Anton Khirnov
a1a80f2e64 lavc/encode: pass through frame durations to encoded packets
The generic code can only handle the no-delay case. Encoders with delay
need to be handled individually, which will be done in the following
commits.
2023-01-29 09:23:15 +01:00
Anton Khirnov
5c0348f3d6 lavc: add a codec flag for propagating opaque from frames to packets
This is intended to be a more convenient replacement for
reordered_opaque.

Add support for it in the two encoders that offer
AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE: libx264 and libx265. Other
encoders will be supported in future commits.
2023-01-29 09:18:14 +01:00
Anton Khirnov
935964bd41 doc/ffmpeg: drop non-existent -dc option 2023-01-29 09:12:40 +01:00
Anton Khirnov
425b2c4a56 fftools/ffmpeg: add options for writing encoding stats
Similar to -vstats, but more flexible:
- works for audio as well as video
- frame and/or packet information
- user-specifiable format
2023-01-29 09:09:59 +01:00
Paul B Mahol
40512dbd96 avfilter/af_adynamicequalizer: add auto option 2023-01-27 15:00:53 +01:00
Ashyni
69c060bea2 avfilter/vf_cropdetect: add ability to change limit at runtime
Fixes: https://trac.ffmpeg.org/ticket/9851

Signed-off-by: Ashyni <jeffrey.c@tuta.io>
2023-01-24 21:53:53 +01:00
Paul B Mahol
ac7d21284b avfilter: add fractional delay IR source filter 2023-01-16 09:59:31 +01:00
Jan Ekström
002d0ec740 avutil: introduce AVAmbientViewingEnvironment side data
This enables exposing H.274 Ambient Viewing Environment
metadata in the framework.
2023-01-13 21:26:13 +02:00
Zhao Zhili
6e7c006e40 avformat/file: add fd protocol
Unlike the pipe protocol, fd protocol has seek support if it
corresponding to a regular file.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-01-11 18:50:36 +08:00
Zhao Zhili
49b8f043ca avformat/file: add fd option for pipe
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-01-11 18:50:36 +08:00
Anton Khirnov
e884360e91 doc/ffmpeg: improve -r documentation
Explain different behavior for encoding and streamcopy.
2023-01-10 11:49:28 +01:00
Anton Khirnov
1a6ba73ff7 doc/ffmpeg.texi: drop a non-existent option
-ilme has not existed for 17 years, since
637b5326f3
2023-01-10 11:49:28 +01:00
Paul B Mahol
5d3f0226ad avfilter/avf_avectorscope: add anti-aliased line drawing mode 2023-01-09 18:07:05 +01:00
Wenbin Chen
13d04e30d7 libavcodec/qsvenc_av1: Add max_frame_size support to av1_qsv encoder
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-01-09 13:56:03 +08:00
Wenbin Chen
c8e73558fe libavcodec/qsvenc_av1: Add low_delay_brc support to av1_qsv encoder
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-01-09 13:56:03 +08:00
Clément Bœsch
68275043a0 avfilter/paletteuse: add atkinson dithering
Atkinson according to
https://bisqwit.iki.fi/jutut/kuvat/ordered_dither/error_diffusion.txt:

        *   1   1    / 8
    1   1   1
        1
2023-01-03 17:29:13 +01:00
Clément Bœsch
c973e8ae79 avfilter/paletteuse: add burkes dithering
Burkes according to
https://bisqwit.iki.fi/jutut/kuvat/ordered_dither/error_diffusion.txt:

          *  8  4
    2  4  8  4  2   / 32
2023-01-03 17:29:13 +01:00
Clément Bœsch
9973343bf9 avfilter/paletteuse: add sierra3 dithering
Sierra3 according to
https://bisqwit.iki.fi/jutut/kuvat/ordered_dither/error_diffusion.txt:

          *  5  3
    2  4  5  4  2
       2  3  2      / 32
2023-01-03 17:29:13 +01:00
Clément Bœsch
320fbf5f24 avfilter/palette{gen,use}: revert support palettes with alpha
This reverts commit dea673d0d5.

This change cannot work for several reasons, the most obvious ones are:

- the alpha is being part of the scoring of the color difference, even
  though we can not interpret the alpha as part of the perception of the
  color (we don't even know if it's premultiplied or postmultiplied)
- the colors are averaged with their alpha value which simply cannot
  work

The command proposed in the original thread of the patch actually
produces a completely broken file:

    ffmpeg -y -loglevel verbose -i fate-suite/apng/o_sample.png -filter_complex "split[split1][split2];[split1]palettegen=max_colors=254:use_alpha=1[pal1];[split2][pal1]paletteuse=use_alpha=1" -frames:v 1 out.png

We can see that many color pixels are off, but more importantly some
colors have a random alpha value: https://imgur.com/eFQ2UK7

I don't see any easy fix for this unfortunately, the approach appears to
be flawed by design.
2023-01-03 17:18:55 +01:00
Paul B Mahol
c94988a781 avfilter/af_afade: add options to control unity/silence gains 2023-01-03 10:25:06 +01:00
Gyan Doshi
d39b34123d avformat/segment: add option min_seg_duration
New option can be used to avoid creating very short segments with inputs
whose GOP size is variable or unharmonic with segment_time.

Only effective with segment_time.
2022-12-29 15:43:40 +05:30
Paul B Mahol
8906145cdf avfilter/af_afir: increase max partition size 2022-12-25 20:39:54 +01:00
Paul B Mahol
3b66757d7d avfilter: add adrc filter 2022-12-19 20:43:58 +01:00
mail@nodoa.me
38b837e0e1 avfilter/vf_decimate: add mixed option to process input only partially to be decimated
Enabling the option will only decimate frames below dupthresh and output at
variable frame rate.
2022-12-19 16:24:25 +01:00
Paul B Mahol
8c75e5fdd3 avfilter/af_afir: improve output when IR switching at runtime
Also improve normalization and add more gtype modes
2022-12-18 19:58:12 +01:00
Derek Buitenhuis
5a46647f00 doc/protocols: Remove IPFS urls to specific content in examples
We shouldn't be providing links to unverified and non-FFmpeg-controlled
content in our documentation.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2022-12-12 21:47:02 +00:00
Derek Buitenhuis
27b5ce2805 doc/protocols: Remove third party server
We do not endorse or recommend specific third party servers or companies
that users' data will be funneled through.

It is also incorrectly describing how FFmpeg currently works.

Should have been part of 412922cc6f but was
missed.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2022-12-12 21:47:02 +00:00
Paul B Mahol
c3e20f78b0 doc/filters: add more advanced and useful afir example 2022-12-11 20:53:26 +01:00
Timo Rothenpieler
7a8d78f7e3 lavc: add new unsafe_output hwaccel_flag 2022-12-10 00:52:33 +01:00
Paul B Mahol
f0f19f3d3d avfilter: add corr video filter 2022-12-08 13:03:42 +01:00
James Almer
d4f853f4ed doc/filters.texi: add documentation for the ts_sync_mode framesync option
Signed-off-by: James Almer <jamrial@gmail.com>
2022-12-07 14:37:11 -03:00
Paul B Mahol
b08e8d520e doc/filters: link framesync options for msad/identity/vif 2022-12-07 12:23:16 +01:00
Paul B Mahol
520111c610 avfilter/vf_thumbnail: allow to change stats log level 2022-12-05 21:08:02 +01:00
Marvin Scholz
4d1c9fa871 doc/examples/metadata: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Paul B Mahol
569b1a24cd avfilter/avf_showcwt: add yet another mode variant 2022-11-30 20:08:18 +01:00
Paul B Mahol
7d20635aeb avfilter/avf_showcwt: add frame slide mode 2022-11-30 18:06:42 +01:00
Paul B Mahol
d34c1b389e avfilter: add showcwt multimedia filter 2022-11-28 23:18:03 +01:00
Lynne
e97368eba5
lavu: bump minor and add APIchanges entry for lavu/tx DCT 2022-11-24 15:58:36 +01:00
Anton Khirnov
14c6093528 doc/developer.texi: extend and update naming conventions
Bring it up to date with current practice, as the current text does not
cover everything. Drop the reference to unprefixed exported symbols,
which do not exist anymore.
2022-11-23 10:43:41 +01:00
Anton Khirnov
2d172b89b2 doc/developer.texi: drop a misplaced sentence from code formatting section
It describes a general development policy, not code formatting. It is
also not true, as these days we tend to prioritize correctness, safety,
and completeness over code size.
2022-11-23 10:43:27 +01:00
Anton Khirnov
d95d0b1b72 doc/developer.texi: move editor configuration under formatting
It logically belongs there.
2022-11-23 10:43:22 +01:00
Anton Khirnov
9177556bb9 doc/developer.texi: update the language feature section
It is currently very out of touch with reality.

* declare we are using C99 fully, rather than C90 plus extensions
* mention our use of stdatomic.h
* mention forbidden C99 features, like VLAs and complex numbers
2022-11-23 10:41:06 +01:00
Anton Khirnov
256db01851 doc/developer.texi: move the language feature section higher up
It makes more sense to first describe the language we are using and only
then document how to format code in it, rather than the reverse.
2022-11-23 10:41:01 +01:00
Marton Balint
98f6c59f4f avformat/electronicarts: add option to return alpha channel in the main video stream in VP6A codec
VP6 alpha in EA format is a second VP6 encoded video stream where only the Y
component is used and is interpreted as the alpha channel of the first VP6
stream. The alpha VP6 stream is muxed separately from the main VP6 stream, has
its own stream headers and packet headers. In theory the two streams might not
even have the same resolution (although most likely that is not something that
is seen or supported in the wild), but the format is capable of doing it.

Merged VP6 alpha (also known as the VP6A codec) means that a packet of the
video stream contains the corresponding packet of both VP6 substreams like
this:

{OffsetOfAlpha, DataPacket, AlphaDataPacket}

So data and alpha data of a frame is merged to a single packet, this is how VP6
video with alpha is muxed in FLV and SWF.

The first approach is more like how the demuxer sees data in the EA format,
unfortunately it is different to what the FLV or SWF format expects, so -
having no better place for it in the framework - I decided to do an optional
format conversion in the EA demuxer.

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-11-22 22:59:51 +01:00
Wenbin Chen
efe2b63c89 doc/examples: Add qsv_transcode example
Add qsv_transcode example which shows how to use qsv to do hardware
accelerated transcoding, also show how to dynamically set encoding
parameters.

examples:
Normal usage:
qsv_transcode input.mp4 h264_qsv output.mp4 "g 60"

Dynamic setting usage:
qsv_transcode input.mp4 hevc_qsv output.mp4 "g 60 asyne_depth 1"
100 "g 120"
This command initializes codec with gop_size 60 and change it to
120 after 100 frames

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-11-22 13:52:38 +08:00
Niklas Haas
05d390890a avfilter/vf_libplacebo: default to normalize_sar=0
As a result of a typo in the source code, this option was completely
non-functional. In order to fix it, without breaking the current default
behavior, explicitly change this default to 0.

This behavior is also consistent with how other scale filters behave by
default, so it's probably best to enshrine it anyways.
2022-11-19 14:15:19 +01:00
Paul B Mahol
52291d2ac8 avfilter/af_surround: implement smooth option/support 2022-11-18 21:51:10 +01:00
Paul B Mahol
59b16355ec avfilter/avf_showspatial: switch to lavu TX
Also try harder to make output constant frame rate.
2022-11-17 12:37:22 +01:00
Anton Khirnov
6a3e174ad1 doc/developer.texi: refine the "contributing code" section
Drop the reference to directly committing code, because
- it is highly discouraged and very rarely done these days
- there is no good reason NOT to submit patches for review

Add a link to the development policy chapter.
2022-11-17 10:58:30 +01:00
Anton Khirnov
66871647dc doc/developer.texi: demote the "contributing" chapter to a section
It is very short and its main functions is linking to the
coding rules/submitting patches chapters.
2022-11-17 10:58:20 +01:00
Anton Khirnov
c0c492dd47 doc/developer.texi: extend the argument for submitting patches
Stop talking about commercial programs, since this applies to any
downstream user.
2022-11-17 10:57:37 +01:00