我要评分
获取效率
正确性
完整性
易理解

Failure to Load a Dependency Library When Using HW265Enc to Execute the Encoding Program

Symptom

When using HW265Enc to execute the encoding program, an error is reported stating "ffmpeg: error while loading shared libraries: libavdevice.so.xx."

Key Process and Cause Analysis

A dependency library fails to be loaded.

Conclusion and Solution

Assume that the directory for installing FFmpeg dynamic libraries is /home/ffmpeg/install/lib/.

  1. Find the path to the dependency library specified in the error information.
    find / -name libavdevice.so.xx
  2. Add the path to the environment variable, that is, add the found path next to the colon (:) in the following command:
    export LD_LIBRARY_PATH=/home/ffmpeg/install/lib/:Path to the dependency library