I just want to convert video to frame images.
Using this simple code
import cv2
vidcap = cv2.VideoCapture(\'gog.mp4\')
success,image = vidcap.read()
I use Linux Mint, and programming in C++. I apply the same procedure of https://stackoverflow.com/a/45893821/11247666. This is:
sudo apt-get install ffmpeg
sudo apt-get install libavcodec-dev libavformat-dev libavdevice-dev
cd opencv-3.3.0
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_FFMPEG=ON -D WITH_TBB=ON -D WITH_GTK=ON -D WITH_V4L=ON -D WITH_OPENGL=ON -D WITH_CUBLAS=ON -DWITH_QT=OFF -DCUDA_NVCC_FLAGS="-D_FORCE_INLINES" ..
make -j7
sudo make install
But after this. The problem was cannot be solved. I have this error:
Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvNamedWindow.
I apply the following
sudo apt-get install libgtk2.0-dev
sudo apt-get install pkg-config
After this, I applied this same procedure:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_FFMPEG=ON -D WITH_TBB=ON -D WITH_GTK=ON -D WITH_V4L=ON -D WITH_OPENGL=ON -D WITH_CUBLAS=ON -DWITH_QT=OFF -DCUDA_NVCC_FLAGS="-D_FORCE_INLINES" ..
make -j7
sudo make install
The above worked for me.