History

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.

Anton Khirnov committed 2 years ago

Commit 03aedbd1 parent d8173cf2 files · +68 −63Browse files

Unified · Split

2 files
  1. fftools/cmdutils.h +9 −4
  2. fftools/ffmpeg_opt.c +59 −59
fftools/cmdutils.h+9−4
@@ -158,17 +158,22 @@ typedef struct OptionDef { · 157 unmodified lines
158158 Always use as OPT_SPEC in option definitions. */
159159 #define OPT_FLAG_SPEC (1 << 9)
160160 #define OPT_SPEC (OPT_FLAG_SPEC | OPT_OFFSET)
161+
162+/* Option applies per-stream (implies OPT_SPEC). */
163+#define OPT_FLAG_PERSTREAM (1 << 10)
164+#define OPT_PERSTREAM (OPT_FLAG_PERSTREAM | OPT_SPEC)
165+
161166 /* ffmpeg-only - specifies whether an OPT_PERFILE option applies to input,
162167 * output, or both. */
163−#define OPT_INPUT (1 << 10)
164−#define OPT_OUTPUT (1 << 11)
168+#define OPT_INPUT (1 << 11)
169+#define OPT_OUTPUT (1 << 12)
165170
166171 /* This option is a "canonical" form, to which one or more alternatives
167172 * exist. These alternatives are listed in u1.names_alt. */
168−#define OPT_HAS_ALT (1 << 12)
173+#define OPT_HAS_ALT (1 << 13)
169174 /* This option is an alternative form of some other option, whose
170175 * name is stored in u1.name_canon */
171−#define OPT_HAS_CANON (1 << 13)
176+#define OPT_HAS_CANON (1 << 14)
172177
173178 union {
174179 void *dst_ptr;
fftools/ffmpeg_opt.c+59−59
@@ -1457,15 +1457,15 @@ const OptionDef options[] = { · 1456 unmodified lines
14571457 { "recast_media", OPT_TYPE_BOOL, OPT_EXPERT,
14581458 { &recast_media },
14591459 "allow recasting stream type in order to force a decoder of different media type" },
1460− { "c", OPT_TYPE_STRING, OPT_SPEC | OPT_INPUT | OPT_OUTPUT | OPT_HAS_CANON,
1460+ { "c", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_INPUT | OPT_OUTPUT | OPT_HAS_CANON,
14611461 { .off = OFFSET(codec_names) },
14621462 "codec name", "codec",
14631463 .u1.name_canon = "codec", },
1464− { "codec", OPT_TYPE_STRING, OPT_SPEC | OPT_INPUT | OPT_OUTPUT | OPT_EXPERT | OPT_HAS_ALT,
1464+ { "codec", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_INPUT | OPT_OUTPUT | OPT_EXPERT | OPT_HAS_ALT,
14651465 { .off = OFFSET(codec_names) },
14661466 "codec name", "codec",
14671467 .u1.names_alt = alt_codec, },
1468− { "pre", OPT_TYPE_STRING, OPT_SPEC | OPT_OUTPUT | OPT_EXPERT | OPT_HAS_ALT,
1468+ { "pre", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_OUTPUT | OPT_EXPERT | OPT_HAS_ALT,
14691469 { .off = OFFSET(presets) },
14701470 "preset name", "preset",
14711471 .u1.names_alt = alt_pre, },
@@ -1508,7 +1508,7 @@ const OptionDef options[] = { · 36 unmodified lines
15081508 { "itsoffset", OPT_TYPE_TIME, OPT_OFFSET | OPT_EXPERT | OPT_INPUT,
15091509 { .off = OFFSET(input_ts_offset) },
15101510 "set the input ts offset", "time_off" },
1511− { "itsscale", OPT_TYPE_DOUBLE, OPT_SPEC | OPT_EXPERT | OPT_INPUT,
1511+ { "itsscale", OPT_TYPE_DOUBLE, OPT_PERSTREAM | OPT_EXPERT | OPT_INPUT,
15121512 { .off = OFFSET(ts_scale) },
15131513 "set the input ts scale", "scale" },
15141514 { "timestamp", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_PERFILE | OPT_EXPERT | OPT_OUTPUT,
@@ -1582,7 +1582,7 @@ const OptionDef options[] = { · 67 unmodified lines
15821582 { "bitexact", OPT_TYPE_BOOL, OPT_EXPERT | OPT_OFFSET | OPT_OUTPUT | OPT_INPUT,
15831583 { .off = OFFSET(bitexact) },
15841584 "bitexact mode" },
1585− { "apad", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT,
1585+ { "apad", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT,
15861586 { .off = OFFSET(apad) },
15871587 "audio pad", "" },
15881588 { "dts_delta_threshold", OPT_TYPE_FLOAT, OPT_EXPERT,
@@ -1597,21 +1597,21 @@ const OptionDef options[] = { · 8 unmodified lines
15971597 { "abort_on", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_EXPERT,
15981598 { .func_arg = opt_abort_on },
15991599 "abort on the specified condition flags", "flags" },
1600− { "copyinkf", OPT_TYPE_BOOL, OPT_EXPERT | OPT_SPEC | OPT_OUTPUT,
1600+ { "copyinkf", OPT_TYPE_BOOL, OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT,
16011601 { .off = OFFSET(copy_initial_nonkeyframes) },
16021602 "copy initial non-keyframes" },
1603− { "copypriorss", OPT_TYPE_INT, OPT_EXPERT | OPT_SPEC | OPT_OUTPUT,
1603+ { "copypriorss", OPT_TYPE_INT, OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT,
16041604 { .off = OFFSET(copy_prior_start) },
16051605 "copy or discard frames before start time" },
1606− { "frames", OPT_TYPE_INT64, OPT_SPEC | OPT_OUTPUT | OPT_EXPERT | OPT_HAS_ALT,
1606+ { "frames", OPT_TYPE_INT64, OPT_PERSTREAM | OPT_OUTPUT | OPT_EXPERT | OPT_HAS_ALT,
16071607 { .off = OFFSET(max_frames) },
16081608 "set the number of frames to output", "number",
16091609 .u1.names_alt = alt_frames, },
1610− { "tag", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_INPUT | OPT_HAS_ALT,
1610+ { "tag", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT | OPT_INPUT | OPT_HAS_ALT,
16111611 { .off = OFFSET(codec_tags) },
16121612 "force codec tag/fourcc", "fourcc/tag",
16131613 .u1.names_alt = alt_tag, },
1614− { "q", OPT_TYPE_DOUBLE, OPT_EXPERT | OPT_SPEC | OPT_OUTPUT | OPT_HAS_CANON,
1614+ { "q", OPT_TYPE_DOUBLE, OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT | OPT_HAS_CANON,
16151615 { .off = OFFSET(qscale) },
16161616 "use fixed quality scale (VBR)", "q",
16171617 .u1.name_canon = "qscale", },
@@ -1622,7 +1622,7 @@ const OptionDef options[] = { · 4 unmodified lines
16221622 { "profile", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_EXPERT | OPT_PERFILE | OPT_OUTPUT,
16231623 { .func_arg = opt_profile },
16241624 "set profile", "profile" },
1625− { "filter", OPT_TYPE_STRING, OPT_SPEC | OPT_OUTPUT | OPT_HAS_ALT,
1625+ { "filter", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_OUTPUT | OPT_HAS_ALT,
16261626 { .off = OFFSET(filters) },
16271627 "set stream filtergraph", "filter_graph",
16281628 .u1.names_alt = alt_filter, },
@@ -1630,11 +1630,11 @@ const OptionDef options[] = { · 1 unmodified line
16301630 { .func_arg = opt_filter_threads },
16311631 "number of non-complex filter threads" },
16321632 #if FFMPEG_OPT_FILTER_SCRIPT
1633− { "filter_script", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT,
1633+ { "filter_script", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT,
16341634 { .off = OFFSET(filter_scripts) },
16351635 "deprecated, use -/filter", "filename" },
16361636 #endif
1637− { "reinit_filter", OPT_TYPE_INT, OPT_SPEC | OPT_INPUT | OPT_EXPERT,
1637+ { "reinit_filter", OPT_TYPE_INT, OPT_PERSTREAM | OPT_INPUT | OPT_EXPERT,
16381638 { .off = OFFSET(reinit_filters) },
16391639 "reinit filtergraph on input parameter changes", "" },
16401640 { "filter_complex", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_EXPERT,
@@ -1674,10 +1674,10 @@ const OptionDef options[] = { · 33 unmodified lines
16741674 { "max_error_rate", OPT_TYPE_FLOAT, OPT_EXPERT,
16751675 { &max_error_rate },
16761676 "ratio of decoding errors (0.0: no errors, 1.0: 100% errors) above which ffmpeg returns an error instead of success.", "maximum error rate" },
1677− { "discard", OPT_TYPE_STRING, OPT_SPEC | OPT_INPUT | OPT_EXPERT,
1677+ { "discard", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_INPUT | OPT_EXPERT,
16781678 { .off = OFFSET(discard) },
16791679 "discard", "" },
1680− { "disposition", OPT_TYPE_STRING, OPT_SPEC | OPT_OUTPUT | OPT_EXPERT,
1680+ { "disposition", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_OUTPUT | OPT_EXPERT,
16811681 { .off = OFFSET(disposition) },
16821682 "disposition", "" },
16831683 { "thread_queue_size", OPT_TYPE_INT, OPT_OFFSET | OPT_EXPERT | OPT_INPUT | OPT_OUTPUT,
@@ -1686,26 +1686,26 @@ const OptionDef options[] = { · 2 unmodified lines
16861686 { "find_stream_info", OPT_TYPE_BOOL, OPT_INPUT | OPT_EXPERT | OPT_OFFSET,
16871687 { .off = OFFSET(find_stream_info) },
16881688 "read and decode the streams to fill missing information with heuristics" },
1689− { "bits_per_raw_sample", OPT_TYPE_INT, OPT_EXPERT | OPT_SPEC | OPT_OUTPUT,
1689+ { "bits_per_raw_sample", OPT_TYPE_INT, OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT,
16901690 { .off = OFFSET(bits_per_raw_sample) },
16911691 "set the number of bits per raw sample", "number" },
16921692
1693− { "stats_enc_pre", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT,
1693+ { "stats_enc_pre", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT,
16941694 { .off = OFFSET(enc_stats_pre) },
16951695 "write encoding stats before encoding" },
1696− { "stats_enc_post", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT,
1696+ { "stats_enc_post", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT,
16971697 { .off = OFFSET(enc_stats_post) },
16981698 "write encoding stats after encoding" },
1699− { "stats_mux_pre", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT,
1699+ { "stats_mux_pre", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT,
17001700 { .off = OFFSET(mux_stats) },
17011701 "write packets stats before muxing" },
1702− { "stats_enc_pre_fmt", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT,
1702+ { "stats_enc_pre_fmt", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT,
17031703 { .off = OFFSET(enc_stats_pre_fmt) },
17041704 "format of the stats written with -stats_enc_pre" },
1705− { "stats_enc_post_fmt", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT,
1705+ { "stats_enc_post_fmt", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT,
17061706 { .off = OFFSET(enc_stats_post_fmt) },
17071707 "format of the stats written with -stats_enc_post" },
1708− { "stats_mux_pre_fmt", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT,
1708+ { "stats_mux_pre_fmt", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT,
17091709 { .off = OFFSET(mux_stats_fmt) },
17101710 "format of the stats written with -stats_mux_pre" },
17111711
@@ -1714,37 +1714,37 @@ const OptionDef options[] = { · 2 unmodified lines
17141714 { .func_arg = opt_video_frames },
17151715 "set the number of video frames to output", "number",
17161716 .u1.name_canon = "frames", },
1717− { "r", OPT_TYPE_STRING, OPT_VIDEO | OPT_SPEC | OPT_INPUT | OPT_OUTPUT,
1717+ { "r", OPT_TYPE_STRING, OPT_VIDEO | OPT_PERSTREAM | OPT_INPUT | OPT_OUTPUT,
17181718 { .off = OFFSET(frame_rates) },
17191719 "set frame rate (Hz value, fraction or abbreviation)", "rate" },
1720− { "fpsmax", OPT_TYPE_STRING, OPT_VIDEO | OPT_SPEC | OPT_OUTPUT | OPT_EXPERT,
1720+ { "fpsmax", OPT_TYPE_STRING, OPT_VIDEO | OPT_PERSTREAM | OPT_OUTPUT | OPT_EXPERT,
17211721 { .off = OFFSET(max_frame_rates) },
17221722 "set max frame rate (Hz value, fraction or abbreviation)", "rate" },
1723− { "s", OPT_TYPE_STRING, OPT_VIDEO | OPT_SUBTITLE | OPT_SPEC | OPT_INPUT | OPT_OUTPUT,
1723+ { "s", OPT_TYPE_STRING, OPT_VIDEO | OPT_SUBTITLE | OPT_PERSTREAM | OPT_INPUT | OPT_OUTPUT,
17241724 { .off = OFFSET(frame_sizes) },
17251725 "set frame size (WxH or abbreviation)", "size" },
1726− { "aspect", OPT_TYPE_STRING, OPT_VIDEO | OPT_SPEC | OPT_OUTPUT,
1726+ { "aspect", OPT_TYPE_STRING, OPT_VIDEO | OPT_PERSTREAM | OPT_OUTPUT,
17271727 { .off = OFFSET(frame_aspect_ratios) },
17281728 "set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)", "aspect" },
1729− { "pix_fmt", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_INPUT | OPT_OUTPUT,
1729+ { "pix_fmt", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_INPUT | OPT_OUTPUT,
17301730 { .off = OFFSET(frame_pix_fmts) },
17311731 "set pixel format", "format" },
1732− { "display_rotation", OPT_TYPE_DOUBLE, OPT_VIDEO | OPT_SPEC | OPT_INPUT | OPT_EXPERT,
1732+ { "display_rotation", OPT_TYPE_DOUBLE, OPT_VIDEO | OPT_PERSTREAM | OPT_INPUT | OPT_EXPERT,
17331733 { .off = OFFSET(display_rotations) },
17341734 "set pure counter-clockwise rotation in degrees for stream(s)",
17351735 "angle" },
1736− { "display_hflip", OPT_TYPE_BOOL, OPT_VIDEO | OPT_SPEC | OPT_INPUT | OPT_EXPERT,
1736+ { "display_hflip", OPT_TYPE_BOOL, OPT_VIDEO | OPT_PERSTREAM | OPT_INPUT | OPT_EXPERT,
17371737 { .off = OFFSET(display_hflips) },
17381738 "set display horizontal flip for stream(s) "
17391739 "(overrides any display rotation if it is not set)"},
1740− { "display_vflip", OPT_TYPE_BOOL, OPT_VIDEO | OPT_SPEC | OPT_INPUT | OPT_EXPERT,
1740+ { "display_vflip", OPT_TYPE_BOOL, OPT_VIDEO | OPT_PERSTREAM | OPT_INPUT | OPT_EXPERT,
17411741 { .off = OFFSET(display_vflips) },
17421742 "set display vertical flip for stream(s) "
17431743 "(overrides any display rotation if it is not set)"},
17441744 { "vn", OPT_TYPE_BOOL, OPT_VIDEO | OPT_OFFSET | OPT_INPUT | OPT_OUTPUT,
17451745 { .off = OFFSET(video_disable) },
17461746 "disable video" },
1747− { "rc_override", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT,
1747+ { "rc_override", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT,
17481748 { .off = OFFSET(rc_overrides) },
17491749 "rate control override for specific intervals", "override" },
17501750 { "vcodec", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_PERFILE | OPT_INPUT | OPT_OUTPUT | OPT_HAS_CANON,
@@ -1754,10 +1754,10 @@ const OptionDef options[] = { · 3 unmodified lines
17541754 { "timecode", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_PERFILE | OPT_OUTPUT | OPT_EXPERT,
17551755 { .func_arg = opt_timecode },
17561756 "set initial TimeCode value.", "hh:mm:ss[:;.]ff" },
1757− { "pass", OPT_TYPE_INT, OPT_VIDEO | OPT_SPEC | OPT_OUTPUT | OPT_EXPERT,
1757+ { "pass", OPT_TYPE_INT, OPT_VIDEO | OPT_PERSTREAM | OPT_OUTPUT | OPT_EXPERT,
17581758 { .off = OFFSET(pass) },
17591759 "select the pass number (1 to 3)", "n" },
1760− { "passlogfile", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT,
1760+ { "passlogfile", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT,
17611761 { .off = OFFSET(passlogfiles) },
17621762 "select two pass log file name prefix", "prefix" },
17631763 { "vstats", OPT_TYPE_FUNC, OPT_VIDEO | OPT_EXPERT,
@@ -1773,53 +1773,53 @@ const OptionDef options[] = { · 9 unmodified lines
17731773 { .func_arg = opt_video_filters },
17741774 "set video filters", "filter_graph",
17751775 .u1.name_canon = "filter", },
1776− { "intra_matrix", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT,
1776+ { "intra_matrix", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT,
17771777 { .off = OFFSET(intra_matrices) },
17781778 "specify intra matrix coeffs", "matrix" },
1779− { "inter_matrix", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT,
1779+ { "inter_matrix", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT,
17801780 { .off = OFFSET(inter_matrices) },
17811781 "specify inter matrix coeffs", "matrix" },
1782− { "chroma_intra_matrix", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT,
1782+ { "chroma_intra_matrix", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT,
17831783 { .off = OFFSET(chroma_intra_matrices) },
17841784 "specify intra matrix coeffs", "matrix" },
17851785 { "vtag", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_EXPERT | OPT_PERFILE | OPT_INPUT | OPT_OUTPUT | OPT_HAS_CANON,
17861786 { .func_arg = opt_old2new },
17871787 "force video tag/fourcc", "fourcc/tag",
17881788 .u1.name_canon = "tag", },
1789− { "fps_mode", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT,
1789+ { "fps_mode", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT,
17901790 { .off = OFFSET(fps_mode) },
17911791 "set framerate mode for matching video streams; overrides vsync" },
1792− { "force_fps", OPT_TYPE_BOOL, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT,
1792+ { "force_fps", OPT_TYPE_BOOL, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT,
17931793 { .off = OFFSET(force_fps) },
17941794 "force the selected framerate, disable the best supported framerate selection" },
17951795 { "streamid", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_EXPERT | OPT_PERFILE | OPT_OUTPUT,
17961796 { .func_arg = opt_streamid },
17971797 "set the value of an outfile streamid", "streamIndex:value" },
1798− { "force_key_frames", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT,
1798+ { "force_key_frames", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT,
17991799 { .off = OFFSET(forced_key_frames) },
18001800 "force key frames at specified timestamps", "timestamps" },
18011801 { "b", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_PERFILE | OPT_OUTPUT,
18021802 { .func_arg = opt_bitrate },
18031803 "video bitrate (please use -b:v)", "bitrate" },
1804− { "hwaccel", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_INPUT,
1804+ { "hwaccel", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_INPUT,
18051805 { .off = OFFSET(hwaccels) },
18061806 "use HW accelerated decoding", "hwaccel name" },
1807− { "hwaccel_device", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_INPUT,
1807+ { "hwaccel_device", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_INPUT,
18081808 { .off = OFFSET(hwaccel_devices) },
18091809 "select a device for HW acceleration", "devicename" },
1810− { "hwaccel_output_format", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_INPUT,
1810+ { "hwaccel_output_format", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_INPUT,
18111811 { .off = OFFSET(hwaccel_output_formats) },
18121812 "select output format used with HW accelerated decoding", "format" },
18131813 { "hwaccels", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT,
18141814 { .func_arg = show_hwaccels },
18151815 "show available HW acceleration methods" },
1816− { "autorotate", OPT_TYPE_BOOL, OPT_SPEC | OPT_EXPERT | OPT_INPUT,
1816+ { "autorotate", OPT_TYPE_BOOL, OPT_PERSTREAM | OPT_EXPERT | OPT_INPUT,
18171817 { .off = OFFSET(autorotate) },
18181818 "automatically insert correct rotate filters" },
1819− { "autoscale", OPT_TYPE_BOOL, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT,
1819+ { "autoscale", OPT_TYPE_BOOL, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT,
18201820 { .off = OFFSET(autoscale) },
18211821 "automatically insert a scale filter at the end of the filter graph" },
1822− { "fix_sub_duration_heartbeat", OPT_TYPE_BOOL, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT,
1822+ { "fix_sub_duration_heartbeat", OPT_TYPE_BOOL, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT,
18231823 { .off = OFFSET(fix_sub_duration_heartbeat) },
18241824 "set this video output stream to be a heartbeat stream for "
18251825 "fix_sub_duration, according to which subtitles should be split at "
@@ -1833,10 +1833,10 @@ const OptionDef options[] = { · 7 unmodified lines
18331833 { "aq", OPT_TYPE_FUNC, OPT_AUDIO | OPT_FUNC_ARG | OPT_PERFILE | OPT_OUTPUT,
18341834 { .func_arg = opt_audio_qscale },
18351835 "set audio quality (codec-specific)", "quality", },
1836− { "ar", OPT_TYPE_INT, OPT_AUDIO | OPT_SPEC | OPT_INPUT | OPT_OUTPUT,
1836+ { "ar", OPT_TYPE_INT, OPT_AUDIO | OPT_PERSTREAM | OPT_INPUT | OPT_OUTPUT,
18371837 { .off = OFFSET(audio_sample_rate) },
18381838 "set audio sampling rate (in Hz)", "rate" },
1839− { "ac", OPT_TYPE_INT, OPT_AUDIO | OPT_SPEC | OPT_INPUT | OPT_OUTPUT,
1839+ { "ac", OPT_TYPE_INT, OPT_AUDIO | OPT_PERSTREAM | OPT_INPUT | OPT_OUTPUT,
18401840 { .off = OFFSET(audio_channels) },
18411841 "set number of audio channels", "channels" },
18421842 { "an", OPT_TYPE_BOOL, OPT_AUDIO | OPT_OFFSET | OPT_INPUT | OPT_OUTPUT,
@@ -1853,14 +1853,14 @@ const OptionDef options[] = { · 10 unmodified lines
18531853 { .func_arg = opt_old2new },
18541854 "force audio tag/fourcc", "fourcc/tag",
18551855 .u1.name_canon = "tag", },
1856− { "sample_fmt", OPT_TYPE_STRING, OPT_AUDIO | OPT_EXPERT | OPT_SPEC | OPT_INPUT | OPT_OUTPUT,
1856+ { "sample_fmt", OPT_TYPE_STRING, OPT_AUDIO | OPT_EXPERT | OPT_PERSTREAM | OPT_INPUT | OPT_OUTPUT,
18571857 { .off = OFFSET(sample_fmts) },
18581858 "set sample format", "format" },
1859− { "channel_layout", OPT_TYPE_STRING, OPT_AUDIO | OPT_EXPERT | OPT_SPEC | OPT_INPUT | OPT_OUTPUT | OPT_HAS_ALT,
1859+ { "channel_layout", OPT_TYPE_STRING, OPT_AUDIO | OPT_EXPERT | OPT_PERSTREAM | OPT_INPUT | OPT_OUTPUT | OPT_HAS_ALT,
18601860 { .off = OFFSET(audio_ch_layouts) },
18611861 "set channel layout", "layout",
18621862 .u1.names_alt = alt_channel_layout, },
1863− { "ch_layout", OPT_TYPE_STRING, OPT_AUDIO | OPT_EXPERT | OPT_SPEC | OPT_INPUT | OPT_OUTPUT | OPT_HAS_CANON,
1863+ { "ch_layout", OPT_TYPE_STRING, OPT_AUDIO | OPT_EXPERT | OPT_PERSTREAM | OPT_INPUT | OPT_OUTPUT | OPT_HAS_CANON,
18641864 { .off = OFFSET(audio_ch_layouts) },
18651865 "set channel layout", "layout",
18661866 .u1.name_canon = "channel_layout", },
@@ -1868,7 +1868,7 @@ const OptionDef options[] = { · 1 unmodified line
18681868 { .func_arg = opt_audio_filters },
18691869 "set audio filters", "filter_graph",
18701870 .u1.name_canon = "filter", },
1871− { "guess_layout_max", OPT_TYPE_INT, OPT_AUDIO | OPT_SPEC | OPT_EXPERT | OPT_INPUT,
1871+ { "guess_layout_max", OPT_TYPE_INT, OPT_AUDIO | OPT_PERSTREAM | OPT_EXPERT | OPT_INPUT,
18721872 { .off = OFFSET(guess_layout_max) },
18731873 "set the maximum number of channels to try to guess the channel layout" },
18741874
@@ -1884,10 +1884,10 @@ const OptionDef options[] = { · 9 unmodified lines
18841884 { .func_arg = opt_old2new }
18851885 , "force subtitle tag/fourcc", "fourcc/tag",
18861886 .u1.name_canon = "tag" },
1887− { "fix_sub_duration", OPT_TYPE_BOOL, OPT_EXPERT | OPT_SUBTITLE | OPT_SPEC | OPT_INPUT,
1887+ { "fix_sub_duration", OPT_TYPE_BOOL, OPT_EXPERT | OPT_SUBTITLE | OPT_PERSTREAM | OPT_INPUT,
18881888 { .off = OFFSET(fix_sub_duration) },
18891889 "fix subtitles duration" },
1890− { "canvas_size", OPT_TYPE_STRING, OPT_SUBTITLE | OPT_SPEC | OPT_INPUT | OPT_EXPERT,
1890+ { "canvas_size", OPT_TYPE_STRING, OPT_SUBTITLE | OPT_PERSTREAM | OPT_INPUT | OPT_EXPERT,
18911891 { .off = OFFSET(canvas_sizes) },
18921892 "set canvas size (WxH or abbreviation)", "size" },
18931893
@@ -1902,17 +1902,17 @@ const OptionDef options[] = { · 8 unmodified lines
19021902 { .func_arg = opt_sdp_file },
19031903 "specify a file in which to print sdp information", "file" },
19041904
1905− { "time_base", OPT_TYPE_STRING, OPT_EXPERT | OPT_SPEC | OPT_OUTPUT,
1905+ { "time_base", OPT_TYPE_STRING, OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT,
19061906 { .off = OFFSET(time_bases) },
19071907 "set the desired time base hint for output stream (1:24, 1:48000 or 0.04166, 2.0833e-5)", "ratio" },
1908− { "enc_time_base", OPT_TYPE_STRING, OPT_EXPERT | OPT_SPEC | OPT_OUTPUT,
1908+ { "enc_time_base", OPT_TYPE_STRING, OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT,
19091909 { .off = OFFSET(enc_time_bases) },
19101910 "set the desired time base for the encoder (1:24, 1:48000 or 0.04166, 2.0833e-5). "
19111911 "two special values are defined - "
19121912 "0 = use frame rate (video) or sample rate (audio),"
19131913 "-1 = match source time base", "ratio" },
19141914
1915− { "bsf", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_INPUT,
1915+ { "bsf", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT | OPT_INPUT,
19161916 { .off = OFFSET(bitstream_filters) },
19171917 "A comma-separated list of bitstream filters", "bitstream_filters", },
19181918
@@ -1933,10 +1933,10 @@ const OptionDef options[] = { · 14 unmodified lines
19331933 "set options from indicated preset file", "filename",
19341934 .u1.name_canon = "pre", },
19351935
1936− { "max_muxing_queue_size", OPT_TYPE_INT, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT,
1936+ { "max_muxing_queue_size", OPT_TYPE_INT, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT,
19371937 { .off = OFFSET(max_muxing_queue_size) },
19381938 "maximum number of packets that can be buffered while waiting for all streams to initialize", "packets" },
1939− { "muxing_queue_data_threshold", OPT_TYPE_INT, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT,
1939+ { "muxing_queue_data_threshold", OPT_TYPE_INT, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT,
19401940 { .off = OFFSET(muxing_queue_data_threshold) },
19411941 "set the threshold after which max_muxing_queue_size is taken into account", "bytes" },
19421942
@@ -1984,7 +1984,7 @@ const OptionDef options[] = { · 41 unmodified lines
19841984 "calculate PSNR of compressed frames (deprecated, use -flags +psnr)" },
19851985 #endif
19861986 #if FFMPEG_OPT_TOP
1987− { "top", OPT_TYPE_INT, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_INPUT | OPT_OUTPUT,
1987+ { "top", OPT_TYPE_INT, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_INPUT | OPT_OUTPUT,
19881988 { .off = OFFSET(top_field_first) },
19891989 "deprecated, use the setfield video filter", "" },
19901990 #endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t