I have tried almost all the blogs pertaining to the installation of OpenCv but I can't perform the make step.
I am getting the following problem
Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o
In file included from /home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:65:0,
from /home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:98:7: error: ‘CODEC_ID_H264’ was not declared in this scope
{ CODEC_ID_H264, MKTAG('H', '2', '6', '4') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:99:7: error: ‘CODEC_ID_H264’ was not declared in this scope
{ CODEC_ID_H264, MKTAG('h', '2', '6', '4') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:100:7: error: ‘CODEC_ID_H264’ was not declared in this scope
{ CODEC_ID_H264, MKTAG('X', '2', '6', '4') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:101:7: error: ‘CODEC_ID_H264’ was not declared in this scope
{ CODEC_ID_H264, MKTAG('x', '2', '6', '4') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:102:7: error: ‘CODEC_ID_H264’ was not declared in this scope
{ CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:103:7: error: ‘CODEC_ID_H264’ was not declared in this scope
{ CODEC_ID_H264, MKTAG('V', 'S', 'S', 'H') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:105:7: error: ‘CODEC_ID_H263’ was not declared in this scope
{ CODEC_ID_H263, MKTAG('H', '2', '6', '3') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:106:7: error: ‘CODEC_ID_H263P’ was not declared in this scope
{ CODEC_ID_H263P, MKTAG('H', '2', '6', '3') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:107:7: error: ‘CODEC_ID_H263I’ was not declared in this scope
{ CODEC_ID_H263I, MKTAG('I', '2', '6', '3') }, /* intel h263 */
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:108:7: error: ‘CODEC_ID_H261’ was not declared in this scope
{ CODEC_ID_H261, MKTAG('H', '2', '6', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:111:7: error: ‘CODEC_ID_H263P’ was not declared in this scope
{ CODEC_ID_H263P, MKTAG('U', '2', '6', '3') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:112:7: error: ‘CODEC_ID_H263P’ was not declared in this scope
{ CODEC_ID_H263P, MKTAG('v', 'i', 'v', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:114:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('F', 'M', 'P', '4') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:115:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', 'X') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:116:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('D', 'X', '5', '0') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:117:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:118:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('M', 'P', '4', 'S') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:119:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('M', '4', 'S', '2') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:120:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG(0x04, 0, 0, 0) }, /* some broken avi use this */
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:123:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:124:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('B', 'L', 'Z', '0') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:125:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('m', 'p', '4', 'v') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:126:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('U', 'M', 'P', '4') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:127:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('W', 'V', '1', 'F') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:128:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('S', 'E', 'D', 'G') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:130:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('R', 'M', 'P', '4') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:132:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope
{ CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '3') }, /* default signature when using MSMPEG4 */
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:133:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope
{ CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', '4', '3') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:136:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope
{ CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', 'G', '3') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:137:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope
{ CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '5') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:138:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope
{ CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '6') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:139:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope
{ CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '4') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:140:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope
{ CODEC_ID_MSMPEG4V3, MKTAG('A', 'P', '4', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:141:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope
{ CODEC_ID_MSMPEG4V3, MKTAG('C', 'O', 'L', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:142:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope
{ CODEC_ID_MSMPEG4V3, MKTAG('C', 'O', 'L', '0') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:144:7: error: ‘CODEC_ID_MSMPEG4V2’ was not declared in this scope
{ CODEC_ID_MSMPEG4V2, MKTAG('M', 'P', '4', '2') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:147:7: error: ‘CODEC_ID_MSMPEG4V2’ was not declared in this scope
{ CODEC_ID_MSMPEG4V2, MKTAG('D', 'I', 'V', '2') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:149:7: error: ‘CODEC_ID_MSMPEG4V1’ was not declared in this scope
{ CODEC_ID_MSMPEG4V1, MKTAG('M', 'P', 'G', '4') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:151:7: error: ‘CODEC_ID_WMV1’ was not declared in this scope
{ CODEC_ID_WMV1, MKTAG('W', 'M', 'V', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:154:7: error: ‘CODEC_ID_WMV2’ was not declared in this scope
{ CODEC_ID_WMV2, MKTAG('W', 'M', 'V', '2') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:155:7: error: ‘CODEC_ID_DVVIDEO’ was not declared in this scope
{ CODEC_ID_DVVIDEO, MKTAG('d', 'v', 's', 'd') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:156:7: error: ‘CODEC_ID_DVVIDEO’ was not declared in this scope
{ CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', 'd') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:157:7: error: ‘CODEC_ID_DVVIDEO’ was not declared in this scope
{ CODEC_ID_DVVIDEO, MKTAG('d', 'v', 's', 'l') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:158:7: error: ‘CODEC_ID_DVVIDEO’ was not declared in this scope
{ CODEC_ID_DVVIDEO, MKTAG('d', 'v', '2', '5') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:159:7: error: ‘CODEC_ID_MPEG1VIDEO’ was not declared in this scope
{ CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'g', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:160:7: error: ‘CODEC_ID_MPEG1VIDEO’ was not declared in this scope
{ CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'g', '2') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:161:7: error: ‘CODEC_ID_MPEG2VIDEO’ was not declared in this scope
{ CODEC_ID_MPEG2VIDEO, MKTAG('m', 'p', 'g', '2') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:162:7: error: ‘CODEC_ID_MPEG2VIDEO’ was not declared in this scope
{ CODEC_ID_MPEG2VIDEO, MKTAG('M', 'P', 'E', 'G') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:163:7: error: ‘CODEC_ID_MPEG1VIDEO’ was not declared in this scope
{ CODEC_ID_MPEG1VIDEO, MKTAG('P', 'I', 'M', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:164:7: error: ‘CODEC_ID_MPEG1VIDEO’ was not declared in this scope
{ CODEC_ID_MPEG1VIDEO, MKTAG('V', 'C', 'R', '2') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:165:7: error: ‘CODEC_ID_MPEG1VIDEO’ was not declared in this scope
{ CODEC_ID_MPEG1VIDEO, 0x10000001 },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:166:7: error: ‘CODEC_ID_MPEG2VIDEO’ was not declared in this scope
{ CODEC_ID_MPEG2VIDEO, 0x10000002 },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:167:7: error: ‘CODEC_ID_MPEG2VIDEO’ was not declared in this scope
{ CODEC_ID_MPEG2VIDEO, MKTAG('D', 'V', 'R', ' ') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:168:7: error: ‘CODEC_ID_MPEG2VIDEO’ was not declared in this scope
{ CODEC_ID_MPEG2VIDEO, MKTAG('M', 'M', 'E', 'S') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:169:7: error: ‘CODEC_ID_MJPEG’ was not declared in this scope
{ CODEC_ID_MJPEG, MKTAG('M', 'J', 'P', 'G') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:170:7: error: ‘CODEC_ID_MJPEG’ was not declared in this scope
{ CODEC_ID_MJPEG, MKTAG('L', 'J', 'P', 'G') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:171:7: error: ‘CODEC_ID_LJPEG’ was not declared in this scope
{ CODEC_ID_LJPEG, MKTAG('L', 'J', 'P', 'G') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:172:7: error: ‘CODEC_ID_MJPEG’ was not declared in this scope
{ CODEC_ID_MJPEG, MKTAG('J', 'P', 'G', 'L') }, /* Pegasus lossless JPEG */
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:173:7: error: ‘CODEC_ID_MJPEG’ was not declared in this scope
{ CODEC_ID_MJPEG, MKTAG('M', 'J', 'L', 'S') }, /* JPEG-LS custom FOURCC for avi - decoder */
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:174:7: error: ‘CODEC_ID_MJPEG’ was not declared in this scope
{ CODEC_ID_MJPEG, MKTAG('j', 'p', 'e', 'g') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:175:7: error: ‘CODEC_ID_MJPEG’ was not declared in this scope
{ CODEC_ID_MJPEG, MKTAG('I', 'J', 'P', 'G') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:176:7: error: ‘CODEC_ID_MJPEG’ was not declared in this scope
{ CODEC_ID_MJPEG, MKTAG('A', 'V', 'R', 'n') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:177:7: error: ‘CODEC_ID_HUFFYUV’ was not declared in this scope
{ CODEC_ID_HUFFYUV, MKTAG('H', 'F', 'Y', 'U') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:178:7: error: ‘CODEC_ID_FFVHUFF’ was not declared in this scope
{ CODEC_ID_FFVHUFF, MKTAG('F', 'F', 'V', 'H') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:179:7: error: ‘CODEC_ID_CYUV’ was not declared in this scope
{ CODEC_ID_CYUV, MKTAG('C', 'Y', 'U', 'V') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:180:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope
{ CODEC_ID_RAWVIDEO, 0 },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:181:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope
{ CODEC_ID_RAWVIDEO, MKTAG('I', '4', '2', '0') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:182:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope
{ CODEC_ID_RAWVIDEO, MKTAG('Y', 'U', 'Y', '2') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:183:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope
{ CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '2', '2') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:184:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope
{ CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '1', '2') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:185:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope
{ CODEC_ID_RAWVIDEO, MKTAG('U', 'Y', 'V', 'Y') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:186:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope
{ CODEC_ID_RAWVIDEO, MKTAG('I', 'Y', 'U', 'V') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:187:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope
{ CODEC_ID_RAWVIDEO, MKTAG('Y', '8', '0', '0') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:188:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope
{ CODEC_ID_RAWVIDEO, MKTAG('H', 'D', 'Y', 'C') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:189:7: error: ‘CODEC_ID_INDEO3’ was not declared in this scope
{ CODEC_ID_INDEO3, MKTAG('I', 'V', '3', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:190:7: error: ‘CODEC_ID_INDEO3’ was not declared in this scope
{ CODEC_ID_INDEO3, MKTAG('I', 'V', '3', '2') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:191:7: error: ‘CODEC_ID_VP3’ was not declared in this scope
{ CODEC_ID_VP3, MKTAG('V', 'P', '3', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:192:7: error: ‘CODEC_ID_VP3’ was not declared in this scope
{ CODEC_ID_VP3, MKTAG('V', 'P', '3', '0') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:193:7: error: ‘CODEC_ID_ASV1’ was not declared in this scope
{ CODEC_ID_ASV1, MKTAG('A', 'S', 'V', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:194:7: error: ‘CODEC_ID_ASV2’ was not declared in this scope
{ CODEC_ID_ASV2, MKTAG('A', 'S', 'V', '2') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:195:7: error: ‘CODEC_ID_VCR1’ was not declared in this scope
{ CODEC_ID_VCR1, MKTAG('V', 'C', 'R', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:196:7: error: ‘CODEC_ID_FFV1’ was not declared in this scope
{ CODEC_ID_FFV1, MKTAG('F', 'F', 'V', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:197:7: error: ‘CODEC_ID_XAN_WC4’ was not declared in this scope
{ CODEC_ID_XAN_WC4, MKTAG('X', 'x', 'a', 'n') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:198:7: error: ‘CODEC_ID_MSRLE’ was not declared in this scope
{ CODEC_ID_MSRLE, MKTAG('m', 'r', 'l', 'e') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:199:7: error: ‘CODEC_ID_MSRLE’ was not declared in this scope
{ CODEC_ID_MSRLE, MKTAG(0x1, 0x0, 0x0, 0x0) },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:200:7: error: ‘CODEC_ID_MSVIDEO1’ was not declared in this scope
{ CODEC_ID_MSVIDEO1, MKTAG('M', 'S', 'V', 'C') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:201:7: error: ‘CODEC_ID_MSVIDEO1’ was not declared in this scope
{ CODEC_ID_MSVIDEO1, MKTAG('m', 's', 'v', 'c') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:202:7: error: ‘CODEC_ID_MSVIDEO1’ was not declared in this scope
{ CODEC_ID_MSVIDEO1, MKTAG('C', 'R', 'A', 'M') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:203:7: error: ‘CODEC_ID_MSVIDEO1’ was not declared in this scope
{ CODEC_ID_MSVIDEO1, MKTAG('c', 'r', 'a', 'm') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:204:7: error: ‘CODEC_ID_MSVIDEO1’ was not declared in this scope
{ CODEC_ID_MSVIDEO1, MKTAG('W', 'H', 'A', 'M') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:205:7: error: ‘CODEC_ID_MSVIDEO1’ was not declared in this scope
{ CODEC_ID_MSVIDEO1, MKTAG('w', 'h', 'a', 'm') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:206:7: error: ‘CODEC_ID_CINEPAK’ was not declared in this scope
{ CODEC_ID_CINEPAK, MKTAG('c', 'v', 'i', 'd') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:207:7: error: ‘CODEC_ID_TRUEMOTION1’ was not declared in this scope
{ CODEC_ID_TRUEMOTION1, MKTAG('D', 'U', 'C', 'K') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:208:7: error: ‘CODEC_ID_MSZH’ was not declared in this scope
{ CODEC_ID_MSZH, MKTAG('M', 'S', 'Z', 'H') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:209:7: error: ‘CODEC_ID_ZLIB’ was not declared in this scope
{ CODEC_ID_ZLIB, MKTAG('Z', 'L', 'I', 'B') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:210:7: error: ‘CODEC_ID_SNOW’ was not declared in this scope
{ CODEC_ID_SNOW, MKTAG('S', 'N', 'O', 'W') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:211:7: error: ‘CODEC_ID_4XM’ was not declared in this scope
{ CODEC_ID_4XM, MKTAG('4', 'X', 'M', 'V') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:212:7: error: ‘CODEC_ID_FLV1’ was not declared in this scope
{ CODEC_ID_FLV1, MKTAG('F', 'L', 'V', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:213:7: error: ‘CODEC_ID_SVQ1’ was not declared in this scope
{ CODEC_ID_SVQ1, MKTAG('s', 'v', 'q', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:214:7: error: ‘CODEC_ID_TSCC’ was not declared in this scope
{ CODEC_ID_TSCC, MKTAG('t', 's', 'c', 'c') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:215:7: error: ‘CODEC_ID_ULTI’ was not declared in this scope
{ CODEC_ID_ULTI, MKTAG('U', 'L', 'T', 'I') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:216:7: error: ‘CODEC_ID_VIXL’ was not declared in this scope
{ CODEC_ID_VIXL, MKTAG('V', 'I', 'X', 'L') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:217:7: error: ‘CODEC_ID_QPEG’ was not declared in this scope
{ CODEC_ID_QPEG, MKTAG('Q', 'P', 'E', 'G') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:218:7: error: ‘CODEC_ID_QPEG’ was not declared in this scope
{ CODEC_ID_QPEG, MKTAG('Q', '1', '.', '0') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:219:7: error: ‘CODEC_ID_QPEG’ was not declared in this scope
{ CODEC_ID_QPEG, MKTAG('Q', '1', '.', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:220:7: error: ‘CODEC_ID_WMV3’ was not declared in this scope
{ CODEC_ID_WMV3, MKTAG('W', 'M', 'V', '3') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:221:7: error: ‘CODEC_ID_LOCO’ was not declared in this scope
{ CODEC_ID_LOCO, MKTAG('L', 'O', 'C', 'O') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:222:7: error: ‘CODEC_ID_THEORA’ was not declared in this scope
{ CODEC_ID_THEORA, MKTAG('t', 'h', 'e', 'o') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:224:7: error: ‘CODEC_ID_WNV1’ was not declared in this scope
{ CODEC_ID_WNV1, MKTAG('W', 'N', 'V', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:225:7: error: ‘CODEC_ID_AASC’ was not declared in this scope
{ CODEC_ID_AASC, MKTAG('A', 'A', 'S', 'C') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:226:7: error: ‘CODEC_ID_INDEO2’ was not declared in this scope
{ CODEC_ID_INDEO2, MKTAG('R', 'T', '2', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:227:7: error: ‘CODEC_ID_FRAPS’ was not declared in this scope
{ CODEC_ID_FRAPS, MKTAG('F', 'P', 'S', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:228:7: error: ‘CODEC_ID_TRUEMOTION2’ was not declared in this scope
{ CODEC_ID_TRUEMOTION2, MKTAG('T', 'M', '2', '0') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:231:7: error: ‘CODEC_ID_FLASHSV’ was not declared in this scope
{ CODEC_ID_FLASHSV, MKTAG('F', 'S', 'V', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:232:7: error: ‘CODEC_ID_JPEGLS’ was not declared in this scope
{ CODEC_ID_JPEGLS,MKTAG('M', 'J', 'L', 'S') }, /* JPEG-LS custom FOURCC for avi - encoder */
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:233:7: error: ‘CODEC_ID_VC1’ was not declared in this scope
{ CODEC_ID_VC1, MKTAG('W', 'V', 'C', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:234:7: error: ‘CODEC_ID_VC1’ was not declared in this scope
{ CODEC_ID_VC1, MKTAG('W', 'M', 'V', 'A') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:235:7: error: ‘CODEC_ID_CSCD’ was not declared in this scope
{ CODEC_ID_CSCD, MKTAG('C', 'S', 'C', 'D') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:236:7: error: ‘CODEC_ID_ZMBV’ was not declared in this scope
{ CODEC_ID_ZMBV, MKTAG('Z', 'M', 'B', 'V') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:237:7: error: ‘CODEC_ID_KMVC’ was not declared in this scope
{ CODEC_ID_KMVC, MKTAG('K', 'M', 'V', 'C') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:240:7: error: ‘CODEC_ID_VP5’ was not declared in this scope
{ CODEC_ID_VP5, MKTAG('V', 'P', '5', '0') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:241:7: error: ‘CODEC_ID_VP6’ was not declared in this scope
{ CODEC_ID_VP6, MKTAG('V', 'P', '6', '0') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:242:7: error: ‘CODEC_ID_VP6’ was not declared in this scope
{ CODEC_ID_VP6, MKTAG('V', 'P', '6', '1') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:243:7: error: ‘CODEC_ID_VP6’ was not declared in this scope
{ CODEC_ID_VP6, MKTAG('V', 'P', '6', '2') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:244:7: error: ‘CODEC_ID_VP6F’ was not declared in this scope
{ CODEC_ID_VP6F, MKTAG('V', 'P', '6', 'F') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:245:7: error: ‘CODEC_ID_JPEG2000’ was not declared in this scope
{ CODEC_ID_JPEG2000, MKTAG('M', 'J', '2', 'C') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:246:7: error: ‘CODEC_ID_VMNC’ was not declared in this scope
{ CODEC_ID_VMNC, MKTAG('V', 'M', 'n', 'c') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:250:7: error: ‘CODEC_ID_TARGA’ was not declared in this scope
{ CODEC_ID_TARGA, MKTAG('t', 'g', 'a', ' ') },
^
/home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:252:7: error: ‘CODEC_ID_NONE’ was not declared in this scope
{ CODEC_ID_NONE, 0 },
^
In file included from /home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:0:
/home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp: In member function ‘double CvCapture_FFMPEG::getProperty(int) const’:
/home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:784:33: error: ‘AVStream’ has no member named ‘r_frame_rate’
return av_q2d(video_st->r_frame_rate);
^
/home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp: In member function ‘double CvCapture_FFMPEG::get_fps() const’:
/home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:831:49: error: ‘AVStream’ has no member named ‘r_frame_rate’
double fps = r2d(ic->streams[video_stream]->r_frame_rate);
^
/home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp: In function ‘AVStream* icv_add_video_stream_FFMPEG(AVFormatContext*, AVCodecID, int, int, int, double, int)’:
/home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1220:24: error: ‘CODEC_ID_H264’ was not declared in this scope
if (c->codec_id == CODEC_ID_H264) {
^
In file included from /home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:0:
/home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp: In function ‘int icv_av_write_frame_FFMPEG(AVFormatContext*, AVStream*, uint8_t*, uint32_t, AVFrame*)’:
/home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1269:72: error: ‘avcodec_encode_video’ was not declared in this scope
out_size = avcodec_encode_video(c, outbuf, outbuf_size, picture);
^
modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:169: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o' failed
make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o] Error 1
CMakeFiles/Makefile2:2452: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
Makefile:133: recipe for target 'all' failed
make: *** [all] Error 2
When installing the dependencies it was saying that libtiff4-dev
can't be found so I followed the suggestion as it said to install libtiff5-dev
And similar was the problem with some other dependency libxine-dev
so I installed the given alternative libxine2-dev
.
How can I solve this?
This is because libav has changed API and removed some stuff it's still used in OpenCV. Ubuntu 14.10 uses libav API version 11 and OpenCV still uses API version 9.
The problem is that CODEC_ID_* was changed to AV_CODEC_ID_*.
I would suggest installing the OpenCV that are already in the Ubuntu repository:
sudo apt-get install libopencv-dev
p.s.: you can read more about in OpenCV DevZone
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With