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.
This commit is contained in:
Anton Khirnov 2023-12-18 09:19:25 +01:00
parent c5a87d8bdb
commit 0125cab385

View File

@ -1445,7 +1445,7 @@ const OptionDef options[] = {
{ "n", OPT_TYPE_BOOL, 0,
{ &no_file_overwrite },
"never overwrite output files" },
{ "ignore_unknown", OPT_TYPE_BOOL, 0,
{ "ignore_unknown", OPT_TYPE_BOOL, OPT_EXPERT,
{ &ignore_unknown_streams },
"Ignore unknown stream types" },
{ "copy_unknown", OPT_TYPE_BOOL, OPT_EXPERT,
@ -1458,11 +1458,11 @@ const OptionDef options[] = {
{ .off = OFFSET(codec_names) },
"codec name", "codec",
.u1.name_canon = "codec", },
{ "codec", OPT_TYPE_STRING, OPT_SPEC | OPT_INPUT | OPT_OUTPUT | OPT_HAS_ALT,
{ "codec", OPT_TYPE_STRING, OPT_SPEC | OPT_INPUT | OPT_OUTPUT | OPT_EXPERT | OPT_HAS_ALT,
{ .off = OFFSET(codec_names) },
"codec name", "codec",
.u1.names_alt = alt_codec, },
{ "pre", OPT_TYPE_STRING, OPT_SPEC | OPT_OUTPUT | OPT_HAS_ALT,
{ "pre", OPT_TYPE_STRING, OPT_SPEC | OPT_OUTPUT | OPT_EXPERT | OPT_HAS_ALT,
{ .off = OFFSET(presets) },
"preset name", "preset",
.u1.names_alt = alt_pre, },
@ -1470,7 +1470,7 @@ const OptionDef options[] = {
{ .func_arg = opt_map },
"set input stream mapping",
"[-]input_file_id[:stream_specifier][,sync_file_id[:stream_specifier]]" },
{ "map_metadata", OPT_TYPE_STRING, OPT_SPEC | OPT_OUTPUT,
{ "map_metadata", OPT_TYPE_STRING, OPT_SPEC | OPT_OUTPUT | OPT_EXPERT,
{ .off = OFFSET(metadata_map) },
"set metadata information of outfile from infile",
"outfile[,metadata]:infile[,metadata]" },
@ -1484,16 +1484,16 @@ const OptionDef options[] = {
{ "to", OPT_TYPE_TIME, OPT_OFFSET | OPT_INPUT | OPT_OUTPUT,
{ .off = OFFSET(stop_time) },
"record or transcode stop time", "time_stop" },
{ "fs", OPT_TYPE_INT64, OPT_OFFSET | OPT_OUTPUT,
{ "fs", OPT_TYPE_INT64, OPT_OFFSET | OPT_OUTPUT | OPT_EXPERT,
{ .off = OFFSET(limit_filesize) },
"set the limit file size in bytes", "limit_size" },
{ "ss", OPT_TYPE_TIME, OPT_OFFSET | OPT_INPUT | OPT_OUTPUT,
{ .off = OFFSET(start_time) },
"set the start time offset", "time_off" },
{ "sseof", OPT_TYPE_TIME, OPT_OFFSET | OPT_INPUT,
{ "sseof", OPT_TYPE_TIME, OPT_OFFSET | OPT_INPUT | OPT_EXPERT,
{ .off = OFFSET(start_time_eof) },
"set the start time offset relative to EOF", "time_off" },
{ "seek_timestamp", OPT_TYPE_INT, OPT_OFFSET | OPT_INPUT,
{ "seek_timestamp", OPT_TYPE_INT, OPT_OFFSET | OPT_INPUT | OPT_EXPERT,
{ .off = OFFSET(seek_timestamp) },
"enable/disable seeking by timestamp with -ss" },
{ "accurate_seek", OPT_TYPE_BOOL, OPT_OFFSET | OPT_EXPERT | OPT_INPUT,
@ -1508,13 +1508,13 @@ const OptionDef options[] = {
{ "itsscale", OPT_TYPE_DOUBLE, OPT_SPEC | OPT_EXPERT | OPT_INPUT,
{ .off = OFFSET(ts_scale) },
"set the input ts scale", "scale" },
{ "timestamp", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_PERFILE | OPT_OUTPUT,
{ "timestamp", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_PERFILE | OPT_EXPERT | OPT_OUTPUT,
{ .func_arg = opt_recording_timestamp },
"set the recording timestamp ('now' to set the current time)", "time" },
{ "metadata", OPT_TYPE_STRING, OPT_SPEC | OPT_OUTPUT,
{ .off = OFFSET(metadata) },
"add metadata", "string=string" },
{ "program", OPT_TYPE_STRING, OPT_SPEC | OPT_OUTPUT,
{ "program", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT,
{ .off = OFFSET(program) },
"add program with specified streams", "title=string:st=number..." },
{ "stream_group", OPT_TYPE_STRING, OPT_SPEC | OPT_OUTPUT,
@ -1554,7 +1554,7 @@ const OptionDef options[] = {
{ "readrate_initial_burst", OPT_TYPE_DOUBLE, OPT_OFFSET | OPT_EXPERT | OPT_INPUT,
{ .off = OFFSET(readrate_initial_burst) },
"The initial amount of input to burst read before imposing any readrate", "seconds" },
{ "target", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_PERFILE | OPT_OUTPUT,
{ "target", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_PERFILE | OPT_EXPERT | OPT_OUTPUT,
{ .func_arg = opt_target },
"specify target file type (\"vcd\", \"svcd\", \"dvd\", \"dv\" or \"dv50\" "
"with optional prefixes \"pal-\", \"ntsc-\" or \"film-\")", "type" },
@ -1582,7 +1582,7 @@ const OptionDef options[] = {
{ "bitexact", OPT_TYPE_BOOL, OPT_EXPERT | OPT_OFFSET | OPT_OUTPUT | OPT_INPUT,
{ .off = OFFSET(bitexact) },
"bitexact mode" },
{ "apad", OPT_TYPE_STRING, OPT_SPEC | OPT_OUTPUT,
{ "apad", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT,
{ .off = OFFSET(apad) },
"audio pad", "" },
{ "dts_delta_threshold", OPT_TYPE_FLOAT, OPT_EXPERT,
@ -1603,7 +1603,7 @@ const OptionDef options[] = {
{ "copypriorss", OPT_TYPE_INT, OPT_EXPERT | OPT_SPEC | OPT_OUTPUT,
{ .off = OFFSET(copy_prior_start) },
"copy or discard frames before start time" },
{ "frames", OPT_TYPE_INT64, OPT_SPEC | OPT_OUTPUT | OPT_HAS_ALT,
{ "frames", OPT_TYPE_INT64, OPT_SPEC | OPT_OUTPUT | OPT_EXPERT | OPT_HAS_ALT,
{ .off = OFFSET(max_frames) },
"set the number of frames to output", "number",
.u1.names_alt = alt_frames, },
@ -1626,19 +1626,19 @@ const OptionDef options[] = {
{ .off = OFFSET(filters) },
"set stream filtergraph", "filter_graph",
.u1.names_alt = alt_filter, },
{ "filter_threads", OPT_TYPE_FUNC, OPT_FUNC_ARG,
{ "filter_threads", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_EXPERT,
{ .func_arg = opt_filter_threads },
"number of non-complex filter threads" },
{ "filter_script", OPT_TYPE_STRING, OPT_SPEC | OPT_OUTPUT,
{ "filter_script", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT,
{ .off = OFFSET(filter_scripts) },
"read stream filtergraph description from a file", "filename" },
{ "reinit_filter", OPT_TYPE_INT, OPT_SPEC | OPT_INPUT,
{ "reinit_filter", OPT_TYPE_INT, OPT_SPEC | OPT_INPUT | OPT_EXPERT,
{ .off = OFFSET(reinit_filters) },
"reinit filtergraph on input parameter changes", "" },
{ "filter_complex", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_EXPERT,
{ .func_arg = opt_filter_complex },
"create a complex filtergraph", "graph_description" },
{ "filter_complex_threads", OPT_TYPE_INT, 0,
{ "filter_complex_threads", OPT_TYPE_INT, OPT_EXPERT,
{ &filter_complex_nbthreads },
"number of threads for -filter_complex" },
{ "lavfi", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_EXPERT,
@ -1667,13 +1667,13 @@ const OptionDef options[] = {
{ "debug_ts", OPT_TYPE_BOOL, OPT_EXPERT,
{ &debug_ts },
"print timestamp debugging info" },
{ "max_error_rate", OPT_TYPE_FLOAT, 0,
{ "max_error_rate", OPT_TYPE_FLOAT, OPT_EXPERT,
{ &max_error_rate },
"ratio of decoding errors (0.0: no errors, 1.0: 100% errors) above which ffmpeg returns an error instead of success.", "maximum error rate" },
{ "discard", OPT_TYPE_STRING, OPT_SPEC | OPT_INPUT,
{ "discard", OPT_TYPE_STRING, OPT_SPEC | OPT_INPUT | OPT_EXPERT,
{ .off = OFFSET(discard) },
"discard", "" },
{ "disposition", OPT_TYPE_STRING, OPT_SPEC | OPT_OUTPUT,
{ "disposition", OPT_TYPE_STRING, OPT_SPEC | OPT_OUTPUT | OPT_EXPERT,
{ .off = OFFSET(disposition) },
"disposition", "" },
{ "thread_queue_size", OPT_TYPE_INT, OPT_OFFSET | OPT_EXPERT | OPT_INPUT | OPT_OUTPUT,
@ -1706,14 +1706,14 @@ const OptionDef options[] = {
"format of the stats written with -stats_mux_pre" },
/* video options */
{ "vframes", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_PERFILE | OPT_OUTPUT | OPT_HAS_CANON,
{ "vframes", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_PERFILE | OPT_OUTPUT | OPT_EXPERT | OPT_HAS_CANON,
{ .func_arg = opt_video_frames },
"set the number of video frames to output", "number",
.u1.name_canon = "frames", },
{ "r", OPT_TYPE_STRING, OPT_VIDEO | OPT_SPEC | OPT_INPUT | OPT_OUTPUT,
{ .off = OFFSET(frame_rates) },
"set frame rate (Hz value, fraction or abbreviation)", "rate" },
{ "fpsmax", OPT_TYPE_STRING, OPT_VIDEO | OPT_SPEC | OPT_OUTPUT,
{ "fpsmax", OPT_TYPE_STRING, OPT_VIDEO | OPT_SPEC | OPT_OUTPUT | OPT_EXPERT,
{ .off = OFFSET(max_frame_rates) },
"set max frame rate (Hz value, fraction or abbreviation)", "rate" },
{ "s", OPT_TYPE_STRING, OPT_VIDEO | OPT_SUBTITLE | OPT_SPEC | OPT_INPUT | OPT_OUTPUT,
@ -1725,15 +1725,15 @@ const OptionDef options[] = {
{ "pix_fmt", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_INPUT | OPT_OUTPUT,
{ .off = OFFSET(frame_pix_fmts) },
"set pixel format", "format" },
{ "display_rotation", OPT_TYPE_DOUBLE, OPT_VIDEO | OPT_SPEC | OPT_INPUT,
{ "display_rotation", OPT_TYPE_DOUBLE, OPT_VIDEO | OPT_SPEC | OPT_INPUT | OPT_EXPERT,
{ .off = OFFSET(display_rotations) },
"set pure counter-clockwise rotation in degrees for stream(s)",
"angle" },
{ "display_hflip", OPT_TYPE_BOOL, OPT_VIDEO | OPT_SPEC | OPT_INPUT,
{ "display_hflip", OPT_TYPE_BOOL, OPT_VIDEO | OPT_SPEC | OPT_INPUT | OPT_EXPERT,
{ .off = OFFSET(display_hflips) },
"set display horizontal flip for stream(s) "
"(overrides any display rotation if it is not set)"},
{ "display_vflip", OPT_TYPE_BOOL, OPT_VIDEO | OPT_SPEC | OPT_INPUT,
{ "display_vflip", OPT_TYPE_BOOL, OPT_VIDEO | OPT_SPEC | OPT_INPUT | OPT_EXPERT,
{ .off = OFFSET(display_vflips) },
"set display vertical flip for stream(s) "
"(overrides any display rotation if it is not set)"},
@ -1747,10 +1747,10 @@ const OptionDef options[] = {
{ .func_arg = opt_video_codec },
"force video codec ('copy' to copy stream)", "codec",
.u1.name_canon = "codec", },
{ "timecode", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_PERFILE | OPT_OUTPUT,
{ "timecode", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_PERFILE | OPT_OUTPUT | OPT_EXPERT,
{ .func_arg = opt_timecode },
"set initial TimeCode value.", "hh:mm:ss[:;.]ff" },
{ "pass", OPT_TYPE_INT, OPT_VIDEO | OPT_SPEC | OPT_OUTPUT,
{ "pass", OPT_TYPE_INT, OPT_VIDEO | OPT_SPEC | OPT_OUTPUT | OPT_EXPERT,
{ .off = OFFSET(pass) },
"select the pass number (1 to 3)", "n" },
{ "passlogfile", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT,
@ -1822,7 +1822,7 @@ const OptionDef options[] = {
"random access points" },
/* audio options */
{ "aframes", OPT_TYPE_FUNC, OPT_AUDIO | OPT_FUNC_ARG | OPT_PERFILE | OPT_OUTPUT | OPT_HAS_CANON,
{ "aframes", OPT_TYPE_FUNC, OPT_AUDIO | OPT_FUNC_ARG | OPT_PERFILE | OPT_OUTPUT | OPT_EXPERT | OPT_HAS_CANON,
{ .func_arg = opt_audio_frames },
"set the number of audio frames to output", "number",
.u1.name_canon = "frames", },
@ -1883,7 +1883,7 @@ const OptionDef options[] = {
{ "fix_sub_duration", OPT_TYPE_BOOL, OPT_EXPERT | OPT_SUBTITLE | OPT_SPEC | OPT_INPUT,
{ .off = OFFSET(fix_sub_duration) },
"fix subtitles duration" },
{ "canvas_size", OPT_TYPE_STRING, OPT_SUBTITLE | OPT_SPEC | OPT_INPUT,
{ "canvas_size", OPT_TYPE_STRING, OPT_SUBTITLE | OPT_SPEC | OPT_INPUT | OPT_EXPERT,
{ .off = OFFSET(canvas_sizes) },
"set canvas size (WxH or abbreviation)", "size" },