[FFmpeg-devel] [PATCH v3 0/3] Add option to log timing

ffmpegagent ffmpegagent at gmail.com
Fri Feb 7 03:26:32 EET 2025


This pathcset adds two logging flags: 'timing' and 'datetiming'.

Usage:

ffmpeg -loglevel +timing

or

ffmpeg -loglevel +datetiming

Update V1

 * Fix merge conflicts

Update V2

 * Rebased

Update V3

 * Fix print timing on exit (as reported by Michael Niedermayer)

softworkz (3):
  avutil/log: support logging of date and timing information
  fftools/opt_common: add timing and datetiming log flags
  doc/fftools-common-opts: document log timing flags

 doc/APIchanges               |  3 +++
 doc/fftools-common-opts.texi |  4 ++++
 fftools/ffmpeg.c             |  1 +
 fftools/opt_common.c         | 12 ++++++++++++
 libavutil/log.c              | 32 +++++++++++++++++++++++++++++---
 libavutil/log.h              | 10 ++++++++++
 libavutil/version.h          |  2 +-
 7 files changed, 60 insertions(+), 4 deletions(-)


base-commit: 4ba9ae7742a6f8a29d6486e25ff5709a075edb5b
Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-37%2Fsoftworkz%2Fsubmit_logtiming-v3
Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-37/softworkz/submit_logtiming-v3
Pull-Request: https://github.com/ffstaging/FFmpeg/pull/37

Range-diff vs v2:

 1:  13a7dc164b = 1:  13a7dc164b avutil/log: support logging of date and timing information
 2:  9eb9a6cf48 ! 2:  6c435fc02d fftools/opt_common: add timing and datetiming log flags
     @@ Commit message
      
          ffmpeg -loglevel +datetiming
      
     +    Setting av_log_set_flags(0) in term_exit in ffmpeg.c prevents
     +    timing to be printed when exiting.
     +
          Signed-off-by: softworkz <softworkz at hotmail.com>
      
     + ## fftools/ffmpeg.c ##
     +@@ fftools/ffmpeg.c: static void term_exit_sigsafe(void)
     + 
     + void term_exit(void)
     + {
     ++    av_log_set_flags(0);
     +     av_log(NULL, AV_LOG_QUIET, "%s", "");
     +     term_exit_sigsafe();
     + }
     +
       ## fftools/opt_common.c ##
      @@ fftools/opt_common.c: int opt_loglevel(void *optctx, const char *opt, const char *arg)
                   } else {
 3:  20e049c4c7 = 3:  f0aa91d5c1 doc/fftools-common-opts: document log timing flags

-- 
ffmpeg-codebot


More information about the ffmpeg-devel mailing list