mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 22:00:25 +08:00
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:
commit
f644634aa6
@ -1120,6 +1120,7 @@ bool CvCapture_FFMPEG::open(const char* _filename, const VideoCaptureParameters&
|
|||||||
}
|
}
|
||||||
else
|
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))
|
#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);
|
av_dict_parse_string(&dict, options, ";", "|", 0);
|
||||||
#else
|
#else
|
||||||
@ -2915,7 +2916,9 @@ bool CvVideoWriter_FFMPEG::open( const char * filename, int fourcc,
|
|||||||
AVDictionary *dict = NULL;
|
AVDictionary *dict = NULL;
|
||||||
#if !defined(NO_GETENV) && (LIBAVUTIL_VERSION_MAJOR >= 53)
|
#if !defined(NO_GETENV) && (LIBAVUTIL_VERSION_MAJOR >= 53)
|
||||||
char* options = getenv("OPENCV_FFMPEG_WRITER_OPTIONS");
|
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);
|
av_dict_parse_string(&dict, options, ";", "|", 0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user