From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 0D87348775 for ; Wed, 17 Jan 2024 12:42:14 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 05C4668D041; Wed, 17 Jan 2024 14:41:42 +0200 (EET) Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C2B2768CEFD for ; Wed, 17 Jan 2024 14:41:31 +0200 (EET) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=o0LPH6vB; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 5AAF019C4 for ; Wed, 17 Jan 2024 13:41:31 +0100 (CET) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id ClQntNTcYA-8 for ; Wed, 17 Jan 2024 13:41:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1705495289; bh=adllDeoF2YdyjMnLO8YSHAdKxXVm0AkIqosSrfITg/I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=o0LPH6vB1ZlobfuUEtYoSIrkulAscqyLVhV5HUWpDFoIxjIPsKit9zKvaHJPm3gTf wfzBncql6Vdfa+ZzHf4agFEcgYdlmG7regbJbySHjPvJ3/CMvfhCBJX4CK1Ry2ybN2 /IFDmo6nvglmf2PmjlBnoIKESBM8AF8fLeijuzGQjlOi5Jfhl3n5+O3jP+6/bL3tTu SMxRPaec3mEwdZXzVQR3TBy/KejQRbCVXr7Lkt/FV4yqdjj42b5FvkAlXg+8+EOe3Q zE2q/K5/sCeUNaT9CI4wU8Qhgsag0KK/JTNfPYnd8nMuRwHDcSvCdpW+1o/Sd1I+QL eoBhS9zsmk6iw== Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id 68B8514E4 for ; Wed, 17 Jan 2024 13:41:29 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 4FE8C3A054A for ; Wed, 17 Jan 2024 13:41:29 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Wed, 17 Jan 2024 13:40:29 +0100 Message-ID: <20240117124036.7877-2-anton@khirnov.net> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240117124036.7877-1-anton@khirnov.net> References: <20240117124036.7877-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/8] fftools/cmdutils: add a flag for per-stream options X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Not all OPT_SPEC options are per-stream, this will allow identifying those that are, which will be useful in following commits. --- fftools/cmdutils.h | 13 +++-- fftools/ffmpeg_opt.c | 118 +++++++++++++++++++++---------------------- 2 files changed, 68 insertions(+), 63 deletions(-) diff --git a/fftools/cmdutils.h b/fftools/cmdutils.h index 8fa5ad4fc7..0c3b475876 100644 --- a/fftools/cmdutils.h +++ b/fftools/cmdutils.h @@ -158,17 +158,22 @@ typedef struct OptionDef { Always use as OPT_SPEC in option definitions. */ #define OPT_FLAG_SPEC (1 << 9) #define OPT_SPEC (OPT_FLAG_SPEC | OPT_OFFSET) + +/* Option applies per-stream (implies OPT_SPEC). */ +#define OPT_FLAG_PERSTREAM (1 << 10) +#define OPT_PERSTREAM (OPT_FLAG_PERSTREAM | OPT_SPEC) + /* ffmpeg-only - specifies whether an OPT_PERFILE option applies to input, * output, or both. */ -#define OPT_INPUT (1 << 10) -#define OPT_OUTPUT (1 << 11) +#define OPT_INPUT (1 << 11) +#define OPT_OUTPUT (1 << 12) /* This option is a "canonical" form, to which one or more alternatives * exist. These alternatives are listed in u1.names_alt. */ -#define OPT_HAS_ALT (1 << 12) +#define OPT_HAS_ALT (1 << 13) /* This option is an alternative form of some other option, whose * name is stored in u1.name_canon */ -#define OPT_HAS_CANON (1 << 13) +#define OPT_HAS_CANON (1 << 14) union { void *dst_ptr; diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 6b16d92a87..4a0d126aca 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -1456,15 +1456,15 @@ const OptionDef options[] = { { "recast_media", OPT_TYPE_BOOL, OPT_EXPERT, { &recast_media }, "allow recasting stream type in order to force a decoder of different media type" }, - { "c", OPT_TYPE_STRING, OPT_SPEC | OPT_INPUT | OPT_OUTPUT | OPT_HAS_CANON, + { "c", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_INPUT | OPT_OUTPUT | OPT_HAS_CANON, { .off = OFFSET(codec_names) }, "codec name", "codec", .u1.name_canon = "codec", }, - { "codec", OPT_TYPE_STRING, OPT_SPEC | OPT_INPUT | OPT_OUTPUT | OPT_EXPERT | OPT_HAS_ALT, + { "codec", OPT_TYPE_STRING, OPT_PERSTREAM | 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_EXPERT | OPT_HAS_ALT, + { "pre", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_OUTPUT | OPT_EXPERT | OPT_HAS_ALT, { .off = OFFSET(presets) }, "preset name", "preset", .u1.names_alt = alt_pre, }, @@ -1507,7 +1507,7 @@ const OptionDef options[] = { { "itsoffset", OPT_TYPE_TIME, OPT_OFFSET | OPT_EXPERT | OPT_INPUT, { .off = OFFSET(input_ts_offset) }, "set the input ts offset", "time_off" }, - { "itsscale", OPT_TYPE_DOUBLE, OPT_SPEC | OPT_EXPERT | OPT_INPUT, + { "itsscale", OPT_TYPE_DOUBLE, OPT_PERSTREAM | OPT_EXPERT | OPT_INPUT, { .off = OFFSET(ts_scale) }, "set the input ts scale", "scale" }, { "timestamp", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_PERFILE | OPT_EXPERT | OPT_OUTPUT, @@ -1581,7 +1581,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_EXPERT | OPT_OUTPUT, + { "apad", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT, { .off = OFFSET(apad) }, "audio pad", "" }, { "dts_delta_threshold", OPT_TYPE_FLOAT, OPT_EXPERT, @@ -1596,21 +1596,21 @@ const OptionDef options[] = { { "abort_on", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_EXPERT, { .func_arg = opt_abort_on }, "abort on the specified condition flags", "flags" }, - { "copyinkf", OPT_TYPE_BOOL, OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, + { "copyinkf", OPT_TYPE_BOOL, OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT, { .off = OFFSET(copy_initial_nonkeyframes) }, "copy initial non-keyframes" }, - { "copypriorss", OPT_TYPE_INT, OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, + { "copypriorss", OPT_TYPE_INT, OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT, { .off = OFFSET(copy_prior_start) }, "copy or discard frames before start time" }, - { "frames", OPT_TYPE_INT64, OPT_SPEC | OPT_OUTPUT | OPT_EXPERT | OPT_HAS_ALT, + { "frames", OPT_TYPE_INT64, OPT_PERSTREAM | OPT_OUTPUT | OPT_EXPERT | OPT_HAS_ALT, { .off = OFFSET(max_frames) }, "set the number of frames to output", "number", .u1.names_alt = alt_frames, }, - { "tag", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_INPUT | OPT_HAS_ALT, + { "tag", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT | OPT_INPUT | OPT_HAS_ALT, { .off = OFFSET(codec_tags) }, "force codec tag/fourcc", "fourcc/tag", .u1.names_alt = alt_tag, }, - { "q", OPT_TYPE_DOUBLE, OPT_EXPERT | OPT_SPEC | OPT_OUTPUT | OPT_HAS_CANON, + { "q", OPT_TYPE_DOUBLE, OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT | OPT_HAS_CANON, { .off = OFFSET(qscale) }, "use fixed quality scale (VBR)", "q", .u1.name_canon = "qscale", }, @@ -1621,7 +1621,7 @@ const OptionDef options[] = { { "profile", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_EXPERT | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_profile }, "set profile", "profile" }, - { "filter", OPT_TYPE_STRING, OPT_SPEC | OPT_OUTPUT | OPT_HAS_ALT, + { "filter", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_OUTPUT | OPT_HAS_ALT, { .off = OFFSET(filters) }, "set stream filtergraph", "filter_graph", .u1.names_alt = alt_filter, }, @@ -1629,11 +1629,11 @@ const OptionDef options[] = { { .func_arg = opt_filter_threads }, "number of non-complex filter threads" }, #if FFMPEG_OPT_FILTER_SCRIPT - { "filter_script", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT, + { "filter_script", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT, { .off = OFFSET(filter_scripts) }, "deprecated, use -/filter", "filename" }, #endif - { "reinit_filter", OPT_TYPE_INT, OPT_SPEC | OPT_INPUT | OPT_EXPERT, + { "reinit_filter", OPT_TYPE_INT, OPT_PERSTREAM | OPT_INPUT | OPT_EXPERT, { .off = OFFSET(reinit_filters) }, "reinit filtergraph on input parameter changes", "" }, { "filter_complex", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_EXPERT, @@ -1673,10 +1673,10 @@ const OptionDef options[] = { { "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 | OPT_EXPERT, + { "discard", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_INPUT | OPT_EXPERT, { .off = OFFSET(discard) }, "discard", "" }, - { "disposition", OPT_TYPE_STRING, OPT_SPEC | OPT_OUTPUT | OPT_EXPERT, + { "disposition", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_OUTPUT | OPT_EXPERT, { .off = OFFSET(disposition) }, "disposition", "" }, { "thread_queue_size", OPT_TYPE_INT, OPT_OFFSET | OPT_EXPERT | OPT_INPUT | OPT_OUTPUT, @@ -1685,26 +1685,26 @@ const OptionDef options[] = { { "find_stream_info", OPT_TYPE_BOOL, OPT_INPUT | OPT_EXPERT | OPT_OFFSET, { .off = OFFSET(find_stream_info) }, "read and decode the streams to fill missing information with heuristics" }, - { "bits_per_raw_sample", OPT_TYPE_INT, OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, + { "bits_per_raw_sample", OPT_TYPE_INT, OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT, { .off = OFFSET(bits_per_raw_sample) }, "set the number of bits per raw sample", "number" }, - { "stats_enc_pre", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT, + { "stats_enc_pre", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT, { .off = OFFSET(enc_stats_pre) }, "write encoding stats before encoding" }, - { "stats_enc_post", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT, + { "stats_enc_post", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT, { .off = OFFSET(enc_stats_post) }, "write encoding stats after encoding" }, - { "stats_mux_pre", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT, + { "stats_mux_pre", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT, { .off = OFFSET(mux_stats) }, "write packets stats before muxing" }, - { "stats_enc_pre_fmt", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT, + { "stats_enc_pre_fmt", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT, { .off = OFFSET(enc_stats_pre_fmt) }, "format of the stats written with -stats_enc_pre" }, - { "stats_enc_post_fmt", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT, + { "stats_enc_post_fmt", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT, { .off = OFFSET(enc_stats_post_fmt) }, "format of the stats written with -stats_enc_post" }, - { "stats_mux_pre_fmt", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT, + { "stats_mux_pre_fmt", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT, { .off = OFFSET(mux_stats_fmt) }, "format of the stats written with -stats_mux_pre" }, @@ -1713,37 +1713,37 @@ const OptionDef options[] = { { .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, + { "r", OPT_TYPE_STRING, OPT_VIDEO | OPT_PERSTREAM | 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 | OPT_EXPERT, + { "fpsmax", OPT_TYPE_STRING, OPT_VIDEO | OPT_PERSTREAM | 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, + { "s", OPT_TYPE_STRING, OPT_VIDEO | OPT_SUBTITLE | OPT_PERSTREAM | OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(frame_sizes) }, "set frame size (WxH or abbreviation)", "size" }, - { "aspect", OPT_TYPE_STRING, OPT_VIDEO | OPT_SPEC | OPT_OUTPUT, + { "aspect", OPT_TYPE_STRING, OPT_VIDEO | OPT_PERSTREAM | OPT_OUTPUT, { .off = OFFSET(frame_aspect_ratios) }, "set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)", "aspect" }, - { "pix_fmt", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_INPUT | OPT_OUTPUT, + { "pix_fmt", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(frame_pix_fmts) }, "set pixel format", "format" }, - { "display_rotation", OPT_TYPE_DOUBLE, OPT_VIDEO | OPT_SPEC | OPT_INPUT | OPT_EXPERT, + { "display_rotation", OPT_TYPE_DOUBLE, OPT_VIDEO | OPT_PERSTREAM | 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 | OPT_EXPERT, + { "display_hflip", OPT_TYPE_BOOL, OPT_VIDEO | OPT_PERSTREAM | 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 | OPT_EXPERT, + { "display_vflip", OPT_TYPE_BOOL, OPT_VIDEO | OPT_PERSTREAM | OPT_INPUT | OPT_EXPERT, { .off = OFFSET(display_vflips) }, "set display vertical flip for stream(s) " "(overrides any display rotation if it is not set)"}, { "vn", OPT_TYPE_BOOL, OPT_VIDEO | OPT_OFFSET | OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(video_disable) }, "disable video" }, - { "rc_override", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, + { "rc_override", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT, { .off = OFFSET(rc_overrides) }, "rate control override for specific intervals", "override" }, { "vcodec", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_PERFILE | OPT_INPUT | OPT_OUTPUT | OPT_HAS_CANON, @@ -1753,10 +1753,10 @@ const OptionDef options[] = { { "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 | OPT_EXPERT, + { "pass", OPT_TYPE_INT, OPT_VIDEO | OPT_PERSTREAM | 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, + { "passlogfile", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT, { .off = OFFSET(passlogfiles) }, "select two pass log file name prefix", "prefix" }, { "vstats", OPT_TYPE_FUNC, OPT_VIDEO | OPT_EXPERT, @@ -1772,53 +1772,53 @@ const OptionDef options[] = { { .func_arg = opt_video_filters }, "set video filters", "filter_graph", .u1.name_canon = "filter", }, - { "intra_matrix", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, + { "intra_matrix", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT, { .off = OFFSET(intra_matrices) }, "specify intra matrix coeffs", "matrix" }, - { "inter_matrix", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, + { "inter_matrix", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT, { .off = OFFSET(inter_matrices) }, "specify inter matrix coeffs", "matrix" }, - { "chroma_intra_matrix", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, + { "chroma_intra_matrix", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT, { .off = OFFSET(chroma_intra_matrices) }, "specify intra matrix coeffs", "matrix" }, { "vtag", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_EXPERT | OPT_PERFILE | OPT_INPUT | OPT_OUTPUT | OPT_HAS_CANON, { .func_arg = opt_old2new }, "force video tag/fourcc", "fourcc/tag", .u1.name_canon = "tag", }, - { "fps_mode", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, + { "fps_mode", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT, { .off = OFFSET(fps_mode) }, "set framerate mode for matching video streams; overrides vsync" }, - { "force_fps", OPT_TYPE_BOOL, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, + { "force_fps", OPT_TYPE_BOOL, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT, { .off = OFFSET(force_fps) }, "force the selected framerate, disable the best supported framerate selection" }, { "streamid", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_EXPERT | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_streamid }, "set the value of an outfile streamid", "streamIndex:value" }, - { "force_key_frames", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, + { "force_key_frames", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT, { .off = OFFSET(forced_key_frames) }, "force key frames at specified timestamps", "timestamps" }, { "b", OPT_TYPE_FUNC, OPT_VIDEO | OPT_FUNC_ARG | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_bitrate }, "video bitrate (please use -b:v)", "bitrate" }, - { "hwaccel", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_INPUT, + { "hwaccel", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_INPUT, { .off = OFFSET(hwaccels) }, "use HW accelerated decoding", "hwaccel name" }, - { "hwaccel_device", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_INPUT, + { "hwaccel_device", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_INPUT, { .off = OFFSET(hwaccel_devices) }, "select a device for HW acceleration", "devicename" }, - { "hwaccel_output_format", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_INPUT, + { "hwaccel_output_format", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_INPUT, { .off = OFFSET(hwaccel_output_formats) }, "select output format used with HW accelerated decoding", "format" }, { "hwaccels", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_hwaccels }, "show available HW acceleration methods" }, - { "autorotate", OPT_TYPE_BOOL, OPT_SPEC | OPT_EXPERT | OPT_INPUT, + { "autorotate", OPT_TYPE_BOOL, OPT_PERSTREAM | OPT_EXPERT | OPT_INPUT, { .off = OFFSET(autorotate) }, "automatically insert correct rotate filters" }, - { "autoscale", OPT_TYPE_BOOL, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT, + { "autoscale", OPT_TYPE_BOOL, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT, { .off = OFFSET(autoscale) }, "automatically insert a scale filter at the end of the filter graph" }, - { "fix_sub_duration_heartbeat", OPT_TYPE_BOOL, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, + { "fix_sub_duration_heartbeat", OPT_TYPE_BOOL, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT, { .off = OFFSET(fix_sub_duration_heartbeat) }, "set this video output stream to be a heartbeat stream for " "fix_sub_duration, according to which subtitles should be split at " @@ -1832,10 +1832,10 @@ const OptionDef options[] = { { "aq", OPT_TYPE_FUNC, OPT_AUDIO | OPT_FUNC_ARG | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_audio_qscale }, "set audio quality (codec-specific)", "quality", }, - { "ar", OPT_TYPE_INT, OPT_AUDIO | OPT_SPEC | OPT_INPUT | OPT_OUTPUT, + { "ar", OPT_TYPE_INT, OPT_AUDIO | OPT_PERSTREAM | OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(audio_sample_rate) }, "set audio sampling rate (in Hz)", "rate" }, - { "ac", OPT_TYPE_INT, OPT_AUDIO | OPT_SPEC | OPT_INPUT | OPT_OUTPUT, + { "ac", OPT_TYPE_INT, OPT_AUDIO | OPT_PERSTREAM | OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(audio_channels) }, "set number of audio channels", "channels" }, { "an", OPT_TYPE_BOOL, OPT_AUDIO | OPT_OFFSET | OPT_INPUT | OPT_OUTPUT, @@ -1852,14 +1852,14 @@ const OptionDef options[] = { { .func_arg = opt_old2new }, "force audio tag/fourcc", "fourcc/tag", .u1.name_canon = "tag", }, - { "sample_fmt", OPT_TYPE_STRING, OPT_AUDIO | OPT_EXPERT | OPT_SPEC | OPT_INPUT | OPT_OUTPUT, + { "sample_fmt", OPT_TYPE_STRING, OPT_AUDIO | OPT_EXPERT | OPT_PERSTREAM | OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(sample_fmts) }, "set sample format", "format" }, - { "channel_layout", OPT_TYPE_STRING, OPT_AUDIO | OPT_EXPERT | OPT_SPEC | OPT_INPUT | OPT_OUTPUT | OPT_HAS_ALT, + { "channel_layout", OPT_TYPE_STRING, OPT_AUDIO | OPT_EXPERT | OPT_PERSTREAM | OPT_INPUT | OPT_OUTPUT | OPT_HAS_ALT, { .off = OFFSET(audio_ch_layouts) }, "set channel layout", "layout", .u1.names_alt = alt_channel_layout, }, - { "ch_layout", OPT_TYPE_STRING, OPT_AUDIO | OPT_EXPERT | OPT_SPEC | OPT_INPUT | OPT_OUTPUT | OPT_HAS_CANON, + { "ch_layout", OPT_TYPE_STRING, OPT_AUDIO | OPT_EXPERT | OPT_PERSTREAM | OPT_INPUT | OPT_OUTPUT | OPT_HAS_CANON, { .off = OFFSET(audio_ch_layouts) }, "set channel layout", "layout", .u1.name_canon = "channel_layout", }, @@ -1867,7 +1867,7 @@ const OptionDef options[] = { { .func_arg = opt_audio_filters }, "set audio filters", "filter_graph", .u1.name_canon = "filter", }, - { "guess_layout_max", OPT_TYPE_INT, OPT_AUDIO | OPT_SPEC | OPT_EXPERT | OPT_INPUT, + { "guess_layout_max", OPT_TYPE_INT, OPT_AUDIO | OPT_PERSTREAM | OPT_EXPERT | OPT_INPUT, { .off = OFFSET(guess_layout_max) }, "set the maximum number of channels to try to guess the channel layout" }, @@ -1883,10 +1883,10 @@ const OptionDef options[] = { { .func_arg = opt_old2new } , "force subtitle tag/fourcc", "fourcc/tag", .u1.name_canon = "tag" }, - { "fix_sub_duration", OPT_TYPE_BOOL, OPT_EXPERT | OPT_SUBTITLE | OPT_SPEC | OPT_INPUT, + { "fix_sub_duration", OPT_TYPE_BOOL, OPT_EXPERT | OPT_SUBTITLE | OPT_PERSTREAM | OPT_INPUT, { .off = OFFSET(fix_sub_duration) }, "fix subtitles duration" }, - { "canvas_size", OPT_TYPE_STRING, OPT_SUBTITLE | OPT_SPEC | OPT_INPUT | OPT_EXPERT, + { "canvas_size", OPT_TYPE_STRING, OPT_SUBTITLE | OPT_PERSTREAM | OPT_INPUT | OPT_EXPERT, { .off = OFFSET(canvas_sizes) }, "set canvas size (WxH or abbreviation)", "size" }, @@ -1901,17 +1901,17 @@ const OptionDef options[] = { { .func_arg = opt_sdp_file }, "specify a file in which to print sdp information", "file" }, - { "time_base", OPT_TYPE_STRING, OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, + { "time_base", OPT_TYPE_STRING, OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT, { .off = OFFSET(time_bases) }, "set the desired time base hint for output stream (1:24, 1:48000 or 0.04166, 2.0833e-5)", "ratio" }, - { "enc_time_base", OPT_TYPE_STRING, OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, + { "enc_time_base", OPT_TYPE_STRING, OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT, { .off = OFFSET(enc_time_bases) }, "set the desired time base for the encoder (1:24, 1:48000 or 0.04166, 2.0833e-5). " "two special values are defined - " "0 = use frame rate (video) or sample rate (audio)," "-1 = match source time base", "ratio" }, - { "bsf", OPT_TYPE_STRING, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_INPUT, + { "bsf", OPT_TYPE_STRING, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT | OPT_INPUT, { .off = OFFSET(bitstream_filters) }, "A comma-separated list of bitstream filters", "bitstream_filters", }, @@ -1932,10 +1932,10 @@ const OptionDef options[] = { "set options from indicated preset file", "filename", .u1.name_canon = "pre", }, - { "max_muxing_queue_size", OPT_TYPE_INT, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT, + { "max_muxing_queue_size", OPT_TYPE_INT, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT, { .off = OFFSET(max_muxing_queue_size) }, "maximum number of packets that can be buffered while waiting for all streams to initialize", "packets" }, - { "muxing_queue_data_threshold", OPT_TYPE_INT, OPT_SPEC | OPT_EXPERT | OPT_OUTPUT, + { "muxing_queue_data_threshold", OPT_TYPE_INT, OPT_PERSTREAM | OPT_EXPERT | OPT_OUTPUT, { .off = OFFSET(muxing_queue_data_threshold) }, "set the threshold after which max_muxing_queue_size is taken into account", "bytes" }, @@ -1983,7 +1983,7 @@ const OptionDef options[] = { "calculate PSNR of compressed frames (deprecated, use -flags +psnr)" }, #endif #if FFMPEG_OPT_TOP - { "top", OPT_TYPE_INT, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_INPUT | OPT_OUTPUT, + { "top", OPT_TYPE_INT, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(top_field_first) }, "deprecated, use the setfield video filter", "" }, #endif -- 2.42.0 _______________________________________________ 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".