OPENCVをインストールするときにFFMPEGに「はい」を確認させる方法

OPENCVをインストールするときにFFMPEGに「はい」を確認させる方法

私は走る

    cmake -D CMAKE_BUILD_TYPE=RELEASE ..

opencvの設定

以下はいくつかの確認結果です。

--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  NO
--     FFMPEG:                      NO
--       avcodec:                   YES (ver 57.64.101)
--       avformat:                  YES (ver 57.56.100)
--       avutil:                    YES (ver 55.34.100)
--       swscale:                   YES (ver 4.2.100)
--       avresample:                NO
--     GStreamer:                   NO
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     OpenNI2:                     NO

ffmpegがインストールされていることを確認するために、以下を実行しました。

ffmpeg

結果を示す

  ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8.2 (GCC)
  configuration: --enable-shared --enable-gpl --enable-libx264 --enable-      libxvid --enable-pic --enable-ffplay --extra-cflags='-I/usr/include/SDL:/usr    /local/include/SDL2' --extra-ldflags=-L/usr/local/lib64 --extra-libs=-lSDL
  libavutil      55. 34.100 / 55. 34.100
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.100 / 57. 56.100
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
  Hyper fast Audio and Video encoder
  usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

ffmpegがインストールされていますが、なぜcmakeがそれを認識しないのですか?何が欠けていますか?

ベストアンサー1

私は最近OpenCVを再インストールする必要がありましたが、ffmepgを設定する手順は次のとおりです。

1. ~/Desktop に yum リポジトリをダウンロードします。 https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm

2. ストレージのインストール

sudo rpm -i ~/Desktop/rpmfusion-free-release-7.noarch.rpm

3. FFMPEGのインストール

sudo yum -install ffmpeg.x86_64 ffmpeg-devel.x86_64 ffmpeg-libs.x86_64

4. common.hファイルの編集

sudo gedit /usr/include/ffmpeg/common.h

28行目に次のコードを挿入してください。

#ifndef UINT64_C
#define UINT64_C(value) __CONCAT(value, ULL)
#endif

完成した

おすすめ記事