opencv VideoCapture不读取avi

时间:2016-04-21 18:47:45

标签: python-3.x opencv anaconda

我刚刚升级到Ubuntu 16.04,安装了anaconda3并从opencv3安装了conda install -c https://conda.anaconda.org/menpo opencv3。所以我尝试从avi文件中读取,cap = cv2.VideoCapture('/path/to/avi')cap.read()返回(False,None)。从网络摄像头捕获工作正常。有没有人知道可能导致问题的原因是什么?我读过这可能与ffmpeg有关,但我知道了:

$ ffmpeg -version
ffmpeg version N-79139-gde1a0d4 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.1)
configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab
libavutil      55. 19.100 / 55. 19.100
libavcodec     57. 30.100 / 57. 30.100
libavformat    57. 29.101 / 57. 29.101
libavdevice    57.  0.101 / 57.  0.101
libavfilter     6. 40.102 /  6. 40.102
libavresample   3.  0.  0 /  3.  0.  0
libswscale      4.  0.100 /  4.  0.100
libswresample   2.  0.101 /  2.  0.101
libpostproc    54.  0.100 / 54.  0.100

0 个答案:

没有答案