Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] fftools/ffmpeg: show video stats in progress output without filters
@ 2024-07-30 18:03 Jan Garcia via ffmpeg-devel
  2024-08-01  7:41 ` Anton Khirnov
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Garcia via ffmpeg-devel @ 2024-07-30 18:03 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Jan Garcia

Since ffmpeg 6.1 video stats are accidentally hidden from progress output
if no filters are used.
This patch re-enables video stats (like frames=) in the progress output.
---
 Changelog        | 1 +
 fftools/ffmpeg.c | 8 +++++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/Changelog b/Changelog
index 571b27ad98..2c2cbf9179 100644
--- a/Changelog
+++ b/Changelog
@@ -5,6 +5,7 @@ version <next>:
 - Raw Captions with Time (RCWT) closed caption demuxer
 - LC3/LC3plus decoding/encoding using external library liblc3
 - ffmpeg CLI filtergraph chaining
+- ffmpeg CLI again shows video stats in progress output
 - LC3/LC3plus demuxer and muxer
 - pad_vaapi, drawbox_vaapi filters
 - vf_scale supports secondary ref input and framesync options
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 3aa2e12780..420ba3c6e4 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -587,7 +587,7 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
             av_bprintf(&buf_script, "stream_%d_%d_q=%.1f\n",
                        ost->file->index, ost->index, q);
         }
-        if (!vid && ost->type == AVMEDIA_TYPE_VIDEO && ost->filter) {
+        if (!vid && ost->type == AVMEDIA_TYPE_VIDEO) {
             float fps;
             uint64_t frame_number = atomic_load(&ost->packets_written);
 
@@ -601,8 +601,10 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
             if (is_last_report)
                 av_bprintf(&buf, "L");
 
-            nb_frames_dup  = atomic_load(&ost->filter->nb_frames_dup);
-            nb_frames_drop = atomic_load(&ost->filter->nb_frames_drop);
+            if (ost->filter) {
+                nb_frames_dup  = atomic_load(&ost->filter->nb_frames_dup);
+                nb_frames_drop = atomic_load(&ost->filter->nb_frames_drop);
+            }
 
             vid = 1;
         }
-- 
2.44.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg: show video stats in progress output without filters
  2024-07-30 18:03 [FFmpeg-devel] [PATCH] fftools/ffmpeg: show video stats in progress output without filters Jan Garcia via ffmpeg-devel
@ 2024-08-01  7:41 ` Anton Khirnov
  0 siblings, 0 replies; 4+ messages in thread
From: Anton Khirnov @ 2024-08-01  7:41 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: Jan Garcia

Quoting Jan Garcia via ffmpeg-devel (2024-07-30 20:03:33)
> Since ffmpeg 6.1 video stats are accidentally hidden from progress output
> if no filters are used.

IIUC this applies only to streamcopy, not transcoding with no
user-specified filters.

> This patch re-enables video stats (like frames=) in the progress output.
> ---
>  Changelog        | 1 +
>  fftools/ffmpeg.c | 8 +++++---
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/Changelog b/Changelog
> index 571b27ad98..2c2cbf9179 100644
> --- a/Changelog
> +++ b/Changelog
> @@ -5,6 +5,7 @@ version <next>:
>  - Raw Captions with Time (RCWT) closed caption demuxer
>  - LC3/LC3plus decoding/encoding using external library liblc3
>  - ffmpeg CLI filtergraph chaining
> +- ffmpeg CLI again shows video stats in progress output

We generally do not mention bugfixes in the changelog, otherwise it'd be
too long and unreadable.

>  - LC3/LC3plus demuxer and muxer
>  - pad_vaapi, drawbox_vaapi filters
>  - vf_scale supports secondary ref input and framesync options
> diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
> index 3aa2e12780..420ba3c6e4 100644
> --- a/fftools/ffmpeg.c
> +++ b/fftools/ffmpeg.c
> @@ -587,7 +587,7 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
>              av_bprintf(&buf_script, "stream_%d_%d_q=%.1f\n",
>                         ost->file->index, ost->index, q);
>          }
> -        if (!vid && ost->type == AVMEDIA_TYPE_VIDEO && ost->filter) {
> +        if (!vid && ost->type == AVMEDIA_TYPE_VIDEO) {
>              float fps;
>              uint64_t frame_number = atomic_load(&ost->packets_written);
>  
> @@ -601,8 +601,10 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
>              if (is_last_report)
>                  av_bprintf(&buf, "L");
>  
> -            nb_frames_dup  = atomic_load(&ost->filter->nb_frames_dup);
> -            nb_frames_drop = atomic_load(&ost->filter->nb_frames_drop);
> +            if (ost->filter) {
> +                nb_frames_dup  = atomic_load(&ost->filter->nb_frames_dup);
> +                nb_frames_drop = atomic_load(&ost->filter->nb_frames_drop);
> +            }

Change itself looks ok.

-- 
Anton Khirnov
_______________________________________________
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".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg: show video stats in progress output without filters
  2024-08-02  8:25 Jan Garcia via ffmpeg-devel
@ 2024-08-14 13:24 ` Anton Khirnov
  0 siblings, 0 replies; 4+ messages in thread
From: Anton Khirnov @ 2024-08-14 13:24 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: Jan Garcia

Quoting Jan Garcia via ffmpeg-devel (2024-08-02 10:25:58)
> Since ffmpeg 6.1 video stats are accidentally hidden from streamcopy progress output.
> This patch re-enables video stats (like frames=) in the progress output.
> ---
>  fftools/ffmpeg.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)

Thanks, pushed.

-- 
Anton Khirnov
_______________________________________________
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".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [FFmpeg-devel] [PATCH] fftools/ffmpeg: show video stats in progress output without filters
@ 2024-08-02  8:25 Jan Garcia via ffmpeg-devel
  2024-08-14 13:24 ` Anton Khirnov
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Garcia via ffmpeg-devel @ 2024-08-02  8:25 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Jan Garcia

Since ffmpeg 6.1 video stats are accidentally hidden from streamcopy progress output.
This patch re-enables video stats (like frames=) in the progress output.
---
 fftools/ffmpeg.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 3aa2e12780..420ba3c6e4 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -587,7 +587,7 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
             av_bprintf(&buf_script, "stream_%d_%d_q=%.1f\n",
                        ost->file->index, ost->index, q);
         }
-        if (!vid && ost->type == AVMEDIA_TYPE_VIDEO && ost->filter) {
+        if (!vid && ost->type == AVMEDIA_TYPE_VIDEO) {
             float fps;
             uint64_t frame_number = atomic_load(&ost->packets_written);
 
@@ -601,8 +601,10 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
             if (is_last_report)
                 av_bprintf(&buf, "L");
 
-            nb_frames_dup  = atomic_load(&ost->filter->nb_frames_dup);
-            nb_frames_drop = atomic_load(&ost->filter->nb_frames_drop);
+            if (ost->filter) {
+                nb_frames_dup  = atomic_load(&ost->filter->nb_frames_dup);
+                nb_frames_drop = atomic_load(&ost->filter->nb_frames_drop);
+            }
 
             vid = 1;
         }
-- 
2.44.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-08-14 13:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-30 18:03 [FFmpeg-devel] [PATCH] fftools/ffmpeg: show video stats in progress output without filters Jan Garcia via ffmpeg-devel
2024-08-01  7:41 ` Anton Khirnov
2024-08-02  8:25 Jan Garcia via ffmpeg-devel
2024-08-14 13:24 ` Anton Khirnov

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git