aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg_enc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-12-14 19:26:56 +0100
committerAnton Khirnov <anton@khirnov.net>2023-12-18 08:50:02 +0100
commit02a43936476ad69f4957c8444a740bdb394bde37 (patch)
treedfaeef73a85617d60d1698bf18234b94a74b2222 /fftools/ffmpeg_enc.c
parent23c00d8c8955aa0023c4cfcbd0e9f132367c9d42 (diff)
downloadffmpeg-02a43936476ad69f4957c8444a740bdb394bde37.tar.gz
fftools/ffmpeg: print keyframe information with -stats_*
Diffstat (limited to 'fftools/ffmpeg_enc.c')
-rw-r--r--fftools/ffmpeg_enc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c
index 9141dab6a4..d774a7e008 100644
--- a/fftools/ffmpeg_enc.c
+++ b/fftools/ffmpeg_enc.c
@@ -520,6 +520,8 @@ void enc_stats_write(OutputStream *ost, EncStats *es,
case ENC_STATS_DTS: avio_printf(io, "%"PRId64, pkt->dts); continue;
case ENC_STATS_DTS_TIME: avio_printf(io, "%g", pkt->dts * av_q2d(tb)); continue;
case ENC_STATS_PKT_SIZE: avio_printf(io, "%d", pkt->size); continue;
+ case ENC_STATS_KEYFRAME: avio_write(io, (pkt->flags & AV_PKT_FLAG_KEY) ?
+ "K" : "N", 1); continue;
case ENC_STATS_BITRATE: {
double duration = FFMAX(pkt->duration, 1) * av_q2d(tb);
avio_printf(io, "%g", 8.0 * pkt->size / duration);