I tried following the installation steps for installing butterflow on windows 10 but at step 6 when running the MINGW_INSTALLS=mingw64 makepkg-mingw -sLf command on msys2 for the "packages/windows/mingw-w64-opencv2" folder I got the following error:
`==> Iniciando build()... (TL: Initiating build()...)
In file included from ffopencv.c:1:0:
../../modules/highgui/src/cap_ffmpeg_impl.hpp: In function 'AVStream icv_add_video_stream_FFMPEG(AVFormatContext, AVCodecID, int, int, int, double, int)':
../../modules/highgui/src/cap_ffmpeg_impl.hpp:1481:21: error: 'CODEC_FLAG_GLOBAL_HEADER' was not declared in this scope
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
^~~~~~~~
../../modules/highgui/src/cap_ffmpeg_impl.hpp:1481:21: note: suggested alternative: 'AV_CODEC_FLAG_GLOBAL_HEADER'
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
^~~~~~~~
AV_CODEC_FLAG_GLOBAL_HEADER
../../modules/highgui/src/cap_ffmpeg_impl.hpp: In function 'int icv_av_write_frame_FFMPEG(AVFormatContext, AVStream, uint8_t, uint32_t, AVFrame)':
../../modules/highgui/src/cap_ffmpeg_impl.hpp:1505:30: error: 'AVFMT_RAWPICTURE' was not declared in this scope
if (oc->oformat->flags & AVFMT_RAWPICTURE) {
^~~~
../../modules/highgui/src/cap_ffmpeg_impl.hpp:1505:30: note: suggested alternative: 'AVFMT_NOFILE'
if (oc->oformat->flags & AVFMT_RAWPICTURE) {
^~~~
AVFMT_NOFILE
../../modules/highgui/src/cap_ffmpeg_impl.hpp: In member function 'void CvVideoWriter_FFMPEG::close()':
../../modules/highgui/src/cap_ffmpeg_impl.hpp:1679:35: error: 'AVFMT_RAWPICTURE' was not declared in this scope
if( (oc->oformat->flags & AVFMT_RAWPICTURE) == 0 )
^~~~
../../modules/highgui/src/cap_ffmpeg_impl.hpp:1679:35: note: suggested alternative: 'AVFMT_NOFILE'
if( (oc->oformat->flags & AVFMT_RAWPICTURE) == 0 )
^~~~
AVFMT_NOFILE
../../modules/highgui/src/cap_ffmpeg_impl.hpp: In member function 'bool CvVideoWriter_FFMPEG::open(const char, int, double, int, int, bool)':
../../modules/highgui/src/cap_ffmpeg_impl.hpp:1913:32: error: 'AVFMT_RAWPICTURE' was not declared in this scope
if (!(oc->oformat->flags & AVFMT_RAWPICTURE)) {
^~~~
../../modules/highgui/src/cap_ffmpeg_impl.hpp:1913:32: note: suggested alternative: 'AVFMT_NOFILE'
if (!(oc->oformat->flags & AVFMT_RAWPICTURE)) {
^~~~
AVFMT_NOFILE
In file included from ffopencv.c:1:0:
../../modules/highgui/src/cap_ffmpeg_impl.hpp: In static member function 'static AVStream OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext, AVCodecID, int, int, int, double, AVPixelFormat)':
../../modules/highgui/src/cap_ffmpeg_impl.hpp:2207:25: error: 'CODEC_FLAG_GLOBAL_HEADER' was not declared in this scope
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
^~~~~~~~
../../modules/highgui/src/cap_ffmpeg_impl.hpp:2207:25: note: suggested alternative: 'AV_CODEC_FLAG_GLOBAL_HEADER'
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
^~~~~~~~
AV_CODEC_FLAG_GLOBAL_HEADER
../../modules/highgui/src/cap_ffmpeg_impl.hpp: In member function 'bool OutputMediaStream_FFMPEG::open(const char, int, int, double)':
../../modules/highgui/src/cap_ffmpeg_impl.hpp:2290:30: warning: ignoring return value of 'int avformat_write_header(AVFormatContext*, AVDictionary**)', declared with attribute warn_unused_result [-Wunused-result]
avformat_writeheader(oc, NULL);
==> ERRO: Uma falha ocorreu em build() (TL: ERROR: An error occured at build())
Abortando... (TL: Aborting...)
`
As it didn't work I tried the manual steps and got stuck again, this time step 5 of Building dependencies -> OpenCV 2.0. When trying to run the `gcc -Wall -shared -o opencv_ffmpeg_64.dll -x c++ -I..\include -I..\..\modules\highgui\src ffopencv.c -lavformat -lavcodec -lavdevice -lavresample -lswscale -lavutil -lws2_32 -lstdc++` command I get the following `gcc.exe: error: ffopencv.c: No such file or directory`
Any help on any of these 2 issues?
I tried following the installation steps for installing butterflow on windows 10 but at step 6 when running the
MINGW_INSTALLS=mingw64 makepkg-mingw -sLf
command on msys2 for the "packages/windows/mingw-w64-opencv2" folder I got the following error:`==> Iniciando build()... (TL: Initiating build()...) In file included from ffopencv.c:1:0: ../../modules/highgui/src/cap_ffmpeg_impl.hpp: In function 'AVStream icv_add_video_stream_FFMPEG(AVFormatContext, AVCodecID, int, int, int, double, int)': ../../modules/highgui/src/cap_ffmpeg_impl.hpp:1481:21: error: 'CODEC_FLAG_GLOBAL_HEADER' was not declared in this scope c->flags |= CODEC_FLAG_GLOBAL_HEADER; ^
~~~~~~~ ../../modules/highgui/src/cap_ffmpeg_impl.hpp:1481:21: note: suggested alternative: 'AV_CODEC_FLAG_GLOBAL_HEADER' c->flags |= CODEC_FLAG_GLOBAL_HEADER; ^~~~~~~~ AV_CODEC_FLAG_GLOBAL_HEADER ../../modules/highgui/src/cap_ffmpeg_impl.hpp: In function 'int icv_av_write_frame_FFMPEG(AVFormatContext, AVStream, uint8_t, uint32_t, AVFrame)': ../../modules/highgui/src/cap_ffmpeg_impl.hpp:1505:30: error: 'AVFMT_RAWPICTURE' was not declared in this scope if (oc->oformat->flags & AVFMT_RAWPICTURE) { ^~~~../../modules/highgui/src/cap_ffmpeg_impl.hpp:1505:30: note: suggested alternative: 'AVFMT_NOFILE' if (oc->oformat->flags & AVFMT_RAWPICTURE) { ^~~~AVFMT_NOFILE ../../modules/highgui/src/cap_ffmpeg_impl.hpp: In member function 'void CvVideoWriter_FFMPEG::close()': ../../modules/highgui/src/cap_ffmpeg_impl.hpp:1679:35: error: 'AVFMT_RAWPICTURE' was not declared in this scope if( (oc->oformat->flags & AVFMT_RAWPICTURE) == 0 ) ^~~~../../modules/highgui/src/cap_ffmpeg_impl.hpp:1679:35: note: suggested alternative: 'AVFMT_NOFILE' if( (oc->oformat->flags & AVFMT_RAWPICTURE) == 0 ) ^~~~AVFMT_NOFILE ../../modules/highgui/src/cap_ffmpeg_impl.hpp: In member function 'bool CvVideoWriter_FFMPEG::open(const char, int, double, int, int, bool)': ../../modules/highgui/src/cap_ffmpeg_impl.hpp:1913:32: error: 'AVFMT_RAWPICTURE' was not declared in this scope if (!(oc->oformat->flags & AVFMT_RAWPICTURE)) { ^~~~../../modules/highgui/src/cap_ffmpeg_impl.hpp:1913:32: note: suggested alternative: 'AVFMT_NOFILE' if (!(oc->oformat->flags & AVFMT_RAWPICTURE)) { ^~~~AVFMT_NOFILE In file included from ffopencv.c:1:0: ../../modules/highgui/src/cap_ffmpeg_impl.hpp: In static member function 'static AVStream OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext, AVCodecID, int, int, int, double, AVPixelFormat)': ../../modules/highgui/src/cap_ffmpeg_impl.hpp:2207:25: error: 'CODEC_FLAG_GLOBAL_HEADER' was not declared in this scope c->flags |= CODEC_FLAG_GLOBAL_HEADER; ^~~~~~~~ ../../modules/highgui/src/cap_ffmpeg_impl.hpp:2207:25: note: suggested alternative: 'AV_CODEC_FLAG_GLOBAL_HEADER' c->flags |= CODEC_FLAG_GLOBAL_HEADER; ^~~~~~~~ AV_CODEC_FLAG_GLOBAL_HEADER ../../modules/highgui/src/cap_ffmpeg_impl.hpp: In member function 'bool OutputMediaStream_FFMPEG::open(const char, int, int, double)': ../../modules/highgui/src/cap_ffmpeg_impl.hpp:2290:30: warning: ignoring return value of 'int avformat_write_header(AVFormatContext*, AVDictionary**)', declared with attribute warn_unused_result [-Wunused-result] avformat_writeheader(oc, NULL);