windowsinstallationpackageoctavefailed-installation

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


I am not able to use aviread in GNU Octave on Windows 10. Many sites tell me to install the video package, but I'm getting this error during installation.

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\4.0.0\m\pkg\private\configure_make.m near line 79, column 9
octave:3>

May I know how to install this package. Most sites say it is obsolete but none of them provide a solution to my problem. If not, is there any other way to read an AVI file (apart from converting the file itself)?


Solution

  • I tried manually downloading and installing the most recent 'release' build of the video package, verifying your results. (apparently the -forge flag pulls the same one off the server, which is v.1.0.2.) That's from way back in 2009. There hasn't been a stable build since then, and there have been a large number of changes in Octave over that time, so it's no surprise things don't quite work right.

    If you check out the Octave forge Packages page you'll see a note at the bottom about unmaintained packages:

    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.

    Again, the 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 indicates it may be improved and working under (at least) linux, and possibly windows if you're set up to re-compile.

    My best suggestion would be to email the Octave Help mailing list (help-octave@gnu.org) and see if anyone has come up with procedures for getting that package working under windows. My guess is most are developing and compiling with linux, so this may not be a trivial process.

    UPDATE 16 NOV 22: updating this old report to note that the video package has been completely rewritten since this question was first asked. it is now matlab compatible, containing only VideoReader and VideoWriter functions (so no aviread). It is a bundled package included with all Octave installers for windows (video v.2.0.2 is bundled with Octave 7.3.0). The latest video package can be obtained from https://packages.octave.org, and the video package repository is still located at SourceForge.