0

Environment: WSL Ubuntu 22.04. ([interop] appendWindowsPath = false)

Ran git clone https://git.ffmpeg.org/ffmpeg.git

Installed bunch of dependencies

The command

./configure --enable-nonfree --enable-cuda-nvcc --enable-libnpp --enable-vulkan \
        --enable-pic --enable-bzlib --enable-gpl --enable-libgsm --enable-cuda \
        --enable-cuvid --enable-iconv --enable-lzma --enable-nvenc --enable-zlib \
        --enable-sdl2 --enable-ffnvcodec --enable-nvdec --enable-libmp3lame \
        --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 \
        --enable-libx265 --enable-libaom --enable-debug --enable-libfdk-aac \
        --enable-libfreetype --enable-libvpl --enable-libmysofa --enable-libopencore-amrwb \
        --enable-libopenjpeg --enable-libsnappy --enable-libsoxr --enable-frei0r \
        --enable-libspeex --enable-libvmaf --enable-libtheora --enable-libtwolame \
        --enable-libvidstab --enable-libvo-amrwbenc --enable-libwebp --enable-libxml2 \
        --enable-libzimg --enable-libshine --enable-libxvid --enable-libopenmpt \
        --enable-version3 --enable-libsrt --enable-libsvtav1 --enable-libcaca \
        --enable-libcdio --enable-libilbc --enable-libkvazaar --enable-libmodplug \
        --enable-librist --enable-librtmp --enable-librubberband --enable-libtesseract \
        --enable-libzmq --enable-libzvbi --enable-openal --enable-ladspa --enable-libglslang \
        --enable-libxavs2 --enable-libplacebo --enable-libjxl --enable-opencl --enable-opengl \
        --enable-libopenh264 --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --disable-static --enable-shared

runs without complaint. Maybe worth noting that, even though I changed configuration, the last configure run generated:

License: nonfree and unredistributable
libavutil/avconfig.h is unchanged
libavcodec/parser_list.c is unchanged
libavcodec/bsf_list.c is unchanged
libavformat/demuxer_list.c is unchanged
libavformat/muxer_list.c is unchanged
libavdevice/indev_list.c is unchanged
libavdevice/outdev_list.c is unchanged

make -j$(nproc) generates lots of (e.g.) CC libavfilter/* lines

libavdevice lines look clean:

CC      libavdevice/alldevices.o
CC      libavdevice/alsa.o
CC      libavdevice/alsa_dec.o
CC      libavdevice/alsa_enc.o
CC      libavdevice/avdevice.o
CC      libavdevice/caca.o
CC      libavdevice/fbdev_common.o
CC      libavdevice/fbdev_dec.o
CC      libavdevice/fbdev_enc.o
CC      libavdevice/kmsgrab.o
CC      libavdevice/lavfi.o
CC      libavdevice/libcdio.o
CC      libavdevice/openal-dec.o
CC      libavdevice/opengl_enc.o
CC      libavdevice/oss.o
CC      libavdevice/oss_dec.o
CC      libavdevice/oss_enc.o
CC      libavdevice/sdl2.o
CC      libavdevice/sndio.o
CC      libavdevice/sndio_dec.o
CC      libavdevice/sndio_enc.o
CC      libavdevice/utils.o
CC      libavdevice/v4l2-common.o
CC      libavdevice/v4l2.o
CC      libavdevice/v4l2enc.o
CC      libavdevice/version.o
CC      libavdevice/xcbgrab.o
CC      libavdevice/xv.o

There are instances of output like this: (e.g.):

In file included from ./libavutil/common.h:48,
                 from ./libavutil/avutil.h:301,
                 from ./libavutil/opt.h:31,
                 from libavdevice/sdl2.c:31:
./config.h:338: warning: "HAVE_PTHREAD_SETNAME_NP" redefined

sudo make install outputs mostly "INSTALL"s and some "STRIP"s

Running ffmpeg gives:

ffmpeg: error while loading shared libraries: libavdevice.so.61: cannot open shared object file: No such file or directory

which ffmpeg gives /usr/local/bin/ffmpeg

The content of /etc/lib/x86_64-linux-gnu.conf is

# Multiarch support
/usr/local/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu

dpkg -l | grep libavdevice gives:

ii  libavdevice-dev:amd64                 7:6.1-1build2~22.04                     amd64        FFmpeg library for handling input and output devices - development files
ii  libavdevice58:amd64                   7:4.4.2-0ubuntu0.22.04.1                amd64        FFmpeg library for handling input and output devices - runtime files
ii  libavdevice60:amd64                   7:6.1-1build2~22.04                     amd64        FFmpeg library for handling input and output devices - runtime files

dpkg -L libavdevice-dev gives:

/.
/usr
/usr/include
/usr/include/x86_64-linux-gnu
/usr/include/x86_64-linux-gnu/libavdevice
/usr/include/x86_64-linux-gnu/libavdevice/avdevice.h
/usr/include/x86_64-linux-gnu/libavdevice/version.h
/usr/include/x86_64-linux-gnu/libavdevice/version_major.h
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libavdevice.a
/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig/libavdevice.pc
/usr/share
/usr/share/doc
/usr/share/doc/libavdevice-dev
/usr/share/doc/libavdevice-dev/changelog.Debian.gz
/usr/share/doc/libavdevice-dev/copyright
/usr/lib/x86_64-linux-gnu/libavdevice.so

sudo find / -name libavdevice.so.61 gives:

/home/<my-home>/git/ffmpeg/libavdevice/libavdevice.so.61

Note: I have run numerous makes. I've also installed vulkan SDK, and a bunch of cuda packages (following Nvidia's instructions/wikis.) I might have done other things I've forgotten.

How do I resolve this ffmpeg runtime error?

Do I have conflicts in libraries? I am mostly interested in using GPU features/HW, especially shaders. I've just started and kinda feeling my way around.

Thank you.

1 Answer 1

0

Restarting the PC next day solved the problem!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.