说明
本博客用于记录本人在Linux服务器上使用 Spleeter 开源音乐分离工具时,ffprobe 报错的解决方案。
报错信息
Traceback (most recent call last):
File "~/miniconda3/envs/spleeter/lib/python3.6/site-packages/spleeter/audio/ffmpeg.py", line 101, in load
probe = ffmpeg.probe(path)
File "~/miniconda3/envs/spleeter/lib/python3.6/site-packages/ffmpeg/_probe.py", line 23, in probe
raise Error('ffprobe', out, err)
ffmpeg._run.Error: ffprobe error (see stderr output for detail)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test_spleeter.py", line 9, in <module>
separate(sys.argv[1], sys.argv[2], sys.argv[3])
File "test_spleeter.py", line 7, in separate
separator.separate_to_file(test_files[0], pre_dir)
File "~/miniconda3/envs/spleeter/lib/python3.6/site-packages/spleeter/separator.py", line 380, in separate_to_file
sample_rate=self._sample_rate,
File "~/miniconda3/envs/spleeter/lib/python3.6/site-packages/spleeter/audio/ffmpeg.py", line 105, in load
e.stderr.decode()
spleeter.SpleeterError: An error occurs with ffprobe (see ffprobe output below)
ffprobe version 4.2.4-1ubuntu0.1 Copyright (c) 2007-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enab