ffmpeg从video中获取音频-转换MP3的问题处理
在转换成mp3时候提示缺少 lib..., 下面是升级ffmpeg方案:
Ubuntu does not officially bundle ffmpeg after ditching it in favor of the Libav fork. There is a PPA that is quite outdated, so it should not be used unless you're keen on running an old version of ffmpeg.
I honestly have to confess that I don't know why it won't work for your specific case—or how you got an ffmpeg running in the first place, since Ubuntu does not bundle it officially.
Ubuntu does not officially bundle ffmpeg after ditching it in favor of the Libav fork. There is a PPA that is quite outdated, so it should not be used unless you're keen on running an old version of ffmpeg.
I honestly have to confess that I don't know why it won't work for your specific case—or how you got an ffmpeg running in the first place, since Ubuntu does not bundle it officially.
直接下载一个构件好的ffmpeg: Use a static build
A quick solution would be to simply download a recent static build (scroll down where it says Linux Static Builds). These all have libmp3lame bundled. Extract that build to some location, and copy ffmpeg to a directory in your PATH, e.g.:
cd ~/Downloads tar xvf ffmpeg-*.tar.xz cd !$ sudo mkdir -p /usr/local/bin sudo cp ./ffmpeg ./ffprobe /usr/local/bin/ sudo chmod ugo+x /usr/local/bin/ffmpeg /usr/local/bin/ffprobe
Also make sure that /usr/local/bin is in your shell PATH.
ffmpeg -i psychologist_2020_02_04_SF3K25D8D_shd.mp4 -b:a 96k -vn psychologist-96.mp3
ffmpeg -i psychologist_2020_02_04_SF3K25D8D_shd.mp4 -map 0:a -c copy psychologist.m4a
m4a 比mp3质量高,体积小,MP3兼容很多设备,都有压缩牺牲了音频质量。
Example to extract audio stream #4:
ffmpeg -i input.mkv -map 0:a:3 -c copy output.m4a
- -map 0:a:3 selects audio stream #4 only (ffmpeg starts counting from 0).
- -c copy enables stream copy mode. This copies the audio and does not re-encode it. Remove -c copy if you want the audio to be re-encoded.
- Choose an output format that supports your audio format. See comparison of container formats.
阅读量: 747
发布于:
修改于:
发布于:
修改于: