From 9cb58873324f99de0992b14a7907ec7146a9e1f0 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 22 Mar 2021 12:41:30 -0400 Subject: [PATCH] better debug logging when choosing codec --- src/zm_videostore.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/zm_videostore.cpp b/src/zm_videostore.cpp index 1ffc69e90..4d4bf7e6d 100644 --- a/src/zm_videostore.cpp +++ b/src/zm_videostore.cpp @@ -155,7 +155,7 @@ bool VideoStore::open() { wanted_codec = AV_CODEC_ID_H264; // FIXME what is the optimal codec? Probably low latency h264 which is effectively mjpeg } else { - Debug(2, "Codec wanted %d", wanted_codec); + Debug(2, "Codec wanted %d %s", wanted_codec, avcodec_get_name((AVCodecID)wanted_codec)); } std::string wanted_encoder = monitor->Encoder(); @@ -167,7 +167,12 @@ bool VideoStore::open() { } } if ( codec_data[i].codec_id != wanted_codec ) { - Debug(1, "Not the right codec %d != %d", codec_data[i].codec_id, wanted_codec); + Debug(1, "Not the right codec %d %s != %d %s", + codec_data[i].codec_id, + avcodec_get_name(codec_data[i].codec_id), + wanted_codec, + avcodec_get_name((AVCodecID)wanted_codec) + ); continue; }