ffmpeg 错误处理,ImportError: libopenh264.so.5: cannot open shared object file: No such file or directory

在用ffmpeg将mp3文件转成wav格式时报错了,报错信息如下

ImportError: libopenh264.so.5: cannot open shared object file: No such file or directory

find /usr -name 'libavdevice.so.5’

搜索发现缺少libavdevice.so.5这个文件

可能是因为用anaconda 安装的有关

卸载重装 :

sudo apt-get remove ffmpeg
sudo apt-get purge ffmpeg

我删除了 Anaconda ffmpeg 模块

conda remove ffmpeg

然后干净安装成功了:

sudo apt-get install ffmpeg

 执行wav格式 转换完成

执行CMDER命令:ffmpeg -i /home/tarena/VoiceprintRec-Pytorch/audio/zhthchs30/A2/A2_36.mp3 -f wav -ac 1 -ar 16000 /home/tarena/VoiceprintRec-Pytorch/audio/zhthchs30/A2wav/A2_36.wav
ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
[mp3 @ 0x558298f3c520] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '/home/tarena/VoiceprintRec-Pytorch/audio/zhthchs30/A2/A2_36.mp3':
  Duration: 00:00:09.14, start: 0.000000, bitrate: 24 kb/s
    Stream #0:0: Audio: mp3, 16000 Hz, mono, s16p, 24 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mp3 (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to '/home/tarena/VoiceprintRec-Pytorch/audio/zhthchs30/A2wav/A2_36.wav':
  Metadata:
    ISFT            : Lavf57.83.100
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, mono, s16, 256 kb/s
    Metadata:
      encoder         : Lavc57.107.100 pcm_s16le
size=     286kB time=00:00:09.14 bitrate= 256.1kbits/s speed= 712x    
video:0kB audio:286kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.026657%

你可能感兴趣的:(深度学习,音视频,python)