* [FFmpeg-devel] [PATCH] ffprobe: add -output_format as an alias of -of
@ 2023-10-15 9:29 Stefano Sabatini
2023-10-18 21:45 ` Stefano Sabatini
0 siblings, 1 reply; 3+ messages in thread
From: Stefano Sabatini @ 2023-10-15 9:29 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Stefano Sabatini
Currently we have -of and -print_format, which is a bit confusing. Add
-output_format as an alias of -of to match the short name.
---
Changelog | 1 +
doc/ffprobe.texi | 6 +++---
fftools/ffprobe.c | 17 +++++++++--------
3 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/Changelog b/Changelog
index 259180e190..cceee46215 100644
--- a/Changelog
+++ b/Changelog
@@ -37,6 +37,7 @@ version <next>:
- VAAPI AV1 encoder
- ffprobe XML output schema changed to account for multiple
variable-fields elements within the same parent element
+- ffprobe -output_format option added as an alias of -of
version 6.0:
diff --git a/doc/ffprobe.texi b/doc/ffprobe.texi
index 4dc9f577bb..b74ff650ac 100644
--- a/doc/ffprobe.texi
+++ b/doc/ffprobe.texi
@@ -41,7 +41,7 @@ ffprobe will show it.
ffprobe output is designed to be easily parsable by a textual filter,
and consists of one or more sections of a form defined by the selected
-writer, which is specified by the @option{print_format} option.
+writer, which is specified by the @option{output_format} option.
Sections may contain other nested sections, and are identified by a
name (which may be shared by other sections), and an unique
@@ -83,7 +83,7 @@ Use sexagesimal format HH:MM:SS.MICROSECONDS for time values.
Prettify the format of the displayed values, it corresponds to the
options "-unit -prefix -byte_binary_prefix -sexagesimal".
-@item -of, -print_format @var{writer_name}[=@var{writer_options}]
+@item -output_format, -of, -print_format @var{writer_name}[=@var{writer_options}]
Set the output printing format.
@var{writer_name} specifies the name of the writer, and
@@ -91,7 +91,7 @@ Set the output printing format.
For example for printing the output in JSON format, specify:
@example
--print_format json
+-output_format json
@end example
For more details on the available output printing formats, see the
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index e490a9a9b2..91e81e639c 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -140,7 +140,7 @@ static int show_private_data = 1;
#define SHOW_OPTIONAL_FIELDS_ALWAYS 1
static int show_optional_fields = SHOW_OPTIONAL_FIELDS_AUTO;
-static char *print_format;
+static char *output_format;
static char *stream_specifier;
static char *show_data_hash;
@@ -4094,9 +4094,10 @@ static const OptionDef real_options[] = {
"use sexagesimal format HOURS:MM:SS.MICROSECONDS for time units" },
{ "pretty", 0, {.func_arg = opt_pretty},
"prettify the format of displayed values, make it more human readable" },
- { "print_format", OPT_STRING | HAS_ARG, { &print_format },
+ { "output_format", OPT_STRING | HAS_ARG, { &output_format },
"set the output printing format (available formats are: default, compact, csv, flat, ini, json, xml)", "format" },
- { "of", OPT_STRING | HAS_ARG, { &print_format }, "alias for -print_format", "format" },
+ { "print_format", OPT_STRING | HAS_ARG, { &output_format }, "alias for -output_format (deprecated)" },
+ { "of", OPT_STRING | HAS_ARG, { &output_format }, "alias for -output_format", "format" },
{ "select_streams", OPT_STRING | HAS_ARG, { &stream_specifier }, "select the specified streams", "stream_specifier" },
{ "sections", OPT_EXIT, {.func_arg = opt_sections}, "print sections structure and section information, and exit" },
{ "show_data", OPT_BOOL, { &do_show_data }, "show packets data" },
@@ -4217,13 +4218,13 @@ int main(int argc, char **argv)
writer_register_all();
- if (!print_format)
- print_format = av_strdup("default");
- if (!print_format) {
+ if (!output_format)
+ output_format = av_strdup("default");
+ if (!output_format) {
ret = AVERROR(ENOMEM);
goto end;
}
- w_name = av_strtok(print_format, "=", &buf);
+ w_name = av_strtok(output_format, "=", &buf);
if (!w_name) {
av_log(NULL, AV_LOG_ERROR,
"No name specified for the output format\n");
@@ -4292,7 +4293,7 @@ int main(int argc, char **argv)
}
end:
- av_freep(&print_format);
+ av_freep(&output_format);
av_freep(&read_intervals);
av_hash_freep(&hash);
--
2.34.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [FFmpeg-devel] [PATCH] ffprobe: add -output_format as an alias of -of
2023-10-15 9:29 [FFmpeg-devel] [PATCH] ffprobe: add -output_format as an alias of -of Stefano Sabatini
@ 2023-10-18 21:45 ` Stefano Sabatini
2023-10-20 17:02 ` Stefano Sabatini
0 siblings, 1 reply; 3+ messages in thread
From: Stefano Sabatini @ 2023-10-18 21:45 UTC (permalink / raw)
To: FFmpeg development discussions and patches
On date Sunday 2023-10-15 11:29:10 +0200, Stefano Sabatini wrote:
> Currently we have -of and -print_format, which is a bit confusing. Add
> -output_format as an alias of -of to match the short name.
> ---
> Changelog | 1 +
> doc/ffprobe.texi | 6 +++---
> fftools/ffprobe.c | 17 +++++++++--------
> 3 files changed, 13 insertions(+), 11 deletions(-)
>
> diff --git a/Changelog b/Changelog
> index 259180e190..cceee46215 100644
> --- a/Changelog
> +++ b/Changelog
> @@ -37,6 +37,7 @@ version <next>:
> - VAAPI AV1 encoder
> - ffprobe XML output schema changed to account for multiple
> variable-fields elements within the same parent element
> +- ffprobe -output_format option added as an alias of -of
Will push tomorrow or later if I see no comments.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [FFmpeg-devel] [PATCH] ffprobe: add -output_format as an alias of -of
2023-10-18 21:45 ` Stefano Sabatini
@ 2023-10-20 17:02 ` Stefano Sabatini
0 siblings, 0 replies; 3+ messages in thread
From: Stefano Sabatini @ 2023-10-20 17:02 UTC (permalink / raw)
To: FFmpeg development discussions and patches
On date Wednesday 2023-10-18 23:45:11 +0200, Stefano Sabatini wrote:
> On date Sunday 2023-10-15 11:29:10 +0200, Stefano Sabatini wrote:
> > Currently we have -of and -print_format, which is a bit confusing. Add
> > -output_format as an alias of -of to match the short name.
> > ---
> > Changelog | 1 +
> > doc/ffprobe.texi | 6 +++---
> > fftools/ffprobe.c | 17 +++++++++--------
> > 3 files changed, 13 insertions(+), 11 deletions(-)
> >
> > diff --git a/Changelog b/Changelog
> > index 259180e190..cceee46215 100644
> > --- a/Changelog
> > +++ b/Changelog
> > @@ -37,6 +37,7 @@ version <next>:
> > - VAAPI AV1 encoder
> > - ffprobe XML output schema changed to account for multiple
> > variable-fields elements within the same parent element
> > +- ffprobe -output_format option added as an alias of -of
>
> Will push tomorrow or later if I see no comments.
Applied.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-20 17:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-15 9:29 [FFmpeg-devel] [PATCH] ffprobe: add -output_format as an alias of -of Stefano Sabatini
2023-10-18 21:45 ` Stefano Sabatini
2023-10-20 17:02 ` Stefano Sabatini
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git