Unable to install video package, tried all solutions

My system

  • OS: Ubuntu 20.04
  • Octave version: 6.3.0
  • Installation method: Installed octave from Ubuntu software store.

Problem description

  • Whenever I try to install the video package using “pkg -forge install video”, it gives me the following error:
>> pkg install -forge video
configure: error: FFmpeg libswscale, libavformat, libavcodec or libavutil notfound
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for mkoctfile... yes
checking for pkg-config... /snap/octave/212/usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for FFMPEG... no

error: pkg: error running the configure script for video.
error: called from
    configure_make at line 93 column 9
    install at line 196 column 7
    pkg at line 568 column 9

but ffmpeg is already installed in my system.

Solutions I have tried

I have already tried solutions given in the similar thread here: Installing video package, namely

  • Installed opencv from source using the method given here
  • Installed the missing packages using “sudo apt-get install libavutil-dev libavformat-dev libswscale-dev libavcodec-dev” as also given on the wiki page
  • Installed libopencv-dev using “sudo apt-get install libopencv-dev”

Please help! Thank you.

It looks like you installed Octave as a snap app. IIUC, snap applications run isolated from the host system. So, it cannot access any binaries you installed on the host (that includes the FFMPEG libraries).

Mentioning @mtmiller as the maintainer of the Octave snap app in the hope he might be able to suggest a solution.