[FFmpeg-cvslog] vf_showinfo: minimum widths for some early fields

Peter Cordes git at videolan.org
Wed Mar 4 21:51:57 CET 2015


ffmpeg | branch: master | Peter Cordes <peter at cordes.ca> | Wed Jan 14 23:06:51 2015 -0400| [44d347726475448a2e87141f10379959d399d776] | committer: Michael Niedermayer

vf_showinfo: minimum widths for some early fields

Depending on FPS, the pts_time string often changes length:
... pts_time:36.1 ...
... pts_time:36.1333 ...
etc.

 The length changes make the output bounce around horribly, making it
hard to scan down a column farther right than pts_time.

The solution is to set minimum widths for n, pts, pts_time, and pos.
This patch doesn't touch any of the fields in mean / stddev.

 The widths aren't intended to be wide enough that they're never
exceeded, but you'll see only an occasional ripple to a new alignment,
rather than bouncing.  (Some fields, like pos, increase monotonically,
which is why I left the minimum width for the field be smaller than it
often gets to.)

Signed-off-by: Peter Cordes <peter at cordes.ca>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=44d347726475448a2e87141f10379959d399d776
---

 libavfilter/vf_showinfo.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
index 78ba4a0..5125944 100644
--- a/libavfilter/vf_showinfo.c
+++ b/libavfilter/vf_showinfo.c
@@ -104,7 +104,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
     }
 
     av_log(ctx, AV_LOG_INFO,
-           "n:%"PRId64" pts:%s pts_time:%s pos:%"PRId64" "
+           "n:%4"PRId64" pts:%7s pts_time:%-7s pos:%9"PRId64" "
            "fmt:%s sar:%d/%d s:%dx%d i:%c iskey:%d type:%c "
            "checksum:%08"PRIX32" plane_checksum:[%08"PRIX32,
            inlink->frame_count,



More information about the ffmpeg-cvslog mailing list