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 ESMTPS id 7C8F54C7E9 for ; Fri, 9 May 2025 18:59:35 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1C6B168C360; Fri, 9 May 2025 21:59:30 +0300 (EEST) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C7B7468C360 for ; Fri, 9 May 2025 21:59:23 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 9808FEBF3B for ; Fri, 9 May 2025 20:56:48 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Had5JbOAB4dJ for ; Fri, 9 May 2025 20:56:19 +0200 (CEST) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id D28D0EBF34 for ; Fri, 9 May 2025 20:56:18 +0200 (CEST) Date: Fri, 9 May 2025 20:56:18 +0200 (CEST) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: Message-ID: References: <20250509120629.11338-1-cus@passwd.hu> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg: move elapsed time counter to the end of the status line 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Fri, 9 May 2025, softworkz . wrote: > > >> -----Original Message----- >> From: ffmpeg-devel On Behalf Of Marton >> Balint >> Sent: Freitag, 9. Mai 2025 14:06 >> To: ffmpeg-devel@ffmpeg.org >> Cc: Marton Balint >> Subject: [FFmpeg-devel] [PATCH] fftools/ffmpeg: move elapsed time counter to >> the end of the status line >> >> Elapsed time is much less important than the actual progress, and I am >> guessing >> several ffmpeg CLI frontends use the existing status line for showing >> progress, >> so putting a new field in the beginning is less optimal anyway. > > I agree that it might not be the most important part of the stats, > yet, from experience, it is quite often useful. > > How about adding it to the end, then? This patch does exactly that. Regards, Marton > > Thanks, > sw > > > >> >> Related to ticket #11582. >> >> Signed-off-by: Marton Balint >> --- >> fftools/ffmpeg.c | 18 +++++++++--------- >> 1 file changed, 9 insertions(+), 9 deletions(-) >> >> diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c >> index 24d43e6197..2e575e7b10 100644 >> --- a/fftools/ffmpeg.c >> +++ b/fftools/ffmpeg.c >> @@ -580,15 +580,6 @@ static void print_report(int is_last_report, int64_t >> timer_start, int64_t cur_ti >> av_bprint_init(&buf, 0, AV_BPRINT_SIZE_AUTOMATIC); >> av_bprint_init(&buf_script, 0, AV_BPRINT_SIZE_AUTOMATIC); >> >> - secs = (int)t; >> - ms = (int)((t - secs) * 1000); >> - mins = secs / 60; >> - secs %= 60; >> - hours = mins / 60; >> - mins %= 60; >> - >> - av_bprintf(&buf, "elapsed=%"PRId64":%02d:%02d.%02d ", hours, mins, secs, >> ms / 10); >> - >> for (OutputStream *ost = ost_iter(NULL); ost; ost = ost_iter(ost)) { >> const float q = ost->enc ? atomic_load(&ost->quality) / (float) >> FF_QP2LAMBDA : -1; >> >> @@ -679,6 +670,15 @@ static void print_report(int is_last_report, int64_t >> timer_start, int64_t cur_ti >> av_bprintf(&buf_script, "speed=%4.3gx\n", speed); >> } >> >> + secs = (int)t; >> + ms = (int)((t - secs) * 1000); >> + mins = secs / 60; >> + secs %= 60; >> + hours = mins / 60; >> + mins %= 60; >> + >> + av_bprintf(&buf, " elapsed=%"PRId64":%02d:%02d.%02d", hours, mins, secs, >> ms / 10); >> + >> if (print_stats || is_last_report) { >> const char end = is_last_report ? '\n' : '\r'; >> if (print_stats==1 && AV_LOG_INFO > av_log_get_level()) { >> -- >> 2.43.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". > _______________________________________________ > 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". > _______________________________________________ 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".