[FFmpeg-devel] [PATCH] ffmpeg: add packet duration to muxer logging

Jan Ekström jeebjp at gmail.com
Mon Jan 24 16:59:45 EET 2022


From: Jaakko Perttilä <jaakko.perttila at 24i.com>

Especially useful when debugging subtitle output.

Signed-off-by: Jan Ekström <jan.ekstrom at 24i.com>
---
 fftools/ffmpeg.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index c89d94520f..af65be157e 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -853,10 +853,11 @@ static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int u
 
     if (debug_ts) {
         av_log(NULL, AV_LOG_INFO, "muxer <- type:%s "
-                "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s size:%d\n",
+                "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s duration:%s duration_time:%s size:%d\n",
                 av_get_media_type_string(ost->enc_ctx->codec_type),
                 av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &ost->st->time_base),
                 av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &ost->st->time_base),
+                av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, &ost->st->time_base),
                 pkt->size
               );
     }
-- 
2.34.1



More information about the ffmpeg-devel mailing list