Skip to content

Commit

Permalink
Merge pull request #22702 from kallaballa:ffmpeg_environment_variables
Browse files Browse the repository at this point in the history
Dump the values of OPENCV_FFMPEG_CAPTURE_OPTIONS and OPENCV_FFMPEG_WRITER_OPTIONS to debug log
  • Loading branch information
asmorkalov committed Oct 27, 2022
2 parents a60496f + 547f4c2 commit f644634
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/videoio/src/cap_ffmpeg_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f644634

Please sign in to comment.