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
158 Always use as OPT_SPEC in option definitions. */158 Always use as OPT_SPEC in option definitions. */
159#define OPT_FLAG_SPEC (1 << 9)159#define OPT_FLAG_SPEC (1 << 9)
160#define OPT_SPEC (OPT_FLAG_SPEC | OPT_OFFSET)160#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
161/* ffmpeg-only - specifies whether an OPT_PERFILE option applies to input,166/* ffmpeg-only - specifies whether an OPT_PERFILE option applies to input,
162 * output, or both. */167 * output, or both. */
163#define OPT_INPUT (1 << 10)168#define OPT_INPUT (1 << 11)
164#define OPT_OUTPUT (1 << 11)169#define OPT_OUTPUT (1 << 12)
165 170
166/* This option is a "canonical" form, to which one or more alternatives171/* This option is a "canonical" form, to which one or more alternatives
167 * exist. These alternatives are listed in u1.names_alt. */172 * exist. These alternatives are listed in u1.names_alt. */
168#define OPT_HAS_ALT (1 << 12)173#define OPT_HAS_ALT (1 << 13)
169/* This option is an alternative form of some other option, whose174/* This option is an alternative form of some other option, whose
170 * name is stored in u1.name_canon */175 * name is stored in u1.name_canon */
171#define OPT_HAS_CANON (1 << 13)176#define OPT_HAS_CANON (1 << 14)
172 177
173 union {178 union {
174 void *dst_ptr;179 void *dst_ptr;
fftools/ffmpeg_opt.c+59−59
@@ -1457,15 +1457,15 @@ const OptionDef options[] = { · 1456 unmodified lines
1457 { "recast_media", OPT_TYPE_BOOL, OPT_EXPERT,1457 { "recast_media", OPT_TYPE_BOOL, OPT_EXPERT,
1458 { &recast_media },1458 { &recast_media },
1459 "allow recasting stream type in order to force a decoder of different media type" },1459 "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,
1461 { .off = OFFSET(codec_names) },1461 { .off = OFFSET(codec_names) },
1462 "codec name", "codec",1462 "codec name", "codec",
1463 .u1.name_canon = "codec", },1463 .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,
1465 { .off = OFFSET(codec_names) },1465 { .off = OFFSET(codec_names) },
1466 "codec name", "codec",1466 "codec name", "codec",
1467 .u1.names_alt = alt_codec, },1467 .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,
1469 { .off = OFFSET(presets) },1469 { .off = OFFSET(presets) },
1470 "preset name", "preset",1470 "preset name", "preset",
1471 .u1.names_alt = alt_pre, },1471 .u1.names_alt = alt_pre, },
@@ -1508,7 +1508,7 @@ const OptionDef options[] = { · 36 unmodified lines
1508 { "itsoffset", OPT_TYPE_TIME, OPT_OFFSET | OPT_EXPERT | OPT_INPUT,1508 { "itsoffset", OPT_TYPE_TIME, OPT_OFFSET | OPT_EXPERT | OPT_INPUT,
1509 { .off = OFFSET(input_ts_offset) },1509 { .off = OFFSET(input_ts_offset) },
1510 "set the input ts offset", "time_off" },1510 "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,
1512 { .off = OFFSET(ts_scale) },1512 { .off = OFFSET(ts_scale) },
1513 "set the input ts scale", "scale" },1513 "set the input ts scale", "scale" },
1514 { "timestamp", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_PERFILE | OPT_EXPERT | OPT_OUTPUT,1514 { "timestamp", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_PERFILE | OPT_EXPERT | OPT_OUTPUT,
@@ -1582,7 +1582,7 @@ const OptionDef options[] = { · 67 unmodified lines
1582 { "bitexact", OPT_TYPE_BOOL, OPT_EXPERT | OPT_OFFSET | OPT_OUTPUT | OPT_INPUT,1582 { "bitexact", OPT_TYPE_BOOL, OPT_EXPERT | OPT_OFFSET | OPT_OUTPUT | OPT_INPUT,
1583 { .off = OFFSET(bitexact) },1583 { .off = OFFSET(bitexact) },
1584 "bitexact mode" },1584 "bitexact mode" },
1585 { "apad", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT,1585 { "apad", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT,
1586 { .off = OFFSET(apad) },1586 { .off = OFFSET(apad) },
1587 "audio pad", "" },1587 "audio pad", "" },
1588 { "dts_delta_threshold", OPT_TYPE_FLOAT, OPT_EXPERT,1588 { "dts_delta_threshold", OPT_TYPE_FLOAT, OPT_EXPERT,
@@ -1597,21 +1597,21 @@ const OptionDef options[] = { · 8 unmodified lines
1597 { "abort_on", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_EXPERT,1597 { "abort_on", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_EXPERT,
1598 { .func_arg = opt_abort_on },1598 { .func_arg = opt_abort_on },
1599 "abort on the specified condition flags", "flags" },1599 "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,
1601 { .off = OFFSET(copy_initial_nonkeyframes) },1601 { .off = OFFSET(copy_initial_nonkeyframes) },
1602 "copy initial non-keyframes" },1602 "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,
1604 { .off = OFFSET(copy_prior_start) },1604 { .off = OFFSET(copy_prior_start) },
1605 "copy or discard frames before start time" },1605 "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,
1607 { .off = OFFSET(max_frames) },1607 { .off = OFFSET(max_frames) },
1608 "set the number of frames to output", "number",1608 "set the number of frames to output", "number",
1609 .u1.names_alt = alt_frames, },1609 .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,
1611 { .off = OFFSET(codec_tags) },1611 { .off = OFFSET(codec_tags) },
1612 "force codec tag/fourcc", "fourcc/tag",1612 "force codec tag/fourcc", "fourcc/tag",
1613 .u1.names_alt = alt_tag, },1613 .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,
1615 { .off = OFFSET(qscale) },1615 { .off = OFFSET(qscale) },
1616 "use fixed quality scale (VBR)", "q",1616 "use fixed quality scale (VBR)", "q",
1617 .u1.name_canon = "qscale", },1617 .u1.name_canon = "qscale", },
@@ -1622,7 +1622,7 @@ const OptionDef options[] = { · 4 unmodified lines
1622 { "profile", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_EXPERT | OPT_PERFILE | OPT_OUTPUT,1622 { "profile", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_EXPERT | OPT_PERFILE | OPT_OUTPUT,
1623 { .func_arg = opt_profile },1623 { .func_arg = opt_profile },
1624 "set profile", "profile" },1624 "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,
1626 { .off = OFFSET(filters) },1626 { .off = OFFSET(filters) },
1627 "set stream filtergraph", "filter_graph",1627 "set stream filtergraph", "filter_graph",
1628 .u1.names_alt = alt_filter, },1628 .u1.names_alt = alt_filter, },
@@ -1630,11 +1630,11 @@ const OptionDef options[] = { · 1 unmodified line
1630 { .func_arg = opt_filter_threads },1630 { .func_arg = opt_filter_threads },
1631 "number of non-complex filter threads" },1631 "number of non-complex filter threads" },
1632#if FFMPEG_OPT_FILTER_SCRIPT1632#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,
1634 { .off = OFFSET(filter_scripts) },1634 { .off = OFFSET(filter_scripts) },
1635 "deprecated, use -/filter", "filename" },1635 "deprecated, use -/filter", "filename" },
1636#endif1636#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,
1638 { .off = OFFSET(reinit_filters) },1638 { .off = OFFSET(reinit_filters) },
1639 "reinit filtergraph on input parameter changes", "" },1639 "reinit filtergraph on input parameter changes", "" },
1640 { "filter_complex", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_EXPERT,1640 { "filter_complex", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_EXPERT,
@@ -1674,10 +1674,10 @@ const OptionDef options[] = { · 33 unmodified lines
1674 { "max_error_rate", OPT_TYPE_FLOAT, OPT_EXPERT,1674 { "max_error_rate", OPT_TYPE_FLOAT, OPT_EXPERT,
1675 { &max_error_rate },1675 { &max_error_rate },
1676 "ratio of decoding errors (0.0: no errors, 1.0: 100% errors) above which ffmpeg returns an error instead of success.", "maximum error rate" },1676 "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,
1678 { .off = OFFSET(discard) },1678 { .off = OFFSET(discard) },
1679 "discard", "" },1679 "discard", "" },
1680 { "disposition", OPT_TYPE_STRING, OPT_SPEC | OPT_OUTPUT | OPT_EXPERT,1680 { "disposition", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_OUTPUT | OPT_EXPERT,
1681 { .off = OFFSET(disposition) },1681 { .off = OFFSET(disposition) },
1682 "disposition", "" },1682 "disposition", "" },
1683 { "thread_queue_size", OPT_TYPE_INT, OPT_OFFSET | OPT_EXPERT | OPT_INPUT | OPT_OUTPUT,1683 { "thread_queue_size", OPT_TYPE_INT, OPT_OFFSET | OPT_EXPERT | OPT_INPUT | OPT_OUTPUT,
@@ -1686,26 +1686,26 @@ const OptionDef options[] = { · 2 unmodified lines
1686 { "find_stream_info", OPT_TYPE_BOOL, OPT_INPUT | OPT_EXPERT | OPT_OFFSET,1686 { "find_stream_info", OPT_TYPE_BOOL, OPT_INPUT | OPT_EXPERT | OPT_OFFSET,
1687 { .off = OFFSET(find_stream_info) },1687 { .off = OFFSET(find_stream_info) },
1688 "read and decode the streams to fill missing information with heuristics" },1688 "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,
1690 { .off = OFFSET(bits_per_raw_sample) },1690 { .off = OFFSET(bits_per_raw_sample) },
1691 "set the number of bits per raw sample", "number" },1691 "set the number of bits per raw sample", "number" },
1692 1692
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,
1694 { .off = OFFSET(enc_stats_pre) },1694 { .off = OFFSET(enc_stats_pre) },
1695 "write encoding stats before encoding" },1695 "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,
1697 { .off = OFFSET(enc_stats_post) },1697 { .off = OFFSET(enc_stats_post) },
1698 "write encoding stats after encoding" },1698 "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,
1700 { .off = OFFSET(mux_stats) },1700 { .off = OFFSET(mux_stats) },
1701 "write packets stats before muxing" },1701 "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,
1703 { .off = OFFSET(enc_stats_pre_fmt) },1703 { .off = OFFSET(enc_stats_pre_fmt) },
1704 "format of the stats written with -stats_enc_pre" },1704 "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,
1706 { .off = OFFSET(enc_stats_post_fmt) },1706 { .off = OFFSET(enc_stats_post_fmt) },
1707 "format of the stats written with -stats_enc_post" },1707 "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,
1709 { .off = OFFSET(mux_stats_fmt) },1709 { .off = OFFSET(mux_stats_fmt) },
1710 "format of the stats written with -stats_mux_pre" },1710 "format of the stats written with -stats_mux_pre" },
1711 1711
@@ -1714,37 +1714,37 @@ const OptionDef options[] = { · 2 unmodified lines
1714 { .func_arg = opt_video_frames },1714 { .func_arg = opt_video_frames },
1715 "set the number of video frames to output", "number",1715 "set the number of video frames to output", "number",
1716 .u1.name_canon = "frames", },1716 .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,
1718 { .off = OFFSET(frame_rates) },1718 { .off = OFFSET(frame_rates) },
1719 "set frame rate (Hz value, fraction or abbreviation)", "rate" },1719 "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,
1721 { .off = OFFSET(max_frame_rates) },1721 { .off = OFFSET(max_frame_rates) },
1722 "set max frame rate (Hz value, fraction or abbreviation)", "rate" },1722 "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,
1724 { .off = OFFSET(frame_sizes) },1724 { .off = OFFSET(frame_sizes) },
1725 "set frame size (WxH or abbreviation)", "size" },1725 "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,
1727 { .off = OFFSET(frame_aspect_ratios) },1727 { .off = OFFSET(frame_aspect_ratios) },
1728 "set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)", "aspect" },1728 "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,
1730 { .off = OFFSET(frame_pix_fmts) },1730 { .off = OFFSET(frame_pix_fmts) },
1731 "set pixel format", "format" },1731 "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,
1733 { .off = OFFSET(display_rotations) },1733 { .off = OFFSET(display_rotations) },
1734 "set pure counter-clockwise rotation in degrees for stream(s)",1734 "set pure counter-clockwise rotation in degrees for stream(s)",
1735 "angle" },1735 "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,
1737 { .off = OFFSET(display_hflips) },1737 { .off = OFFSET(display_hflips) },
1738 "set display horizontal flip for stream(s) "1738 "set display horizontal flip for stream(s) "
1739 "(overrides any display rotation if it is not set)"},1739 "(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,
1741 { .off = OFFSET(display_vflips) },1741 { .off = OFFSET(display_vflips) },
1742 "set display vertical flip for stream(s) "1742 "set display vertical flip for stream(s) "
1743 "(overrides any display rotation if it is not set)"},1743 "(overrides any display rotation if it is not set)"},
1744 { "vn", OPT_TYPE_BOOL, OPT_VIDEO | OPT_OFFSET | OPT_INPUT | OPT_OUTPUT,1744 { "vn", OPT_TYPE_BOOL, OPT_VIDEO | OPT_OFFSET | OPT_INPUT | OPT_OUTPUT,
1745 { .off = OFFSET(video_disable) },1745 { .off = OFFSET(video_disable) },
1746 "disable video" },1746 "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,
1748 { .off = OFFSET(rc_overrides) },1748 { .off = OFFSET(rc_overrides) },
1749 "rate control override for specific intervals", "override" },1749 "rate control override for specific intervals", "override" },
1750 { "vcodec", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_PERFILE | OPT_INPUT | OPT_OUTPUT | OPT_HAS_CANON,1750 { "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
1754 { "timecode", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_PERFILE | OPT_OUTPUT | OPT_EXPERT,1754 { "timecode", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_PERFILE | OPT_OUTPUT | OPT_EXPERT,
1755 { .func_arg = opt_timecode },1755 { .func_arg = opt_timecode },
1756 "set initial TimeCode value.", "hh:mm:ss[:;.]ff" },1756 "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,
1758 { .off = OFFSET(pass) },1758 { .off = OFFSET(pass) },
1759 "select the pass number (1 to 3)", "n" },1759 "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,
1761 { .off = OFFSET(passlogfiles) },1761 { .off = OFFSET(passlogfiles) },
1762 "select two pass log file name prefix", "prefix" },1762 "select two pass log file name prefix", "prefix" },
1763 { "vstats", OPT_TYPE_FUNC, OPT_VIDEO | OPT_EXPERT,1763 { "vstats", OPT_TYPE_FUNC, OPT_VIDEO | OPT_EXPERT,
@@ -1773,53 +1773,53 @@ const OptionDef options[] = { · 9 unmodified lines
1773 { .func_arg = opt_video_filters },1773 { .func_arg = opt_video_filters },
1774 "set video filters", "filter_graph",1774 "set video filters", "filter_graph",
1775 .u1.name_canon = "filter", },1775 .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,
1777 { .off = OFFSET(intra_matrices) },1777 { .off = OFFSET(intra_matrices) },
1778 "specify intra matrix coeffs", "matrix" },1778 "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,
1780 { .off = OFFSET(inter_matrices) },1780 { .off = OFFSET(inter_matrices) },
1781 "specify inter matrix coeffs", "matrix" },1781 "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,
1783 { .off = OFFSET(chroma_intra_matrices) },1783 { .off = OFFSET(chroma_intra_matrices) },
1784 "specify intra matrix coeffs", "matrix" },1784 "specify intra matrix coeffs", "matrix" },
1785 { "vtag", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_EXPERT | OPT_PERFILE | OPT_INPUT | OPT_OUTPUT | OPT_HAS_CANON,1785 { "vtag", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_EXPERT | OPT_PERFILE | OPT_INPUT | OPT_OUTPUT | OPT_HAS_CANON,
1786 { .func_arg = opt_old2new },1786 { .func_arg = opt_old2new },
1787 "force video tag/fourcc", "fourcc/tag",1787 "force video tag/fourcc", "fourcc/tag",
1788 .u1.name_canon = "tag", },1788 .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,
1790 { .off = OFFSET(fps_mode) },1790 { .off = OFFSET(fps_mode) },
1791 "set framerate mode for matching video streams; overrides vsync" },1791 "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,
1793 { .off = OFFSET(force_fps) },1793 { .off = OFFSET(force_fps) },
1794 "force the selected framerate, disable the best supported framerate selection" },1794 "force the selected framerate, disable the best supported framerate selection" },
1795 { "streamid", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_EXPERT | OPT_PERFILE | OPT_OUTPUT,1795 { "streamid", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_EXPERT | OPT_PERFILE | OPT_OUTPUT,
1796 { .func_arg = opt_streamid },1796 { .func_arg = opt_streamid },
1797 "set the value of an outfile streamid", "streamIndex:value" },1797 "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,
1799 { .off = OFFSET(forced_key_frames) },1799 { .off = OFFSET(forced_key_frames) },
1800 "force key frames at specified timestamps", "timestamps" },1800 "force key frames at specified timestamps", "timestamps" },
1801 { "b", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_PERFILE | OPT_OUTPUT,1801 { "b", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_PERFILE | OPT_OUTPUT,
1802 { .func_arg = opt_bitrate },1802 { .func_arg = opt_bitrate },
1803 "video bitrate (please use -b:v)", "bitrate" },1803 "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,
1805 { .off = OFFSET(hwaccels) },1805 { .off = OFFSET(hwaccels) },
1806 "use HW accelerated decoding", "hwaccel name" },1806 "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,
1808 { .off = OFFSET(hwaccel_devices) },1808 { .off = OFFSET(hwaccel_devices) },
1809 "select a device for HW acceleration", "devicename" },1809 "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,
1811 { .off = OFFSET(hwaccel_output_formats) },1811 { .off = OFFSET(hwaccel_output_formats) },
1812 "select output format used with HW accelerated decoding", "format" },1812 "select output format used with HW accelerated decoding", "format" },
1813 { "hwaccels", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT,1813 { "hwaccels", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT,
1814 { .func_arg = show_hwaccels },1814 { .func_arg = show_hwaccels },
1815 "show available HW acceleration methods" },1815 "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,
1817 { .off = OFFSET(autorotate) },1817 { .off = OFFSET(autorotate) },
1818 "automatically insert correct rotate filters" },1818 "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,
1820 { .off = OFFSET(autoscale) },1820 { .off = OFFSET(autoscale) },
1821 "automatically insert a scale filter at the end of the filter graph" },1821 "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,
1823 { .off = OFFSET(fix_sub_duration_heartbeat) },1823 { .off = OFFSET(fix_sub_duration_heartbeat) },
1824 "set this video output stream to be a heartbeat stream for "1824 "set this video output stream to be a heartbeat stream for "
1825 "fix_sub_duration, according to which subtitles should be split at "1825 "fix_sub_duration, according to which subtitles should be split at "
@@ -1833,10 +1833,10 @@ const OptionDef options[] = { · 7 unmodified lines
1833 { "aq", OPT_TYPE_FUNC, OPT_AUDIO | OPT_FUNC_ARG | OPT_PERFILE | OPT_OUTPUT,1833 { "aq", OPT_TYPE_FUNC, OPT_AUDIO | OPT_FUNC_ARG | OPT_PERFILE | OPT_OUTPUT,
1834 { .func_arg = opt_audio_qscale },1834 { .func_arg = opt_audio_qscale },
1835 "set audio quality (codec-specific)", "quality", },1835 "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,
1837 { .off = OFFSET(audio_sample_rate) },1837 { .off = OFFSET(audio_sample_rate) },
1838 "set audio sampling rate (in Hz)", "rate" },1838 "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,
1840 { .off = OFFSET(audio_channels) },1840 { .off = OFFSET(audio_channels) },
1841 "set number of audio channels", "channels" },1841 "set number of audio channels", "channels" },
1842 { "an", OPT_TYPE_BOOL, OPT_AUDIO | OPT_OFFSET | OPT_INPUT | OPT_OUTPUT,1842 { "an", OPT_TYPE_BOOL, OPT_AUDIO | OPT_OFFSET | OPT_INPUT | OPT_OUTPUT,
@@ -1853,14 +1853,14 @@ const OptionDef options[] = { · 10 unmodified lines
1853 { .func_arg = opt_old2new },1853 { .func_arg = opt_old2new },
1854 "force audio tag/fourcc", "fourcc/tag",1854 "force audio tag/fourcc", "fourcc/tag",
1855 .u1.name_canon = "tag", },1855 .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,
1857 { .off = OFFSET(sample_fmts) },1857 { .off = OFFSET(sample_fmts) },
1858 "set sample format", "format" },1858 "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,
1860 { .off = OFFSET(audio_ch_layouts) },1860 { .off = OFFSET(audio_ch_layouts) },
1861 "set channel layout", "layout",1861 "set channel layout", "layout",
1862 .u1.names_alt = alt_channel_layout, },1862 .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,
1864 { .off = OFFSET(audio_ch_layouts) },1864 { .off = OFFSET(audio_ch_layouts) },
1865 "set channel layout", "layout",1865 "set channel layout", "layout",
1866 .u1.name_canon = "channel_layout", },1866 .u1.name_canon = "channel_layout", },
@@ -1868,7 +1868,7 @@ const OptionDef options[] = { · 1 unmodified line
1868 { .func_arg = opt_audio_filters },1868 { .func_arg = opt_audio_filters },
1869 "set audio filters", "filter_graph",1869 "set audio filters", "filter_graph",
1870 .u1.name_canon = "filter", },1870 .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,
1872 { .off = OFFSET(guess_layout_max) },1872 { .off = OFFSET(guess_layout_max) },
1873 "set the maximum number of channels to try to guess the channel layout" },1873 "set the maximum number of channels to try to guess the channel layout" },
1874 1874
@@ -1884,10 +1884,10 @@ const OptionDef options[] = { · 9 unmodified lines
1884 { .func_arg = opt_old2new }1884 { .func_arg = opt_old2new }
1885 , "force subtitle tag/fourcc", "fourcc/tag",1885 , "force subtitle tag/fourcc", "fourcc/tag",
1886 .u1.name_canon = "tag" },1886 .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,
1888 { .off = OFFSET(fix_sub_duration) },1888 { .off = OFFSET(fix_sub_duration) },
1889 "fix subtitles duration" },1889 "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,
1891 { .off = OFFSET(canvas_sizes) },1891 { .off = OFFSET(canvas_sizes) },
1892 "set canvas size (WxH or abbreviation)", "size" },1892 "set canvas size (WxH or abbreviation)", "size" },
1893 1893
@@ -1902,17 +1902,17 @@ const OptionDef options[] = { · 8 unmodified lines
1902 { .func_arg = opt_sdp_file },1902 { .func_arg = opt_sdp_file },
1903 "specify a file in which to print sdp information", "file" },1903 "specify a file in which to print sdp information", "file" },
1904 1904
1905 { "time_base", OPT_TYPE_STRING, OPT_EXPERT | OPT_SPEC | OPT_OUTPUT,1905 { "time_base", OPT_TYPE_STRING, OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT,
1906 { .off = OFFSET(time_bases) },1906 { .off = OFFSET(time_bases) },
1907 "set the desired time base hint for output stream (1:24, 1:48000 or 0.04166, 2.0833e-5)", "ratio" },1907 "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,
1909 { .off = OFFSET(enc_time_bases) },1909 { .off = OFFSET(enc_time_bases) },
1910 "set the desired time base for the encoder (1:24, 1:48000 or 0.04166, 2.0833e-5). "1910 "set the desired time base for the encoder (1:24, 1:48000 or 0.04166, 2.0833e-5). "
1911 "two special values are defined - "1911 "two special values are defined - "
1912 "0 = use frame rate (video) or sample rate (audio),"1912 "0 = use frame rate (video) or sample rate (audio),"
1913 "-1 = match source time base", "ratio" },1913 "-1 = match source time base", "ratio" },
1914 1914
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,
1916 { .off = OFFSET(bitstream_filters) },1916 { .off = OFFSET(bitstream_filters) },
1917 "A comma-separated list of bitstream filters", "bitstream_filters", },1917 "A comma-separated list of bitstream filters", "bitstream_filters", },
1918 1918
@@ -1933,10 +1933,10 @@ const OptionDef options[] = { · 14 unmodified lines
1933 "set options from indicated preset file", "filename",1933 "set options from indicated preset file", "filename",
1934 .u1.name_canon = "pre", },1934 .u1.name_canon = "pre", },
1935 1935
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,
1937 { .off = OFFSET(max_muxing_queue_size) },1937 { .off = OFFSET(max_muxing_queue_size) },
1938 "maximum number of packets that can be buffered while waiting for all streams to initialize", "packets" },1938 "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,
1940 { .off = OFFSET(muxing_queue_data_threshold) },1940 { .off = OFFSET(muxing_queue_data_threshold) },
1941 "set the threshold after which max_muxing_queue_size is taken into account", "bytes" },1941 "set the threshold after which max_muxing_queue_size is taken into account", "bytes" },
1942 1942
@@ -1984,7 +1984,7 @@ const OptionDef options[] = { · 41 unmodified lines
1984 "calculate PSNR of compressed frames (deprecated, use -flags +psnr)" },1984 "calculate PSNR of compressed frames (deprecated, use -flags +psnr)" },
1985#endif1985#endif
1986#if FFMPEG_OPT_TOP1986#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,
1988 { .off = OFFSET(top_field_first) },1988 { .off = OFFSET(top_field_first) },
1989 "deprecated, use the setfield video filter", "" },1989 "deprecated, use the setfield video filter", "" },
1990#endif1990#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