<h3 dir="auto">System Information</h3>
<p dir="auto">Debian GNU/Linux<br>
OpenCV version: 4.6.0</p>
<h3 dir="auto">Detailed description</h3>
<p dir="auto">4.6 builds for these modules</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="core,highgui,imgcodecs,imgproc"><pre class="notranslate"><code class="notranslate">core,highgui,imgcodecs,imgproc
</code></pre></div>
<p dir="auto">or with all modules, but fails if <code class="notranslate">videoio</code> is added:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="core,highgui,imgcodecs,imgproc,videoio"><pre class="notranslate"><code class="notranslate">core,highgui,imgcodecs,imgproc,videoio
</code></pre></div>
<h3 dir="auto">Steps to reproduce</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="git clone --depth 1 --branch 4.6.0 https://github.com/opencv/opencv.git opencv-4.6.0
mv opencv-4.6.0 opencv
mkdir -p build &amp;&amp; cd build
cmake -DBUILD_LIST=core,highgui,imgcodecs,imgproc,videoio ../opencv
make -j4

opencv/modules/videoio/src/ffmpeg_codecs.hpp:81:26: error: ‘CODEC_ID_H264’ was not declared in this scope; did you mean ‘AV_CODEC_ID_H264’?
81 | #define AV_CODEC_ID_H264 CODEC_ID_H264
| ^~~~~~~~~~~~~"><pre class="notranslate">git clone --depth 1 --branch 4.6.0 https://github.com/opencv/opencv.git opencv-4.6.0
mv opencv-4.6.0 opencv
mkdir -p build <span class="pl-k">&amp;&amp;</span> <span class="pl-c1">cd</span> build
cmake -DBUILD_LIST=core,highgui,imgcodecs,imgproc,videoio ../opencv
make -j4

opencv/modules/videoio/src/ffmpeg_codecs.hpp:81:26: error: ‘CODEC_ID_H264’ was not declared <span class="pl-k">in</span> this scope<span class="pl-k">;</span> did you mean ‘AV_CODEC_ID_H264’<span class="pl-k">?</span>
81 <span class="pl-k">|</span> <span class="pl-c"><span class="pl-c">#</span>define AV_CODEC_ID_H264 CODEC_ID_H264</span>
<span class="pl-k">|</span> ^~~~~~~~~~~~~</pre></div>
<h3 dir="auto">Issue submission checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I report the issue, it's not a question</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I updated to the latest OpenCV version and the issue is still there</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> There is reproducer code and related data files (videos, images, onnx, etc)</li>
</ul>
<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; 4.6</li>
<li>Operating System / Platform =&gt; macOS Monterey, Arch Linux</li>
<li>Compiler =&gt; XCode toolchain (Mac), GCC toolchain (Arch Linux)</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">OpenCV compilation fails when FFmpeg 5.1 is installed on the system (no issue with 5.0.x and earlier versions). Here is the associated error message on Mac (the error message is somewhat similar on Arch Linux):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:80:6: warning: 'LIBAVCODEC_VERSION_INT' is not defined, evaluates to 0 [-Wundef]
#if (LIBAVCODEC_VERSION_INT &lt;= AV_VERSION_INT(54, 51, 100))
     ^
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:146:7: error: use of undeclared identifier 'CODEC_ID_H264'; did you mean 'AV_CODEC_ID_H264'?
    { AV_CODEC_ID_H264, MKTAG('H', '2', '6', '4') },
      ^~~~~~~~~~~~~~~~
      AV_CODEC_ID_H264
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:81:26: note: expanded from macro 'AV_CODEC_ID_H264'
#define AV_CODEC_ID_H264 CODEC_ID_H264
                         ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:77:5: note: 'AV_CODEC_ID_H264' declared here
    AV_CODEC_ID_H264,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:147:7: error: use of undeclared identifier 'CODEC_ID_H264'; did you mean 'AV_CODEC_ID_H264'?
    { AV_CODEC_ID_H264, MKTAG('h', '2', '6', '4') },
      ^~~~~~~~~~~~~~~~
      AV_CODEC_ID_H264
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:81:26: note: expanded from macro 'AV_CODEC_ID_H264'
#define AV_CODEC_ID_H264 CODEC_ID_H264
                         ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:77:5: note: 'AV_CODEC_ID_H264' declared here
    AV_CODEC_ID_H264,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:148:7: error: use of undeclared identifier 'CODEC_ID_H264'; did you mean 'AV_CODEC_ID_H264'?
    { AV_CODEC_ID_H264, MKTAG('X', '2', '6', '4') },
      ^~~~~~~~~~~~~~~~
      AV_CODEC_ID_H264
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:81:26: note: expanded from macro 'AV_CODEC_ID_H264'
#define AV_CODEC_ID_H264 CODEC_ID_H264
                         ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:77:5: note: 'AV_CODEC_ID_H264' declared here
    AV_CODEC_ID_H264,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:149:7: error: use of undeclared identifier 'CODEC_ID_H264'; did you mean 'AV_CODEC_ID_H264'?
    { AV_CODEC_ID_H264, MKTAG('x', '2', '6', '4') },
      ^~~~~~~~~~~~~~~~
      AV_CODEC_ID_H264
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:81:26: note: expanded from macro 'AV_CODEC_ID_H264'
#define AV_CODEC_ID_H264 CODEC_ID_H264
                         ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:77:5: note: 'AV_CODEC_ID_H264' declared here
    AV_CODEC_ID_H264,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:150:7: error: use of undeclared identifier 'CODEC_ID_H264'; did you mean 'AV_CODEC_ID_H264'?
    { AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') },
      ^~~~~~~~~~~~~~~~
      AV_CODEC_ID_H264
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:81:26: note: expanded from macro 'AV_CODEC_ID_H264'
#define AV_CODEC_ID_H264 CODEC_ID_H264
                         ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:77:5: note: 'AV_CODEC_ID_H264' declared here
    AV_CODEC_ID_H264,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:151:7: error: use of undeclared identifier 'CODEC_ID_H264'; did you mean 'AV_CODEC_ID_H264'?
    { AV_CODEC_ID_H264, MKTAG('V', 'S', 'S', 'H') },
      ^~~~~~~~~~~~~~~~
      AV_CODEC_ID_H264
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:81:26: note: expanded from macro 'AV_CODEC_ID_H264'
#define AV_CODEC_ID_H264 CODEC_ID_H264
                         ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:77:5: note: 'AV_CODEC_ID_H264' declared here
    AV_CODEC_ID_H264,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:153:7: error: use of undeclared identifier 'CODEC_ID_H263'; did you mean 'AV_CODEC_ID_H263'?
    { AV_CODEC_ID_H263, MKTAG('H', '2', '6', '3') },
      ^~~~~~~~~~~~~~~~
      AV_CODEC_ID_H263
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:82:26: note: expanded from macro 'AV_CODEC_ID_H263'
#define AV_CODEC_ID_H263 CODEC_ID_H263
                         ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:54:5: note: 'AV_CODEC_ID_H263' declared here
    AV_CODEC_ID_H263,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:154:7: error: use of undeclared identifier 'CODEC_ID_H263P'; did you mean 'AV_CODEC_ID_H263P'?
    { AV_CODEC_ID_H263P, MKTAG('H', '2', '6', '3') },
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_H263P
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:83:27: note: expanded from macro 'AV_CODEC_ID_H263P'
#define AV_CODEC_ID_H263P CODEC_ID_H263P
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:69:5: note: 'AV_CODEC_ID_H263P' declared here
    AV_CODEC_ID_H263P,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:155:7: error: use of undeclared identifier 'CODEC_ID_H263I'; did you mean 'AV_CODEC_ID_H263I'?
    { AV_CODEC_ID_H263I, MKTAG('I', '2', '6', '3') }, /* intel h263 */
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_H263I
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:84:27: note: expanded from macro 'AV_CODEC_ID_H263I'
#define AV_CODEC_ID_H263I CODEC_ID_H263I
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:70:5: note: 'AV_CODEC_ID_H263I' declared here
    AV_CODEC_ID_H263I,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:156:7: error: use of undeclared identifier 'CODEC_ID_H261'; did you mean 'AV_CODEC_ID_H261'?
    { AV_CODEC_ID_H261, MKTAG('H', '2', '6', '1') },
      ^~~~~~~~~~~~~~~~
      AV_CODEC_ID_H261
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:85:26: note: expanded from macro 'AV_CODEC_ID_H261'
#define AV_CODEC_ID_H261 CODEC_ID_H261
                         ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:53:5: note: 'AV_CODEC_ID_H261' declared here
    AV_CODEC_ID_H261,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:159:7: error: use of undeclared identifier 'CODEC_ID_H263P'; did you mean 'AV_CODEC_ID_H263P'?
    { AV_CODEC_ID_H263P, MKTAG('U', '2', '6', '3') },
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_H263P
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:83:27: note: expanded from macro 'AV_CODEC_ID_H263P'
#define AV_CODEC_ID_H263P CODEC_ID_H263P
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:69:5: note: 'AV_CODEC_ID_H263P' declared here
    AV_CODEC_ID_H263P,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:160:7: error: use of undeclared identifier 'CODEC_ID_H263P'; did you mean 'AV_CODEC_ID_H263P'?
    { AV_CODEC_ID_H263P, MKTAG('v', 'i', 'v', '1') },
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_H263P
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:83:27: note: expanded from macro 'AV_CODEC_ID_H263P'
#define AV_CODEC_ID_H263P CODEC_ID_H263P
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:69:5: note: 'AV_CODEC_ID_H263P' declared here
    AV_CODEC_ID_H263P,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:162:7: error: use of undeclared identifier 'CODEC_ID_MPEG4'; did you mean 'AV_CODEC_ID_MPEG4'?
    { AV_CODEC_ID_MPEG4, MKTAG('F', 'M', 'P', '4') },
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_MPEG4
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:86:27: note: expanded from macro 'AV_CODEC_ID_MPEG4'
#define AV_CODEC_ID_MPEG4 CODEC_ID_MPEG4
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:62:5: note: 'AV_CODEC_ID_MPEG4' declared here
    AV_CODEC_ID_MPEG4,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:163:7: error: use of undeclared identifier 'CODEC_ID_MPEG4'; did you mean 'AV_CODEC_ID_MPEG4'?
    { AV_CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', 'X') },
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_MPEG4
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:86:27: note: expanded from macro 'AV_CODEC_ID_MPEG4'
#define AV_CODEC_ID_MPEG4 CODEC_ID_MPEG4
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:62:5: note: 'AV_CODEC_ID_MPEG4' declared here
    AV_CODEC_ID_MPEG4,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:164:7: error: use of undeclared identifier 'CODEC_ID_MPEG4'; did you mean 'AV_CODEC_ID_MPEG4'?
    { AV_CODEC_ID_MPEG4, MKTAG('D', 'X', '5', '0') },
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_MPEG4
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:86:27: note: expanded from macro 'AV_CODEC_ID_MPEG4'
#define AV_CODEC_ID_MPEG4 CODEC_ID_MPEG4
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:62:5: note: 'AV_CODEC_ID_MPEG4' declared here
    AV_CODEC_ID_MPEG4,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:165:7: error: use of undeclared identifier 'CODEC_ID_MPEG4'; did you mean 'AV_CODEC_ID_MPEG4'?
    { AV_CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') },
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_MPEG4
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:86:27: note: expanded from macro 'AV_CODEC_ID_MPEG4'
#define AV_CODEC_ID_MPEG4 CODEC_ID_MPEG4
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:62:5: note: 'AV_CODEC_ID_MPEG4' declared here
    AV_CODEC_ID_MPEG4,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:166:7: error: use of undeclared identifier 'CODEC_ID_MPEG4'; did you mean 'AV_CODEC_ID_MPEG4'?
    { AV_CODEC_ID_MPEG4, MKTAG('M', 'P', '4', 'S') },
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_MPEG4
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:86:27: note: expanded from macro 'AV_CODEC_ID_MPEG4'
#define AV_CODEC_ID_MPEG4 CODEC_ID_MPEG4
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:62:5: note: 'AV_CODEC_ID_MPEG4' declared here
    AV_CODEC_ID_MPEG4,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:167:7: error: use of undeclared identifier 'CODEC_ID_MPEG4'; did you mean 'AV_CODEC_ID_MPEG4'?
    { AV_CODEC_ID_MPEG4, MKTAG('M', '4', 'S', '2') },
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_MPEG4
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:86:27: note: expanded from macro 'AV_CODEC_ID_MPEG4'
#define AV_CODEC_ID_MPEG4 CODEC_ID_MPEG4
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:62:5: note: 'AV_CODEC_ID_MPEG4' declared here
    AV_CODEC_ID_MPEG4,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:168:7: error: use of undeclared identifier 'CODEC_ID_MPEG4'; did you mean 'AV_CODEC_ID_MPEG4'?
    { AV_CODEC_ID_MPEG4, MKTAG(0x04, 0, 0, 0) }, /* some broken avi use this */
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_MPEG4
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:86:27: note: expanded from macro 'AV_CODEC_ID_MPEG4'
#define AV_CODEC_ID_MPEG4 CODEC_ID_MPEG4
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:62:5: note: 'AV_CODEC_ID_MPEG4' declared here
    AV_CODEC_ID_MPEG4,
    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o] Error 1
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
make: *** [all] Error 2"><pre class="notranslate"><code class="notranslate">In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:80:6: warning: 'LIBAVCODEC_VERSION_INT' is not defined, evaluates to 0 [-Wundef]
#if (LIBAVCODEC_VERSION_INT &lt;= AV_VERSION_INT(54, 51, 100))
     ^
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:146:7: error: use of undeclared identifier 'CODEC_ID_H264'; did you mean 'AV_CODEC_ID_H264'?
    { AV_CODEC_ID_H264, MKTAG('H', '2', '6', '4') },
      ^~~~~~~~~~~~~~~~
      AV_CODEC_ID_H264
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:81:26: note: expanded from macro 'AV_CODEC_ID_H264'
#define AV_CODEC_ID_H264 CODEC_ID_H264
                         ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:77:5: note: 'AV_CODEC_ID_H264' declared here
    AV_CODEC_ID_H264,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:147:7: error: use of undeclared identifier 'CODEC_ID_H264'; did you mean 'AV_CODEC_ID_H264'?
    { AV_CODEC_ID_H264, MKTAG('h', '2', '6', '4') },
      ^~~~~~~~~~~~~~~~
      AV_CODEC_ID_H264
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:81:26: note: expanded from macro 'AV_CODEC_ID_H264'
#define AV_CODEC_ID_H264 CODEC_ID_H264
                         ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:77:5: note: 'AV_CODEC_ID_H264' declared here
    AV_CODEC_ID_H264,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:148:7: error: use of undeclared identifier 'CODEC_ID_H264'; did you mean 'AV_CODEC_ID_H264'?
    { AV_CODEC_ID_H264, MKTAG('X', '2', '6', '4') },
      ^~~~~~~~~~~~~~~~
      AV_CODEC_ID_H264
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:81:26: note: expanded from macro 'AV_CODEC_ID_H264'
#define AV_CODEC_ID_H264 CODEC_ID_H264
                         ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:77:5: note: 'AV_CODEC_ID_H264' declared here
    AV_CODEC_ID_H264,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:149:7: error: use of undeclared identifier 'CODEC_ID_H264'; did you mean 'AV_CODEC_ID_H264'?
    { AV_CODEC_ID_H264, MKTAG('x', '2', '6', '4') },
      ^~~~~~~~~~~~~~~~
      AV_CODEC_ID_H264
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:81:26: note: expanded from macro 'AV_CODEC_ID_H264'
#define AV_CODEC_ID_H264 CODEC_ID_H264
                         ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:77:5: note: 'AV_CODEC_ID_H264' declared here
    AV_CODEC_ID_H264,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:150:7: error: use of undeclared identifier 'CODEC_ID_H264'; did you mean 'AV_CODEC_ID_H264'?
    { AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') },
      ^~~~~~~~~~~~~~~~
      AV_CODEC_ID_H264
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:81:26: note: expanded from macro 'AV_CODEC_ID_H264'
#define AV_CODEC_ID_H264 CODEC_ID_H264
                         ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:77:5: note: 'AV_CODEC_ID_H264' declared here
    AV_CODEC_ID_H264,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:151:7: error: use of undeclared identifier 'CODEC_ID_H264'; did you mean 'AV_CODEC_ID_H264'?
    { AV_CODEC_ID_H264, MKTAG('V', 'S', 'S', 'H') },
      ^~~~~~~~~~~~~~~~
      AV_CODEC_ID_H264
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:81:26: note: expanded from macro 'AV_CODEC_ID_H264'
#define AV_CODEC_ID_H264 CODEC_ID_H264
                         ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:77:5: note: 'AV_CODEC_ID_H264' declared here
    AV_CODEC_ID_H264,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:153:7: error: use of undeclared identifier 'CODEC_ID_H263'; did you mean 'AV_CODEC_ID_H263'?
    { AV_CODEC_ID_H263, MKTAG('H', '2', '6', '3') },
      ^~~~~~~~~~~~~~~~
      AV_CODEC_ID_H263
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:82:26: note: expanded from macro 'AV_CODEC_ID_H263'
#define AV_CODEC_ID_H263 CODEC_ID_H263
                         ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:54:5: note: 'AV_CODEC_ID_H263' declared here
    AV_CODEC_ID_H263,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:154:7: error: use of undeclared identifier 'CODEC_ID_H263P'; did you mean 'AV_CODEC_ID_H263P'?
    { AV_CODEC_ID_H263P, MKTAG('H', '2', '6', '3') },
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_H263P
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:83:27: note: expanded from macro 'AV_CODEC_ID_H263P'
#define AV_CODEC_ID_H263P CODEC_ID_H263P
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:69:5: note: 'AV_CODEC_ID_H263P' declared here
    AV_CODEC_ID_H263P,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:155:7: error: use of undeclared identifier 'CODEC_ID_H263I'; did you mean 'AV_CODEC_ID_H263I'?
    { AV_CODEC_ID_H263I, MKTAG('I', '2', '6', '3') }, /* intel h263 */
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_H263I
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:84:27: note: expanded from macro 'AV_CODEC_ID_H263I'
#define AV_CODEC_ID_H263I CODEC_ID_H263I
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:70:5: note: 'AV_CODEC_ID_H263I' declared here
    AV_CODEC_ID_H263I,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:156:7: error: use of undeclared identifier 'CODEC_ID_H261'; did you mean 'AV_CODEC_ID_H261'?
    { AV_CODEC_ID_H261, MKTAG('H', '2', '6', '1') },
      ^~~~~~~~~~~~~~~~
      AV_CODEC_ID_H261
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:85:26: note: expanded from macro 'AV_CODEC_ID_H261'
#define AV_CODEC_ID_H261 CODEC_ID_H261
                         ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:53:5: note: 'AV_CODEC_ID_H261' declared here
    AV_CODEC_ID_H261,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:159:7: error: use of undeclared identifier 'CODEC_ID_H263P'; did you mean 'AV_CODEC_ID_H263P'?
    { AV_CODEC_ID_H263P, MKTAG('U', '2', '6', '3') },
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_H263P
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:83:27: note: expanded from macro 'AV_CODEC_ID_H263P'
#define AV_CODEC_ID_H263P CODEC_ID_H263P
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:69:5: note: 'AV_CODEC_ID_H263P' declared here
    AV_CODEC_ID_H263P,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:160:7: error: use of undeclared identifier 'CODEC_ID_H263P'; did you mean 'AV_CODEC_ID_H263P'?
    { AV_CODEC_ID_H263P, MKTAG('v', 'i', 'v', '1') },
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_H263P
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:83:27: note: expanded from macro 'AV_CODEC_ID_H263P'
#define AV_CODEC_ID_H263P CODEC_ID_H263P
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:69:5: note: 'AV_CODEC_ID_H263P' declared here
    AV_CODEC_ID_H263P,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:162:7: error: use of undeclared identifier 'CODEC_ID_MPEG4'; did you mean 'AV_CODEC_ID_MPEG4'?
    { AV_CODEC_ID_MPEG4, MKTAG('F', 'M', 'P', '4') },
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_MPEG4
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:86:27: note: expanded from macro 'AV_CODEC_ID_MPEG4'
#define AV_CODEC_ID_MPEG4 CODEC_ID_MPEG4
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:62:5: note: 'AV_CODEC_ID_MPEG4' declared here
    AV_CODEC_ID_MPEG4,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:163:7: error: use of undeclared identifier 'CODEC_ID_MPEG4'; did you mean 'AV_CODEC_ID_MPEG4'?
    { AV_CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', 'X') },
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_MPEG4
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:86:27: note: expanded from macro 'AV_CODEC_ID_MPEG4'
#define AV_CODEC_ID_MPEG4 CODEC_ID_MPEG4
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:62:5: note: 'AV_CODEC_ID_MPEG4' declared here
    AV_CODEC_ID_MPEG4,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:164:7: error: use of undeclared identifier 'CODEC_ID_MPEG4'; did you mean 'AV_CODEC_ID_MPEG4'?
    { AV_CODEC_ID_MPEG4, MKTAG('D', 'X', '5', '0') },
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_MPEG4
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:86:27: note: expanded from macro 'AV_CODEC_ID_MPEG4'
#define AV_CODEC_ID_MPEG4 CODEC_ID_MPEG4
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:62:5: note: 'AV_CODEC_ID_MPEG4' declared here
    AV_CODEC_ID_MPEG4,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:165:7: error: use of undeclared identifier 'CODEC_ID_MPEG4'; did you mean 'AV_CODEC_ID_MPEG4'?
    { AV_CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') },
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_MPEG4
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:86:27: note: expanded from macro 'AV_CODEC_ID_MPEG4'
#define AV_CODEC_ID_MPEG4 CODEC_ID_MPEG4
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:62:5: note: 'AV_CODEC_ID_MPEG4' declared here
    AV_CODEC_ID_MPEG4,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:166:7: error: use of undeclared identifier 'CODEC_ID_MPEG4'; did you mean 'AV_CODEC_ID_MPEG4'?
    { AV_CODEC_ID_MPEG4, MKTAG('M', 'P', '4', 'S') },
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_MPEG4
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:86:27: note: expanded from macro 'AV_CODEC_ID_MPEG4'
#define AV_CODEC_ID_MPEG4 CODEC_ID_MPEG4
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:62:5: note: 'AV_CODEC_ID_MPEG4' declared here
    AV_CODEC_ID_MPEG4,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:167:7: error: use of undeclared identifier 'CODEC_ID_MPEG4'; did you mean 'AV_CODEC_ID_MPEG4'?
    { AV_CODEC_ID_MPEG4, MKTAG('M', '4', 'S', '2') },
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_MPEG4
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:86:27: note: expanded from macro 'AV_CODEC_ID_MPEG4'
#define AV_CODEC_ID_MPEG4 CODEC_ID_MPEG4
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:62:5: note: 'AV_CODEC_ID_MPEG4' declared here
    AV_CODEC_ID_MPEG4,
    ^
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg.cpp:50:
In file included from /var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:81:
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:168:7: error: use of undeclared identifier 'CODEC_ID_MPEG4'; did you mean 'AV_CODEC_ID_MPEG4'?
    { AV_CODEC_ID_MPEG4, MKTAG(0x04, 0, 0, 0) }, /* some broken avi use this */
      ^~~~~~~~~~~~~~~~~
      AV_CODEC_ID_MPEG4
/var/folders/ty/hlxp4fjd4dlcm9y08gnxgtyw0000gn/T/Rtmpmy3YCG/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:86:27: note: expanded from macro 'AV_CODEC_ID_MPEG4'
#define AV_CODEC_ID_MPEG4 CODEC_ID_MPEG4
                          ^
/opt/homebrew/Cellar/ffmpeg/5.1-with-options_2/include/libavcodec/codec_id.h:62:5: note: 'AV_CODEC_ID_MPEG4' declared here
    AV_CODEC_ID_MPEG4,
    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o] Error 1
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
make: *** [all] Error 2
</code></pre></div>
<h5 dir="auto">Steps to reproduce</h5>

<h5 dir="auto">Issue submission checklist</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I report the issue, it's not a question

</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I checked the problem with documentation, FAQ, open issues,<br>
forum.opencv.org, Stack Overflow, etc and have not found any solution

</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I updated to the latest OpenCV version and the issue is still there

</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> There is reproducer code and related data files: videos, images, onnx, etc

</li>
</ul>