James Almer
d2eb6f4d44
fftools/ffmpeg_mux_init: don't free the AVDictionaryEntry until after it's been used
...
Signed-off-by: James Almer <jamrial@gmail.com>
10 months ago
James Almer
04a37e238f
fftools/ffmpeg_mux_init: remove whitespaces from input arguments when parsing stream groups
...
If the arguments are read from a file, things like line breaks could be present
Signed-off-by: James Almer <jamrial@gmail.com>
10 months ago
Anton Khirnov
344d3a7d45
fftools/ffmpeg_opt: improve wording in option descriptions
10 months ago
Anton Khirnov
9cb52927b9
fftools/cmdutils: surround option arguments by <> in help output
...
Makes it more clear that they are placeholders for actual values.
10 months ago
Anton Khirnov
0b95e71aa0
fftools/ffmpeg_opt: briefly mention stream specifier syntax in help output
10 months ago
Anton Khirnov
68af3e37cc
fftools/cmdutils: indicate specifiers in option syntax in help output
10 months ago
Anton Khirnov
43323c3802
fftools/ffmpeg_opt: add more structure to long help output
...
Split the "Per-file main options" section into
* per-file input and output
* per-file input-only
* per-file output-only
* per-stream
10 months ago
Anton Khirnov
67529ad8a4
fftools/cmdutils: drop alt_flags parameter from show_help_options()
...
No user sets it to more than one flag, so it is redundant with
req_flags.
10 months ago
Anton Khirnov
03aedbdd40
fftools/cmdutils: add a flag for per-stream options
...
Not all OPT_SPEC options are per-stream, this will allow identifying
those that are, which will be useful in following commits.
10 months ago
Anton Khirnov
d8173cfcaf
fftools/cmdutils: hide some information listing options from basic help
...
They are for advanced usage only and should not clutter basic output.
10 months ago
Anton Khirnov
08bebeb1be
Revert "all: Don't set AVClass.item_name to its default value"
...
Some callers assume that item_name is always set, so this may be
considered an API break.
This reverts commit 0c6203c97a
.
10 months ago
Anton Khirnov
a8bc79c3fd
fftools/ffmpeg: deprecate -filter_script
...
It is equivalent to -/filter.
10 months ago
Anton Khirnov
c316c4c77b
fftools/ffmpeg: deprecate -filter_complex_script
...
It is equivalent to -/filter_complex.
10 months ago
Anton Khirnov
6d17991b7e
fftools/cmdutils: add option syntax for loading arbitrary arguments from a file
...
Aligned with analogous feature for filter options in ffmpeg CLI.
10 months ago
Anton Khirnov
8aed3911fc
fftools/ffmpeg: make attachment filenames dynamically allocated
...
Do not store the supplied arg pointer directly. While that is valid for
now, it will become ephemeral in the future commits.
10 months ago
Anton Khirnov
fcddd233fe
fftools/ffplay: make option strings dynamically allocated
...
Do not store the supplied arg pointer directly. While that is valid for
now, it will become ephemeral in the future commits.
10 months ago
Anton Khirnov
4ce1987abc
fftools/ffprobe: make option strings dynamically allocated
...
Do not store the supplied arg pointer directly. While that is valid for
now, arg will become ephemeral in the future commits.
10 months ago
Anton Khirnov
568dfed06f
fftools/ffmpeg_opt: mark -stream_group as expert option
10 months ago
Anton Khirnov
ae06111d74
fftools/ffmpeg_demux: implement -bsf for input
...
Previously bitstream filters could only be applied right before muxing,
this allows to apply them right after demuxing.
10 months ago
Anton Khirnov
6cb7295abf
fftools/ffmpeg_demux: add demuxing thread private data
...
To be used for data that never needs to be visible outside of the
demuxer thread, similarly as was previously done for other components.
10 months ago
Anton Khirnov
50448ca290
fftools/ffmpeg_demux: only allocate the decoder when actually decoding
...
It is not needed otherwise.
10 months ago
Anton Khirnov
2ee1c6ffb2
fftools/ffmpeg_demux: set options on codec parameters rather than decoder
...
This avoids the requirement to always have a decoder context.
10 months ago
Anton Khirnov
7e33534506
fftools/ffmpeg_demux: do not set bitexact directly on the decoder
...
Add it to decoder options instead, to be processed when opening the
decoder. This way it won't be overridden by flags the user might be
setting otherwise.
10 months ago
Anton Khirnov
f8939bad1e
fftools/ffmpeg_demux: replace abort() by av_assert0(0)
...
This is the standard way to mark unreachable cases in a switch
10 months ago
Zhao Zhili
564a15b2ee
fftools/ffplay_renderer: Add device selection support
...
The device can be selected by GPU name or index. For example,
ffplay -hwaccel cuda \
-vulkan_params device="NVIDIA GeForce RTX 3060" \
foo.mp4
ffplay -hwaccel cuda -vulkan_params device="0" foo.mp4
Please note that select device by index only supported by hwcontext,
not by libplacebo.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
10 months ago
Zhao Zhili
38aca1dc9a
fftools/ffplay: fix missing hw_frames_ctx when config avfilter
...
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
10 months ago
Marton Balint
90bef6390f
fftools/ffmpeg_filter: log an information message about filter graph reconfigurations
...
Filter graph reconfigurations can cause nontrivial issues, e.g. PTS
discontinuities, so it is better to warn the user about them.
Signed-off-by: Marton Balint <cus@passwd.hu>
11 months ago
Marton Balint
324be730fc
fftools/ffmpeg_filter: honor -reinit_filters 0 even on changed display matrix
...
Not sure about honoring it also in case of a hwaccel change, so left that as is
for now.
Signed-off-by: Marton Balint <cus@passwd.hu>
11 months ago
xufuji456
6caf34dbe0
fftool/ffplay: avoid same name in local variable
...
There is a warning in XCode:"Declaration shadows a local variable"
Signed-off-by: xufuji456 <839789740@qq.com>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
11 months ago
Niklas Haas
9613ba95c1
fftools/ffmpeg_filter: configure buffersrc with csp/range
...
Propagates input metadata to the input filter graph.
11 months ago
Niklas Haas
9d0f361f7f
fftools/ffmpeg_filter: don't clear buffersrc params
...
This memset is bogus, it accomplishes nothing in the best case and
regresses future additions to AVBufferSrcParameters in the worst case.
11 months ago
Andreas Rheinhardt
0c6203c97a
all: Don't set AVClass.item_name to its default value
...
Unnecessary since acf63d5350adeae551d412db699f8ca03f7e76b9;
also avoids relocations.
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
11 months ago
Anton Khirnov
6325aede08
fftools/ffmpeg: remove deprecated -[av]bsf
...
They were marked as deprecated over 10 years ago.
11 months ago
Anton Khirnov
7f982065a8
fftools/ffmpeg: mark -vsync for future removal
...
It has already been deprecated over a year ago.
11 months ago
Anton Khirnov
8d8c2b410f
fftools/ffmpeg_opt: fix -dn flags
...
It's a data, not video option.
11 months ago
Anton Khirnov
84352c9891
fftools/ffmpeg_opt: print a section for data-stream options
...
Only show it with show_advanced (triggered by -h long), since data
streams themselves are an advanced topic.
11 months ago
Anton Khirnov
74df1b73d4
fftools/ffmpeg_opt: refine printing type-specific options
...
* filter subtitle/data options out of main, video and audio sections
* add filters that were missing entirely from the subtitle section
* add a missing section for advanced subtitle options
11 months ago
Anton Khirnov
0125cab385
fftools/ffmpeg_opt: mark more options as OPT_EXPERT
...
Reduces the basic help output to a reasonable size and stops confusing
users with options the vast majority will not need.
11 months ago
Anton Khirnov
c5a87d8bdb
fftools/opt_common: mark some options as OPT_EXPERT
...
So they don't clutter the standard help output.
-loglevel is marked because there is no need to show two options (-v and
-loglevel) that do the same thing.
11 months ago
Anton Khirnov
86e8439994
fftools/ffmpeg_opt: update program description to match manpage
...
Cf. 2244722f1f
11 months ago
Anton Khirnov
41716214c2
fftools/ffmpeg: improve WARN_MULTIPLE_OPT_USAGE()
...
Currently it requires every single OPT_SPEC option to be accompanied by
an array of alternate names for this option. The vast majority of
options have no alternate names, resulting in a large numbers of
unnecessary single-element arrays that merely contain the option name.
Extend the option parsing API to allow marking options as having
alternate names, or as being the canonical name for some existing
alternatives. Use this new information to avoid the need for
abovementioned unnecessary single-element arrays.
11 months ago
Anton Khirnov
148fac277a
fftools/ffmpeg: change the MATCH_PER_TYPE_OPT macro into a function
...
There is no reason for it to be a macro anymore, this makes the code
using it cleaner and simpler.
11 months ago
Anton Khirnov
0ba70a6792
fftools/cmdutils: add a struct for a list of SpecifierOpt
...
Significantly simplifies the code dealing with OPT_SPEC.
11 months ago
Anton Khirnov
5792382269
fftools/cmdutils: check valid flags for OPT_TYPE_FUNC
...
SPEC and OFFSET do not make sense for functions.
11 months ago
Anton Khirnov
2f1bc3b424
fftools/cmdutils: include OPT_PERFILE in OPT_OFFSET
...
And analogously OPT_OFFSET in OPT_SPEC. Previously the inclusion would
be implicit and required all code to remember this.
11 months ago
Anton Khirnov
66fcfc0009
fftools/cmdutils: renumber option flags sequentially
...
Also, document them.
11 months ago
Anton Khirnov
5b1b132072
fftools/cmdutils: rename HAS_ARG to OPT_FUNC_ARG
...
For consistent namespacing with other option flags. Also, document and
enforce that it can only be set for func-type options.
11 months ago
Anton Khirnov
d2e479a429
fftools: split off option types from other flags
...
These values are not actually flags, as only one of them can be
meaningfully set.
11 months ago
Anton Khirnov
074abeb57e
fftools/ffmpeg_opt: move deprecated options to the end of the list
...
This way they don't clutter this already-cluttered code even further.
11 months ago
Anton Khirnov
b472c46a70
fftools/cmdutils: simplify handling of the HAS_ARG option flag
...
This option flag only carries nontrivial information for options that
call a function, in all other cases its presence can be inferred from
the option type (bool options do not have arguments, all other types do)
and is thus nothing but useless clutter.
Change the option parsing code to infer its value when it can, and drop
the flag from options where it's not needed.
11 months ago