From patchwork Mon Apr 4 11:30:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 35186 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c05:b0:7a:e998:b410 with SMTP id bw5csp1914481pzb; Mon, 4 Apr 2022 04:38:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLtuMn4qhnPiPryr/2sBQrBHuP7G9723zy/6qvZckKISY2BqnuqGhvR41/+kRG6aR2rb3B X-Received: by 2002:a17:907:3e1c:b0:6e4:e1b3:5384 with SMTP id hp28-20020a1709073e1c00b006e4e1b35384mr10295248ejc.700.1649072282017; Mon, 04 Apr 2022 04:38:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649072282; cv=none; d=google.com; s=arc-20160816; b=bsb0/zqR7cl20iHtvMV/+jLXRMuyRZO6cJ1Yxfv5p3eVqkX87MaT3EINhuXhzZ2I6y AI3xNUMlxBMlDrQM0LNNjLnKi9IwnNLmeCp5b6NPmWXInMaP70MI8WtO1jBy3GtgCS1i NXi+mGgBP5bSj06n+JOiY31Q6it4TltbqMpR46VqXWADg4MVudeQGy23/NCFAWYMOGqe mDTaVeLtGyyGMkolOZK7nV24q+5MmccHAHJ+PrhDGabyWbzUSt5wZFxalVM7P+OIDaFr av/w25nWokQl72eoFjmPlBQtjaExS1eXY3w4TCp/IBBt8fCxC3JybAFQkjICj8ksERZL eauA== 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:references:in-reply-to:message-id :date:to:from:delivered-to; bh=uK6OfcKb8itZRuJiauZ1thtFCmy8+2110376OZEqUZA=; b=ED8odbTCl2KD5OzL+2wwqavfdBMrVifdtSNxRvXtz7M8+wbzdO//aJACnhA+dS0Nw8 o4X/DSwEc/AktKtwh9Bb01UPqikEDr61ZR/Pz9XE6oKjW8AKdwNUUusqm+w1hQS1AZbr Ewi+sO/GPuUCKI+fpvambJCbILKFjRP8IWA0y5RJBm3VhlGqQOILvRow1j+DAbkAroxh Na0GMOntxq8sdv7i4T2y4KLaoFpGm3qZn08vnJJ6O72ifQQ+jP7tkuyuUd76i+J9d+aG h+idfZIikAG9ipHjBGm8kiyzfeCV0DRt5HVW+umNT9AADXxUIX0BYGy6Top1BmC/ZHeU p3Og== 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 v23-20020a1709062f1700b006df76385c10si6509922eji.176.2022.04.04.04.38.01; Mon, 04 Apr 2022 04:38:02 -0700 (PDT) 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 B00D268B2BF; Mon, 4 Apr 2022 14:37:44 +0300 (EEST) 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 507FE68B299 for ; Mon, 4 Apr 2022 14:37:42 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id B9FFB240590 for ; Mon, 4 Apr 2022 13:37:41 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id IwaPiwWtH0yi for ; Mon, 4 Apr 2022 13:37:41 +0200 (CEST) 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 3A38B240179 for ; Mon, 4 Apr 2022 13:37:41 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id 27CDF3A0DA7; Mon, 4 Apr 2022 13:32:12 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Apr 2022 13:30:24 +0200 Message-Id: <20220404113037.13070-37-anton@khirnov.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220404113037.13070-1-anton@khirnov.net> References: <20220404113037.13070-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 36/49] fftools/ffmpeg: stop using OutputStream.frame_number in print_report() 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: 6rfqV+cMIccK This field means different things for video encoding (number of frames emitted to the encoding sync queue/encoder by the video sync code) and for everything else (number of packets sent to the muxer sync queue). Print the value of packets_written instead, which means the same thing for all kinds of streams. It is also more consistent with the code below, which prints PSNR from the last muxed packet. --- fftools/ffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index e46554ddf4..53b3657ec9 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -1531,7 +1531,7 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti if (!vid && enc->codec_type == AVMEDIA_TYPE_VIDEO) { float fps; - frame_number = ost->frame_number; + frame_number = ost->packets_written; fps = t > 1 ? frame_number / t : 0; av_bprintf(&buf, "frame=%5d fps=%3.*f q=%3.1f ", frame_number, fps < 9.95, fps, q);