加载 SoX 时出错

加载 SoX 时出错

我使用一款非常有用的工具,名为 r128gain,它可以对音频文件执行响度标准化。然而,在 17.10 下,我得到了以下错误...

Failed opening "/home/Downloads/r128gain-1.0.11-linux64-gtk3/r128gain-tools/libsox.so.2".
Error loading SoX.

有人能帮我解释一下吗?我很想让它再次工作?谢谢!

答案1

该工具似乎缺少sox安装

sudo apt-get install sox

应该修复它


编辑:单独安装并不能解决问题,你必须告诉r128增益在哪里可以找到 sox 库

mv /home/username/r128gain-1.0.11-linux64-gtk3/r128gain-tools/libsox.so.2 /home/username/r128gain-1.0.11-linux64-gtk3/r128gain-tools/libsox.so.2_backup

ln -s /usr/lib/x86_64-linux-gnu/libsox.so.2 /home/username/r128gain-1.0.11-linux64-gtk3/r128gain-tools/libsox.so.2

然后它就起作用了

./r128gain  /usr/share/sounds/alsa/Noise.wavSoX sucessfully loaded.
FFmpeg sucessfully loaded.
analyzing ...
  [1/1] "Noise.wav": -29.7 LUFS (6.7 LU)
      peak: -17.9 TPFS, range: 0.0 LU
  [ALBUM]: -29.7 LUFS (6.7 LU)
      peak: -17.9 TPFS, range: 0.0 LU
done.

答案2

SoX 可执行文件r128gain-1.0.11-linux64-gtk3/r128gain-tools依赖于 libpng12(在现代 Ubuntu 中不存在),所以我们需要手动安装它:

wget http://ftp.us.debian.org/debian/pool/main/libp/libpng/libpng12-0_1.2.49-1+deb7u2_amd64.deb
sudo dpkg -i libpng12-0_1.2.49-1+deb7u2_amd64.deb

此后它就可以工作了:

artful@artful:~/Downloads/r128gain-1.0.11-linux64-gtk3$ ./r128gain  /usr/share/sounds/alsa/Noise.wav SoX sucessfully loaded.
FFmpeg sucessfully loaded.
analyzing ...
  [1/1] "Noise.wav": -29.7 LUFS (6.7 LU)
      peak: -17.9 TPFS, range: 0.0 LU
  [ALBUM]: -29.7 LUFS (6.7 LU)
      peak: -17.9 TPFS, range: 0.0 LU
done.

相关内容