[FFmpeg-devel] [PATCH 2/2] fftools/ffmpeg: log skipped initial non-keyframes
Stephan Hilb
stephan at ecshi.net
Thu Jun 6 23:31:45 EEST 2019
If `AV_PKT_FLAG_KEY` stays unset on `pkt->flags`, the output stream
stays empty with little information about what is going on.
This change makes it easier to debug the situation for the user who
could then choose to use the `-copyinkf` option.
---
fftools/ffmpeg.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 01f04103cf..446439e285 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -2006,8 +2006,10 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
}
if ((!ost->frame_number && !(pkt->flags & AV_PKT_FLAG_KEY)) &&
- !ost->copy_initial_nonkeyframes)
+ !ost->copy_initial_nonkeyframes) {
+ av_log(NULL, AV_LOG_DEBUG, "skipping initial non-keyframe\n");
return;
+ }
if (!ost->frame_number && !ost->copy_prior_start) {
int64_t comp_start = start_time;
--
2.21.0
More information about the ffmpeg-devel
mailing list