From bfd846bbffe88a00840b5e3a40d1a9cae142a525 Mon Sep 17 00:00:00 2001 From: Jon Burgess Date: Sun, 20 Mar 2016 21:44:58 +0000 Subject: [PATCH] Add more logging to diagnose problems with applying ffmpeg options --- src/zm_ffmpeg_camera.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/zm_ffmpeg_camera.cpp b/src/zm_ffmpeg_camera.cpp index 9e3a2960c..380e4ba39 100644 --- a/src/zm_ffmpeg_camera.cpp +++ b/src/zm_ffmpeg_camera.cpp @@ -257,6 +257,10 @@ int FfmpegCamera::OpenFfmpeg() { } } + else + { + Warning( "Unable to parse ffmpeg option %d '%s', expecting key=value", i, opVect[i].c_str() ); + } } Debug ( 1, "Calling avformat_open_input" ); @@ -272,6 +276,11 @@ int FfmpegCamera::OpenFfmpeg() { return -1; } + AVDictionaryEntry *e; + if ((e = av_dict_get(opts, "", NULL, AV_DICT_IGNORE_SUFFIX)) != NULL) { + Warning( "Option %s not recognized by ffmpeg", e->key); + } + mIsOpening = false; Debug ( 1, "Opened input" );