在 raspberry pi 上安装 libmp3lame 以使用 FFMPEG

Installing libmp3lame to work with FFMPEG on raspberry pi

我在我的树莓派 2 上使用 python 3.2 的 moviepy 模块。它使用 FFMPEG 读取和写入视频,所以我使用 these 指令安装 FFMPEG。现在当我 运行 程序时,它说我的视频导出失败,因为 FFMPEG 没有找到它需要的 libmp3lame 编解码器。如何将 libmp3lame 编解码器安装到我的 RPi 2(运行ning Raspian Wheezy)?

我想我必须重新安装 FFMPEG 才能安装编解码器。我该怎么做才正确?

首先,使用

安装 lame mp3
sudo apt-get install libmp3lame-dev

然后 recompile/build ffmpeg 包括 --enable-libmp3lame 标志

./configure <other-configure-options> --enable-libmp3lame