Merge pull request #22702 from kallaballa:ffmpeg_environment_variables

Dump the values of OPENCV_FFMPEG_CAPTURE_OPTIONS and OPENCV_FFMPEG_WRITER_OPTIONS to debug log
This commit is contained in:
Alexander Smorkalov 2022-10-27 12:18:52 +03:00 committed by GitHub
commit f644634aa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1120,6 +1120,7 @@ bool CvCapture_FFMPEG::open(const char* _filename, const VideoCaptureParameters&
}
else
{
CV_LOG_DEBUG(NULL, "VIDEOIO/FFMPEG: using capture options from environment: " << options);
#if LIBAVUTIL_BUILD >= (LIBAVUTIL_VERSION_MICRO >= 100 ? CALC_FFMPEG_VERSION(52, 17, 100) : CALC_FFMPEG_VERSION(52, 7, 0))
av_dict_parse_string(&dict, options, ";", "|", 0);
#else
@ -2915,7 +2916,9 @@ bool CvVideoWriter_FFMPEG::open( const char * filename, int fourcc,
AVDictionary *dict = NULL;
#if !defined(NO_GETENV) && (LIBAVUTIL_VERSION_MAJOR >= 53)
char* options = getenv("OPENCV_FFMPEG_WRITER_OPTIONS");
if (options) {
if (options)
{
CV_LOG_DEBUG(NULL, "VIDEOIO/FFMPEG: using writer options from environment: " << options);
av_dict_parse_string(&dict, options, ";", "|", 0);
}
#endif