From patchwork Thu Feb 9 14:26:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 40340 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:5494:b0:bf:7b3a:fd32 with SMTP id i20csp506039pzk; Thu, 9 Feb 2023 06:27:12 -0800 (PST) X-Google-Smtp-Source: AK7set8YcSB9Bi04jAlCuO0nBa9NWdPEazfU4+uI9zL+Py2intGPbgvn3lQ+JIdgiDjp/b60luMp X-Received: by 2002:a17:907:3f91:b0:8ae:bb1d:45e4 with SMTP id hr17-20020a1709073f9100b008aebb1d45e4mr6523026ejc.26.1675952832435; Thu, 09 Feb 2023 06:27:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675952832; cv=none; d=google.com; s=arc-20160816; b=YQ+fpkDHAtNnJA1UznEYaDL0+XtIeOuu8XujIHfR87bmDnWuVZgWNZu7pcI9WDKnpE Rb1ytwvA/gj8XBtP7ptRHDC3tAAZf403mtDZ/PkVirEBJy0MSmnRpri845whrZb2y2OR pbGWgl92iQGCoSIvU2TaePhoGSqqllfnG81xJQgLuqTJrZEByLuFwK6Azmrl1+SzpZj7 54Hn073DXZmohYTwcKCELs02YPz0NPan0LKZBoCy2E/sXJkJ0BRaD07qk9p1IAatOs47 w3/AsgNNT7ERYA9/k4D4Bo8gfeOGEI6nioHqeV8pLfKgRKdOZ4pCdHasrm0NM1rfzH8E tYcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=LhBv9CaLh2VvWJnIc8O6jXUORqQjsFeG6no8bFLdhVM=; b=I6FkNHLJDwSPBUtuSvTKCZx0SH8ynBfNwYAFEU42VlnU4YVEn1hbUIxR2bPlw1e2d/ dJGy40Y6VuDaC4LjN0R6WwUtLsyTw956s/eYEV7HIbRTfyXch9z+LEEPs28oD3q0IH44 O1XRw96ZQ5MMmgtn9IaKNWQrwVUVQJA5xAqxVZR1dSdhzavMDju0MAdeaY8kWpqQ+cK9 UBI8aLjhY3LQ8+mE0YPTbZNSZmEJdKovS4Dzg2ZT7GV7WrwB5V+mmcCfJbLT6x8LuyfV 8y123ZWCD0HjIvqkUbh/BljFHBAIfiZhv+yiyhQA7Yrju/+1UVRgwtSB66ZJrhJ2NbbV qB3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id aa5-20020a170907354500b0088fa4de4edcsi2448785ejc.438.2023.02.09.06.27.03; Thu, 09 Feb 2023 06:27:12 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 56ACE68B9F3; Thu, 9 Feb 2023 16:27:01 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 19BFC68B9F3 for ; Thu, 9 Feb 2023 16:26:54 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 85EAF2404EE for ; Thu, 9 Feb 2023 15:26:53 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id DFMRAPwOsTdo for ; Thu, 9 Feb 2023 15:26:52 +0100 (CET) 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 mail0.khirnov.net (Postfix) with ESMTPS id B50242404EC for ; Thu, 9 Feb 2023 15:26:52 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 6895A3A0101 for ; Thu, 9 Feb 2023 15:26:46 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Thu, 9 Feb 2023 15:26:43 +0100 Message-Id: <20230209142643.19623-1-anton@khirnov.net> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] fftools/ffmpeg: rename -enc_stats* to -stats_enc* 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: YSU+9G/cXKMt This is consistent with -stats_mux* As the options were added very recently, this should not break any users. --- Changelog | 2 +- doc/ffmpeg.texi | 20 ++++++++++---------- fftools/ffmpeg_opt.c | 12 ++++++------ 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Changelog b/Changelog index bd9fe9922d..11dfd7ef73 100644 --- a/Changelog +++ b/Changelog @@ -32,7 +32,7 @@ version : - WADY DPCM decoder and demuxer - CBD2 DPCM decoder - ssim360 video filter -- ffmpeg CLI new options: -enc_stats_pre[_fmt], -enc_stats_post[_fmt], +- ffmpeg CLI new options: -stats_enc_pre[_fmt], -stats_enc_post[_fmt], -stats_mux_pre[_fmt] - hstack_vaapi, vstack_vaapi and xstack_vaapi filters - XMD ADPCM decoder and demuxer diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index 076956d128..d9d4b75567 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -2061,30 +2061,30 @@ encoder/muxer, it does not change the stream to conform to this value. Setting values that do not match the stream properties may result in encoding failures or invalid output files. -@item -enc_stats_pre[:@var{stream_specifier}] @var{path} (@emph{output,per-stream}) -@item -enc_stats_post[:@var{stream_specifier}] @var{path} (@emph{output,per-stream}) +@item -stats_enc_pre[:@var{stream_specifier}] @var{path} (@emph{output,per-stream}) +@item -stats_enc_post[:@var{stream_specifier}] @var{path} (@emph{output,per-stream}) @item -stats_mux_pre[:@var{stream_specifier}] @var{path} (@emph{output,per-stream}) Write per-frame encoding information about the matching streams into the file given by @var{path}. -@option{-enc_stats_pre} writes information about raw video or audio frames right -before they are sent for encoding, while @option{-enc_stats_post} writes +@option{-stats_enc_pre} writes information about raw video or audio frames right +before they are sent for encoding, while @option{-stats_enc_post} writes information about encoded packets as they are received from the encoder. @option{-stats_mux_pre} writes information about packets just as they are about to be sent to the muxer. Every frame or packet produces one line in the specified -file. The format of this line is controlled by @option{-enc_stats_pre_fmt} / -@option{-enc_stats_post_fmt} / @option{-stats_mux_pre_fmt}. +file. The format of this line is controlled by @option{-stats_enc_pre_fmt} / +@option{-stats_enc_post_fmt} / @option{-stats_mux_pre_fmt}. When stats for multiple streams are written into a single file, the lines corresponding to different streams will be interleaved. The precise order of this interleaving is not specified and not guaranteed to remain stable between different invocations of the program, even with the same options. -@item -enc_stats_pre_fmt[:@var{stream_specifier}] @var{format_spec} (@emph{output,per-stream}) -@item -enc_stats_post_fmt[:@var{stream_specifier}] @var{format_spec} (@emph{output,per-stream}) +@item -stats_enc_pre_fmt[:@var{stream_specifier}] @var{format_spec} (@emph{output,per-stream}) +@item -stats_enc_post_fmt[:@var{stream_specifier}] @var{format_spec} (@emph{output,per-stream}) @item -stats_mux_pre_fmt[:@var{stream_specifier}] @var{format_spec} (@emph{output,per-stream}) -Specify the format for the lines written with @option{-enc_stats_pre} / -@option{-enc_stats_post} / @option{-stats_mux_pre}. +Specify the format for the lines written with @option{-stats_enc_pre} / +@option{-stats_enc_post} / @option{-stats_mux_pre}. @var{format_spec} is a string that may contain directives of the form @var{@{fmt@}}. @var{format_spec} is backslash-escaped --- use \@{, \@}, and \\ diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index ed7ee6ab7d..055275d813 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -1544,16 +1544,16 @@ const OptionDef options[] = { { .off = OFFSET(bits_per_raw_sample) }, "set the number of bits per raw sample", "number" }, - { "enc_stats_pre", HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_pre) }, + { "stats_enc_pre", HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_pre) }, "write encoding stats before encoding" }, - { "enc_stats_post", HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_post) }, + { "stats_enc_post", HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_post) }, "write encoding stats after encoding" }, { "stats_mux_pre", HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(mux_stats) }, "write packets stats before muxing" }, - { "enc_stats_pre_fmt", HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_pre_fmt) }, - "format of the stats written with -enc_stats_pre" }, - { "enc_stats_post_fmt", HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_post_fmt) }, - "format of the stats written with -enc_stats_post" }, + { "stats_enc_pre_fmt", HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_pre_fmt) }, + "format of the stats written with -stats_enc_pre" }, + { "stats_enc_post_fmt", HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_post_fmt) }, + "format of the stats written with -stats_enc_post" }, { "stats_mux_pre_fmt", HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(mux_stats_fmt) }, "format of the stats written with -stats_mux_pre" },