不能运行 aviread in octave -- 如何安装视频包?

Cannot run aviread in octave -- how to install the video package?

我无法在 Windows10 的 GNU Octave 中使用 aviread。许多站点告诉我安装视频包,但我在安装过程中遇到此错误。

octave:3> pkg install -forge video
rm: cannot remove `a.exe': Permission denied
Package libavformat was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavformat.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavformat' found
Package libavcodec was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavcodec.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavcodec' found
Package libavutil was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavutil.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavutil' found
Package libswscale was not found in the pkg-config search path.
Perhaps you should add the directory containing `libswscale.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libswscale' found
configure: error: need libavformat from FFMpeg
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for mkoctfile... C:/Octave/Octave-4.0.0/bin/mkoctfile-4.0.0.exe
retrieving compile and link flags from C:/Octave/Octave-4.0.0/bin/mkoctfile-4.0.0.exe
checking for F77_FUNC... yes
checking for SLList.h... no
checking for lo_ieee_nan_value... yes
checking for octave_idx_type... no
checking for quit.h... no
checking for octave... C:/Octave/Octave-4.0.0/bin/octave-4.0.0.exe
checking for OCTAVE_VERSION in Octave... 4.0.0
checking for octave_config_info('canonical_host_type') in Octave... i686-w64-mingw32
checking for octave_config_info('SHLEXT') in Octave... dll
checking whether ln -s works... no, using cp -p
checking for ranlib... ranlib
checking for strip... strip
checking for pkg-config... pkg-config

checking for av_write_frame in -lavformat... no

pkg: error running the configure script for video.
error: called from 'configure_make' in file C:\Octave\Octave-4.0.0\share\octave.0.0\m\pkg\private\configure_make.m near line 79, column 9
octave:3>

请问如何安装这个包。大多数网站都说它已过时,但其中 none 为我的问题提供了解决方案。如果没有,是否有任何其他方式来读取 AVI 文件(除了转换文件本身)?

我尝试手动下载并安装最新的 'release' 版本的视频包,以验证您的结果。 (显然 -forge 标志从服务器上拉出相同的版本,即 v.1.0.2。)那是从 2009 年开始的。从那时起就没有稳定的构建,并且有一个很大的版本在那段时间 Octave 发生了很多变化,所以事情不太正常也就不足为奇了。

如果您查看 Octave forge Packages page,您会在底部看到一条关于未维护包的注释:

They are still stored and release tarballs can be downloaded from our File Release System (same for the very old monolithic releases) . However, many of them have accumulated bug fixes and new features in the mercurial or SVN repositories, it simply happens that no maintainer has prepared a release. Because of this, we encourage users to check the development sources, not the released tarballs. Furthermore, bug reports for those packages continue to be welcome, and anyone wishing to take up the position of maintainer, please contact us through the maintainers mailing list.

同样,File Release System, May 8 2009 release is the latest one that includes video v1.0.2. If you check out the mercurial repository, however, there is a link to the video source that shows work on the source as recent as Nov 2015. This Octave help mailing list discussion describes some of the recent attempts to get it working about, and mentions specific difficulties for Windows. Another maintainers list discussion 表明它可能会得到改进并在(至少)linux 下工作,如果您设置为重新编译,则可能 windows。

我最好的建议是通过电子邮件发送 Octave 帮助邮件列表 (help-octave@gnu.org),看看是否有人提出了让该软件包在 windows 下工作的程序。我的猜测是大多数正在使用 linux 进行开发和编译,因此这可能不是一个简单的过程。